System.Data.SQLite
Check-in [e96f0d17a5]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Recognize the TIMESTAMP column data type as a DateTime object. Fix for ticket [bb4b04d457].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e96f0d17a5725def23cf084255e9c240a5a16366
User & Date: mistachkin 2011-11-30 00:34:12
References
2013-01-01
19:32 Closed ticket [bb4b04d457]: Using DateTimeFormat=Ticks with TIMESTAMP column causes exception plus 3 other changes artifact: e3631f103c user: mistachkin
2011-11-30
00:36 Fixed ticket [bb4b04d457]. artifact: d7cdd753c4 user: mistachkin
Context
2011-12-05
02:27
To avoid test naming conflicts with the unit test suite for Eagle itself, the unit test names in basic.eagle should not start with 'basic-'. check-in: bd63eac638 user: mistachkin tags: trunk
2011-11-30
00:34
Recognize the TIMESTAMP column data type as a DateTime object. Fix for ticket [bb4b04d457]. check-in: e96f0d17a5 user: mistachkin tags: trunk
2011-11-29
07:20
Revise how statement parameter binding handles blittable types. Also, allow binding to unsigned integer and long values that do not fit into their associated signed types. check-in: 1ab2413f5d user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteConvert.cs.

   839    839                 new SQLiteTypeNames("DECIMAL", DbType.Decimal),
   840    840                 new SQLiteTypeNames("MONEY", DbType.Decimal),
   841    841                 new SQLiteTypeNames("CURRENCY", DbType.Decimal),
   842    842                 new SQLiteTypeNames("TIME", DbType.DateTime),
   843    843                 new SQLiteTypeNames("DATE", DbType.DateTime),
   844    844                 new SQLiteTypeNames("DATETIME", DbType.DateTime),
   845    845                 new SQLiteTypeNames("SMALLDATE", DbType.DateTime),
          846  +              new SQLiteTypeNames("TIMESTAMP", DbType.DateTime),
   846    847                 new SQLiteTypeNames("BLOB", DbType.Binary),
   847    848                 new SQLiteTypeNames("BINARY", DbType.Binary),
   848    849                 new SQLiteTypeNames("VARBINARY", DbType.Binary),
   849    850                 new SQLiteTypeNames("IMAGE", DbType.Binary),
   850    851                 new SQLiteTypeNames("GENERAL", DbType.Binary),
   851    852                 new SQLiteTypeNames("OLEOBJECT", DbType.Binary),
   852    853                 new SQLiteTypeNames("GUID", DbType.Guid),

Added Tests/tkt-bb4b04d457.eagle.

            1  +###############################################################################
            2  +#
            3  +# tkt-bb4b04d457.eagle --
            4  +#
            5  +# Written by Joe Mistachkin.
            6  +# Released to the public domain, use at your own risk!
            7  +#
            8  +###############################################################################
            9  +
           10  +package require Eagle
           11  +package require EagleLibrary
           12  +package require EagleTest
           13  +
           14  +runTestPrologue
           15  +
           16  +###############################################################################
           17  +
           18  +package require System.Data.SQLite.Test
           19  +runSQLiteTestPrologue
           20  +
           21  +###############################################################################
           22  +
           23  +runTest {test tkt-bb4b04d457-1.1 {} -setup {
           24  +  setupDb [set fileName tkt-bb4b04d457-1.1.db] "" Ticks Utc
           25  +} -body {
           26  +  set dateTime [object invoke -alias DateTime Parse 2011-11-29T12:34:56Z]
           27  +  set dateTime [$dateTime -alias ToUniversalTime]
           28  +
           29  +  sql execute $db "CREATE TABLE t1(x TIMESTAMP NOT NULL);"
           30  +
           31  +  sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
           32  +      [list param1 Int64 [$dateTime Ticks]]
           33  +
           34  +  sql execute -execute reader -format list -datetimeformat \
           35  +      [getDateTimeFormat] $db "SELECT x FROM t1 ORDER BY rowid;"
           36  +} -cleanup {
           37  +  cleanupDb $fileName
           38  +
           39  +  unset -nocomplain dateTime db fileName
           40  +} -constraints \
           41  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
           42  +{{2011-11-29 12:34:56Z}}}
           43  +
           44  +###############################################################################
           45  +
           46  +runSQLiteTestEpilogue
           47  +runTestEpilogue