[sqlalchemy] Re: How to use julianday for datetime storing with sqlite

2009-09-08 Thread Slava Tutushkin
Thanks for the explanations! I'm going to experiment with all that. > > So only textual modifications to the queries are needed. Values to and > > from the query shall be passed as it is now, as ISO strings. > > as an aside, the DateTime types expect Python datetime objects, not > strings.  I th

[sqlalchemy] Re: How to use julianday for datetime storing with sqlite

2009-09-08 Thread Michael Bayer
Slava Tutushkin wrote: > > > > On Sep 8, 6:18 pm, "Michael Bayer" wrote: >> "julianday" being a SQLite function ?  i.e. you'd like SQLite to do the >> date arithmetic from the ISO value for you ?  or you'd like your custom >> type to provide the "julianday" numeric value ? >> >> better yet, to en

[sqlalchemy] Re: How to use julianday for datetime storing with sqlite

2009-09-08 Thread Slava Tutushkin
On Sep 8, 6:18 pm, "Michael Bayer" wrote: > "julianday" being a SQLite function ?  i.e. you'd like SQLite to do the > date arithmetic from the ISO value for you ?  or you'd like your custom > type to provide the "julianday" numeric value ? > > better yet, to ensure perfect clarity here, provide

[sqlalchemy] Re: How to use julianday for datetime storing with sqlite

2009-09-08 Thread Michael Bayer
Slava Tutushkin wrote: > > Thank you, Michael. > > But I think it's not exactly what I am looking for. > >> if you're looking to change the actual format stored in the column, >> make your own TypeDecorator which specifies the underlying format >> desired as the "impl" ( i think in this case it wo

[sqlalchemy] Re: How to use julianday for datetime storing with sqlite

2009-09-08 Thread Slava Tutushkin
Thank you, Michael. But I think it's not exactly what I am looking for. > if you're looking to change the actual format stored in the column, > make your own TypeDecorator which specifies the underlying format > desired as the "impl" ( i think in this case it would be Numeric). > TypeDecorator e

[sqlalchemy] Re: How to use julianday for datetime storing with sqlite

2009-09-07 Thread Michael Bayer
On Sep 7, 2009, at 7:15 PM, Slava Tutushkin wrote: > > Hi all, > > I'm wondering if it's possible to make sqlalchemy using julianday for > datetime storing with sqlite instead of ISO string representation. > > Is it possible to customize from the userland code? if you're looking to change the a