System.Data.SQLite

Check-in [c67a1ad0f6]
Login

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

Overview
Comment:Update some tests to be explicit about the DateTimeKind.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c67a1ad0f6f3dd7d8abd20988999c2940312af42
User & Date: mistachkin 2017-11-29 01:41:18.293
Context
2017-11-29
02:01
Fix a typo in test 'tkt-0e48e80333-1.1' for ticket [0e48e80333]. check-in: 89c3c8334b user: mistachkin tags: trunk
01:41
Update some tests to be explicit about the DateTimeKind. check-in: c67a1ad0f6 user: mistachkin tags: trunk
2017-11-17
20:07
Bump version to 1.0.107.0. Add preliminary support for the .NET Framework 4.7.1. Update version history docs. check-in: 0c447952e6 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/basic.eagle.
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
  sql execute $db \
      "INSERT INTO t1 (x, y) VALUES(3, 'Wednesday, 16 December 2009 12:00:00');"

  sql execute $db "INSERT INTO t1 (x, y) VALUES(4, '12/16/2009');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(5, '12:00');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(6, '12/16/2009 12:00');"

  sql execute $db "INSERT INTO t1 (x, y) VALUES(7, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009"]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(8, ?);" \
      [list param1 DateTime 12:00:00]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(9, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009 12:00:00"]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(10, ?);" \
      [list param1 DateTime 12/16/2009]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \
      [list param1 DateTime 12:00]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \
      [list param1 DateTime "12/16/2009 12:00"]

  sql execute -execute reader -datetimeformat [getDateTimeFormat] $db \
      "SELECT x, CAST(y AS TEXT) AS y2 FROM t1 ORDER BY x;"

  foreach name [lsort -integer [array names rows -regexp {^\d+$}]] {
    lappend result [list $name $rows($name)]







|


|


|


|


|


|







742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
  sql execute $db \
      "INSERT INTO t1 (x, y) VALUES(3, 'Wednesday, 16 December 2009 12:00:00');"

  sql execute $db "INSERT INTO t1 (x, y) VALUES(4, '12/16/2009');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(5, '12:00');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(6, '12/16/2009 12:00');"

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(7, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009"]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(8, ?);" \
      [list param1 DateTime 12:00:00]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(9, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009 12:00:00"]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(10, ?);" \
      [list param1 DateTime 12/16/2009]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \
      [list param1 DateTime 12:00]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \
      [list param1 DateTime "12/16/2009 12:00"]

  sql execute -execute reader -datetimeformat [getDateTimeFormat] $db \
      "SELECT x, CAST(y AS TEXT) AS y2 FROM t1 ORDER BY x;"

  foreach name [lsort -integer [array names rows -regexp {^\d+$}]] {
    lappend result [list $name $rows($name)]
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
  sql execute $db \
      "INSERT INTO t1 (x, y) VALUES(3, 'Wednesday, 16 December 2009 12:00:00');"

  sql execute $db "INSERT INTO t1 (x, y) VALUES(4, '12/16/2009');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(5, '12:00');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(6, '12/16/2009 12:00');"

  sql execute $db "INSERT INTO t1 (x, y) VALUES(7, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009"]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(8, ?);" \
      [list param1 DateTime 12:00:00]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(9, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009 12:00:00"]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(10, ?);" \
      [list param1 DateTime 12/16/2009]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \
      [list param1 DateTime 12:00]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \
      [list param1 DateTime "12/16/2009 12:00"]

  sql execute -execute reader -datetimeformat [getDateTimeFormat] $db \
      "SELECT x, CAST(y AS TEXT) AS y2 FROM t1 ORDER BY x;"

  foreach name [lsort -integer [array names rows -regexp {^\d+$}]] {
    lappend result [list $name $rows($name)]







|


|


|


|


|


|







803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
  sql execute $db \
      "INSERT INTO t1 (x, y) VALUES(3, 'Wednesday, 16 December 2009 12:00:00');"

  sql execute $db "INSERT INTO t1 (x, y) VALUES(4, '12/16/2009');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(5, '12:00');"
  sql execute $db "INSERT INTO t1 (x, y) VALUES(6, '12/16/2009 12:00');"

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(7, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009"]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(8, ?);" \
      [list param1 DateTime 12:00:00]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(9, ?);" \
      [list param1 DateTime "Wednesday, 16 December 2009 12:00:00"]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(10, ?);" \
      [list param1 DateTime 12/16/2009]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \
      [list param1 DateTime 12:00]

  sql execute -datetimekind Utc $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \
      [list param1 DateTime "12/16/2009 12:00"]

  sql execute -execute reader -datetimeformat [getDateTimeFormat] $db \
      "SELECT x, CAST(y AS TEXT) AS y2 FROM t1 ORDER BY x;"

  foreach name [lsort -integer [array names rows -regexp {^\d+$}]] {
    lappend result [list $name $rows($name)]
Changes to Tests/types.eagle.
175
176
177
178
179
180
181



182
183
184
185
186
187
188
        System.Data.SQLite.SQLiteBlob System.Data.SQLite.SQLiteBlob}]

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

set savedDateTimeFormat [object invoke Interpreter.GetActive DateTimeFormat]
if {![isObjectHandle $savedDateTimeFormat]} then {set savedDateTimeFormat null}
object invoke Interpreter.GetActive DateTimeFormat [getDateTimeFormat]




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

for {set i 0} {$i < [llength $params]} {incr i} {
  foreach {
    typeName methodName isArray propertyName isRequired value
  } [lindex $params $i] break







>
>
>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
        System.Data.SQLite.SQLiteBlob System.Data.SQLite.SQLiteBlob}]

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

set savedDateTimeFormat [object invoke Interpreter.GetActive DateTimeFormat]
if {![isObjectHandle $savedDateTimeFormat]} then {set savedDateTimeFormat null}
object invoke Interpreter.GetActive DateTimeFormat [getDateTimeFormat]

set savedDateTimeKind [object invoke Interpreter.GetActive DateTimeKind]
object invoke Interpreter.GetActive DateTimeKind Utc

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

for {set i 0} {$i < [llength $params]} {incr i} {
  foreach {
    typeName methodName isArray propertyName isRequired value
  } [lindex $params $i] break
342
343
344
345
346
347
348



349
350
351
352
353
354
355
  rename readValueCallback2 ""
}

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

object invoke Interpreter.GetActive DateTimeFormat $savedDateTimeFormat
unset -nocomplain savedDateTimeFormat




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

unset -nocomplain i readArgs params typeName methodName isArray propertyName \
    isRequired expectedResults expectedResult

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







>
>
>







345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
  rename readValueCallback2 ""
}

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

object invoke Interpreter.GetActive DateTimeFormat $savedDateTimeFormat
unset -nocomplain savedDateTimeFormat

object invoke Interpreter.GetActive DateTimeKind $savedDateTimeKind
unset -nocomplain savedDateTimeKind

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

unset -nocomplain i readArgs params typeName methodName isArray propertyName \
    isRequired expectedResults expectedResult

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