comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: GNATCOLL SQLite3 vs Ada.Calendar.Time
Date: Thu, 18 Aug 2016 13:50:42 -0700
Date: 2016-08-18T13:50:42-07:00	[thread overview]
Message-ID: <np5737$nfm$1@dont-email.me> (raw)
In-Reply-To: <np53eg$1o71$1@gioia.aioe.org>

On 08/18/2016 12:48 PM, Dmitry A. Kazakov wrote:
> 
> No, SQLite3 uses NUMERIC which is INTEGER or REAL at SQLite's choice when the
> conversion is reversible. Otherwise it is up to 15 decimal points of precision
> which is not enough for 64-bit time stamps.

The on-line SQLite documentation (https://www.sqlite.org/datatype3.html) says of
NUMERIC (section 3), "If the lossless conversion of TEXT to INTEGER or REAL is
not possible then the value is stored using the TEXT storage class." So storage
as TEXT is a possibility. The discussion of date and time fields (2.2) says,
"SQLite does not have a storage class set aside for storing dates and/or times.
Instead, the built-in Date And Time Functions of SQLite are capable of storing
dates and times as TEXT, REAL, or INTEGER values:" and goes on to discuss
strings in ISO8601 format stored as TEXT, Julian days as REAL, and Unix times as
INTEGER.

-- 
Jeff Carter
"Why don't you bore a hole in yourself and let the sap run out?"
Horse Feathers
49


  reply	other threads:[~2016-08-18 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 21:05 GNATCOLL SQLite3 vs Ada.Calendar.Time Stephen Leake
2016-08-18  8:09 ` Dmitry A. Kazakov
2016-08-18 11:19 ` G.B.
2016-08-18 17:45   ` Stephen Leake
2016-08-18 18:13     ` Stephen Leake
2016-08-19 15:30       ` Stephen Leake
2016-08-19 17:43         ` G.B.
2016-08-18 18:28     ` Jeffrey R. Carter
2016-08-18 19:48       ` Dmitry A. Kazakov
2016-08-18 20:50         ` Jeffrey R. Carter [this message]
2016-08-18 22:05         ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox