From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: GNATCOLL SQLite3 vs Ada.Calendar.Time Date: Thu, 18 Aug 2016 13:50:42 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <7a1eaa60-3be9-4e9b-b67a-d174f3960276@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 18 Aug 2016 20:50:49 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7c030f56102b58a2c16dea977db88bb"; logging-data="24054"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182pk9rDFLKhPY9Ko3hPzt+2MgAipXIwFs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: Cancel-Lock: sha1:QIpaSzSW+5e2rPMjSXxs2PehlgE= Xref: news.eternal-september.org comp.lang.ada:31462 Date: 2016-08-18T13:50:42-07:00 List-Id: 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