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.

Reply via email to