On Thursday, August 15, 2013 12:37:27 PM UTC-7, GregD wrote: > > > On Aug 15, 2013, at 11:27 AM, Jeremy Evans <[email protected]<javascript:>> > wrote: > > On Thursday, August 15, 2013 6:37:31 AM UTC-7, GregD wrote: >> >> Anyone- >> >> Trying to get Sybase SqlAnywhere to work for Sequel using the native >> sqlanywhere driver: https://github.com/sqlanywhere/sqlanywhere and >> having a few issues with the integration tests. I just started this in my >> spare time, so I haven't gotten very far yet. One thing that has me stuck >> are these 2 failing tests and need a solution is: >> >> rspec ./spec/integration/dataset_test.rb:67 # Simple Dataset operations >> should graph correctly >> rspec ./spec/integration/dataset_test.rb:71 # Simple Dataset operations >> should graph correctly with a subselect >> >> >> The SQL generated is correct and works in the Sybase Client software: >> >> "SELECT * FROM \"ITEMS\" LEFT OUTER JOIN \"ITEMS\" AS \"B\" ON >> (\"B\".\"ID\" = \"ITEMS\".\"ID\")" >> > > > That's not the correct SQL. A graph should always have explicitly > qualified selections. For example, on SQLite: > > SELECT `items`.`id`, `items`.`number`, `b`.`id` AS 'b_id', `b`.`number` AS > 'b_number' FROM `items` LEFT OUTER JOIN `items` AS 'b' ON (`b`.`id` = > `items`.`id`) > > So the first thing you should do is find out why it isn't generating the > correct SQL. > > > How? This is from the select_clause_methods. It looks right or follows > others. Not sure maybe something in the old mssql shared adapter I copied > is not making it work. Agree, the problem is there is no b_id or b_number > which would give me the 4 name/value pairs. I'll dig. >
Your Dataset#fetch_rows method does not set @columns. I think if you update the method so that it sets @columns to an array of column symbols in the dataset, that will fix things. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/groups/opt_out.
