db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Insaccanebbia <finsaccaneb...@etnoteam.it>
Subject Date and Datetime [Was: BLOB and CLOB Torque datatypes]
Date Wed, 11 May 2005 16:59:52 GMT
Hi Thomas,

>Could you please elaborate a bit more on this ? I do not have a SQL
>specification ready, so I list what I guess. Please correct me if I'm
>wrong.
>The SQL Date type is supposed to hold dates with day accuracy.
>The SQL Time type is supposed to hold time information with second
>accuracy. It should not hold any Date information.
>The SQL Timestamp type is supposed to hold Date+Time with at least
>millisecond accuracy.
>  
>
Yes, you're right...
I keep confusing between Date and (Oracle) DATE.
What makes me mad is that Oracle driver Metadata says a (Oracle) DATE 
field is a (JDBC) Date field
(it should be Timestamp since it keeps time information).

>So I guess that the datetime type should hold date+time information with
>second accuracy (like the date type in oracle).
>Do you want to implement this for all databases ? This would probably mean
>that for some databases, you would have to use the timestamp type and limit
>its accuracy. But then, defining a date with day accuracy on oracle also
>needs limiting the accuracy to dates.
>
>I am not sure whether this can be implemented with village....
>  
>
As long as we're tied to Village, we can't have datatypes not included 
in JDBC specifications.
As soon as we're able to use Torque "metadata" we could choose to add 
other datatypes if we feel it can
be useful (and if it can be mapped to all databases).

The DATETIME could be a candidate for such a decision, since there are 
databases that have a similar datatype (Oracle DATE, MySQL DATETIME...) 
and the other could have DATETIME mapped to their "Timestamp field".

But the DATETIME datatype can't be introduced in Torque if we don't have 
a way to use "our" metadata instead of the DB metadata.

So, I'd like to see a DATETIME "Torque datatype": I doubt that it can be 
added to Torque in a near future :-(

Hi,
Fabio
-- 

Fabio Insaccanebbia

 

ETNOTEAM S.p.A.

Via dei Valtorta, 48 - 20127 Milano

Tel. +39 02 261641 - Fax +39 02 26164444 - Mobile  349 1860502

e-mail: finsaccanebbia@etnoteam.it <mailto:finsaccanebbia@etnoteam.it> - 
URL: http://www.etnoteam.it <http://www.etnoteam.it/>

 

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message