System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation

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

Changes In Branch tkt-01f20ea55a Excluding Merge-Ins

This is equivalent to a diff from cd91b8e6bf to cf56f17881

2016-10-13
17:31
Update SQLite core library to the latest trunk. check-in: 1da3d937ca user: mistachkin tags: trunk
2016-10-10
21:37
Test case updates. Closed-Leaf check-in: cf56f17881 user: mistachkin tags: tkt-01f20ea55a
20:58
Add initial test cases for ticket [01f20ea55a]. check-in: 5d35df2f75 user: mistachkin tags: tkt-01f20ea55a
20:48
Enhance the 'getRowsFromDataTable' test suite helper procedure. check-in: cd91b8e6bf user: mistachkin tags: trunk
2016-10-07
19:20
Use NuGet 2.x to build the official NuGet packages for a release. Pursuant to [e9573e2d12]. check-in: bb7d27069f user: mistachkin tags: trunk

Added Tests/tkt-01f20ea55a.eagle.











































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
###############################################################################
#
# tkt-01f20ea55a.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

package require Eagle
package require Eagle.Library
package require Eagle.Test

runTestPrologue

###############################################################################

package require System.Data.SQLite.Test
runSQLiteTestPrologue

###############################################################################

set rawValue(0) "2016-10-01 12:34:56.8765401"

###############################################################################

set ticksValue(0) [getDateTimeTicks $rawValue(0)]
set ticksValue(1) [getDateTimeTicks $rawValue(0) false]

###############################################################################

set instanceValue(0) [object create -alias DateTime $ticksValue(0)]
set instanceValue(1) [object create -alias DateTime $ticksValue(1) Utc]

###############################################################################

runTest {test tkt-01f20ea55a-1.1 {DateTimeKind with DataTable} -setup {
  proc dateTimeValueCallback { dataTable dataRow index value } {
    if {[object isoftype $value DateTime]} then {
      return [list [$value Kind] [$value ToString [getDateTimeFormat]]]
    } else {
      continue
    }
  }

  setupDb [set fileName tkt-01f20ea55a-1.1.db] "" ISO8601 Utc
} -body {
  set connection [getDbConnection]

  sql execute $db [subst {
    CREATE TABLE t1 (x, y DATETIME);
    INSERT INTO t1 (x, y) VALUES(1, NULL);
  }]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(2, ?);" \
      [list param1 DateTime $instanceValue(0)]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(3, ?);" \
      [list param1 DateTime $instanceValue(1)]

  set command [$connection -alias CreateCommand]
  $command CommandText {SELECT x, y FROM t1 ORDER BY x;}

  set dataAdapter [object create -alias \
      System.Data.SQLite.SQLiteDataAdapter $command]

  set dataTable [object create -alias System.Data.DataTable]

  set dataColumn(x) [object create -alias System.Data.DataColumn x]
  set dataColumn(y) [object create -alias System.Data.DataColumn y]

  $dataColumn(y) DataType DateTime; $dataColumn(y) DateTimeMode Utc

  $dataTable Columns.Add $dataColumn(x)
  $dataTable Columns.Add $dataColumn(y)

  $dataAdapter Fill $dataTable
  getRowsFromDataTable $dataTable dateTimeValueCallback
} -cleanup {
  unset -nocomplain dataColumn dataTable dataAdapter command

  freeDbConnection

  cleanupDb $fileName

  unset -nocomplain connection db fileName

  rename dateTimeValueCallback ""
} -constraints {eagle command.object monoBug28 monoBug211 command.sql\
compile.DATA SQLite System.Data.SQLite} -result {{{x 1} y} {{x 2} {y\
{Utc {2016-10-01 12:34:56.8765401Z}}}} {{x 3} {y {Utc {2016-10-01\
12:34:56.8765401Z}}}}}}

###############################################################################

unset -nocomplain instanceValue ticksValue rawValue

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue