Jeremy- 

I tried that and it did not work or I'm missing the problem.... 


Oh, I agree with your statements. I was just want to make sure there was not 
some magic I might be missing. 


>From the integration plugin_tests.rb.... 



1) Touch plugin should update the timestamp column for many_to_one associated 
records when the record is updated or destroyed 
Failure/Error: Unable to find matching line from backtrace 
expected 2880000544879/17280000000000 to be within 0.0006944444444444445 of 0 
# ./spec/integration/plugin_test.rb:546:in `block (2 levels) in <top 
(required)>' 


2) Touch plugin should update the timestamp column for one_to_many associated 
records when the record is updated 
Failure/Error: Unable to find matching line from backtrace 
expected 4800000877813/28800000000000 to be within 0.0006944444444444445 of 0 
# ./spec/integration/plugin_test.rb:566:in `block (2 levels) in <top 
(required)>' 


3) Touch plugin should update the timestamp column for many_to_many associated 
records when the record is updated 
Failure/Error: Unable to find matching line from backtrace 
expected 533333442039/3200000000000 to be within 0.0006944444444444445 of 0 
# ./spec/integration/plugin_test.rb:580:in `block (2 levels) in <top 
(required)>' 








----- Original Message -----

From: "Jeremy Evans" <[email protected]> 
To: [email protected] 
Sent: Thursday, August 29, 2013 11:58:46 PM 
Subject: Re: SqlAnywhere Adapter Timestamp problems 


On Thursday, August 29, 2013 8:41:40 PM UTC-7, GregD wrote: 




Jeremy- 


The native Sybase SqlAnywhere adapter is close. I have muddled through most of 
the integration tests and down to about 24 failing test. Quite a few of the 
remaining one have to do with time stamps. SqlAnywhere by default only gives up 
to the milliseconds in a select *. You can get the microseconds, etc with a 
call to datepart(<datepart>, <column>). Is there a way with Sequel to do that 
for time stamp columns as an additional column to use? Most of the time stamp 
failures have to do with time diff below the milliseconds, I think. I tried 
setting supports_timestamp_usec? to false. I tried setting a time stamp format. 
Nothing seems to work. Do I just set those cspecify to indicate that they are 
not yet working. Any ideas? 




You probably want to do what the shared mssql adapter does and have 
supports_timestamp_usecs? be true, but only use milliseconds and not 
microseconds when formatting the time (see format_timestamp_usec). If that 
doesn't work, please paste the output of the failing tests so I can review it. 



I don't think selecting a separate datepart field for each timestamp field is a 
viable approach. For one, it violates the general principle that a dataset does 
not know the types of the columns. Plus, it is just not possible to handle 
corrrectly in non-trivial cases: 


DB[:table].select{function_returning_timestamp(:column)} 


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 . 

-- 
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.

Reply via email to