System.Data.SQLite

Check-in [5032831744]
Login

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

Overview
Comment:Update several tests for ticket [b167206ad3] to use the 'DECIMALTEXT' and 'NUMERICTEXT' type mappings.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 50328317440c67af8d3ed381e2a9a8788c602def
User & Date: mistachkin 2017-09-16 06:21:48.945
Context
2017-09-28
18:22
Update version history docs. check-in: 0cfbfac5f7 user: mistachkin tags: trunk
18:14
Merge updates from trunk. check-in: 37be32bdd4 user: mistachkin tags: vs2017
2017-09-16
06:21
Update several tests for ticket [b167206ad3] to use the 'DECIMALTEXT' and 'NUMERICTEXT' type mappings. check-in: 5032831744 user: mistachkin tags: trunk
06:20
Add the 'DECIMALTEXT' and 'NUMERICTEXT' type mappings. check-in: 354e4df35c user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/tkt-b167206ad3.eagle.
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
  unset -nocomplain y2 y1 x result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123456780} {2\
123456789123456780 123456789123456780}}}

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

runTest {test tkt-b167206ad3-2.1 {bind type for DECIMAL} -setup {
  setupDb [set fileName tkt-b167206ad3-2.1.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y DECIMAL(38,9));
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

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







|



|







160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
  unset -nocomplain y2 y1 x result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123456780} {2\
123456789123456780 123456789123456780}}}

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

runTest {test tkt-b167206ad3-2.1 {bind type for DECIMALTEXT} -setup {
  setupDb [set fileName tkt-b167206ad3-2.1.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y DECIMALTEXT(38,9));
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(1, ?);" \
      [list param1 Decimal $d(1)]
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
  unset -nocomplain dataReader

  cleanupDb $fileName

  unset -nocomplain y2 y1 x d result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123457000} {2\
12345678912345.2 12345678912345.2}}}

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

runTest {test tkt-b167206ad3-2.2 {bind type for DECIMAL} -setup {
  setupDb [set fileName tkt-b167206ad3-2.2.db] "" "" "" \
      "BindDecimalAsText GetAllAsText"
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y DECIMAL(38,9));
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

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







|



|




|







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
  unset -nocomplain dataReader

  cleanupDb $fileName

  unset -nocomplain y2 y1 x d result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123457000} {2\
12345678912345.1556346 12345678912345.2}}}

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

runTest {test tkt-b167206ad3-2.2 {bind type for DECIMALTEXT} -setup {
  setupDb [set fileName tkt-b167206ad3-2.2.db] "" "" "" \
      "BindDecimalAsText GetAllAsText"
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y DECIMALTEXT(38,9));
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(1, ?);" \
      [list param1 Decimal $d(1)]
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
  unset -nocomplain y2 y1 x d result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123456780} {2\
12345678912345.1556346 12345678912345.1556346}}}

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

runTest {test tkt-b167206ad3-2.3 {bind type for NUMERIC} -setup {
  setupDb [set fileName tkt-b167206ad3-2.3.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y NUMERIC);
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

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







|



|







247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
  unset -nocomplain y2 y1 x d result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123456780} {2\
12345678912345.1556346 12345678912345.1556346}}}

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

runTest {test tkt-b167206ad3-2.3 {bind type for NUMERICTEXT} -setup {
  setupDb [set fileName tkt-b167206ad3-2.3.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y NUMERICTEXT);
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

  sql execute $db "INSERT INTO t1 (x, y) VALUES(1, ?);" \
      [list param1 Decimal $d(1)]
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
  unset -nocomplain dataReader

  cleanupDb $fileName

  unset -nocomplain y2 y1 x d result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123457000} {2\
12345678912345.2 12345678912345.2}}}

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

runTest {test tkt-b167206ad3-2.4 {bind type for NUMERIC} -setup {
  setupDb [set fileName tkt-b167206ad3-2.4.db] "" "" "" \
      "BindDecimalAsText GetAllAsText"
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y NUMERIC);
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

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







|



|




|







286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
  unset -nocomplain dataReader

  cleanupDb $fileName

  unset -nocomplain y2 y1 x d result db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{1 123456789123456780 123456789123457000} {2\
12345678912345.1556346 12345678912345.2}}}

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

runTest {test tkt-b167206ad3-2.4 {bind type for NUMERICTEXT} -setup {
  setupDb [set fileName tkt-b167206ad3-2.4.db] "" "" "" \
      "BindDecimalAsText GetAllAsText"
} -body {
  sql execute $db {
    CREATE TABLE t1(x INTEGER, y NUMERICTEXT);
  }

  set d(1) [object invoke -create Decimal Parse 123456789123456780]
  set d(2) [object invoke -create Decimal Parse 12345678912345.1556346]

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