[DB-SIG] Date/Time in Gadfly

Andy Todd andy47@halfcooked.com
Mon, 10 Dec 2001 15:02:09 +1100


Greg,

Sadly, no. Although gadfly is based on the SQL standard supported by 
ODBC 2.0 (which I think is, in turn, based on ANSI SQL 92) it doesn't 
support a native date construct.

If you look in the file sqlgram.py (line 94-97) you will see that the 
only reserved words for data types are INTEGER, FLOAT and VARCHAR. So, 
if dates are important to you there are really only two choices; store 
them as numbers and write your own conversion routines or upgrade to a 
different database system.

Well, actually there is a third option - add a date datatype (such as 
mxDATETIME) to gadfly and earn the gratitude of an entire community ;-)

In all other respects gadfly is a great database engine. Its a definite 
improvement over shelve/pickle and it is really easy to include with 
your own applications so that you are not reliant on non Python software.

Lindstrom Greg - glinds wrote:

> Greetings-
> 
> I am new to the database aspect of Python and have just downloaded Gadfly to
> get me started. Does Gadfly support Date/Time constructs (or is that a SQL
> issue)?
> 
> Thanks!
> 
> Greg Lindstrom
> Acxiom Corporation,                    mail: CWY10011149
> InfoBase Products Development                  office: (501) 342-1626
> 301 Industrial Blvd, Conway, AR, 72032     fax:     (501) 336-3911 
> email: Greg.Lindstrom@acxiom.com           
> 
> "Programming requires discipline. Period. If you're depending on a compiler
> to catch sloppy thinking, then you've got trouble." John Roth
> 
> 
> 

HTH,
Andy
-- 
-----------------------------------------------------------------------
 From the desk of Andrew J Todd esq.
"Another year older, still no wiser." - Me, on my birthday