System.Data.SQLite
Check-in [8d6ce5d334]
Not logged in

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

Overview
Comment:Slight test improvement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | blobIo
Files: files | file ages | folders
SHA1: 8d6ce5d3345087ca7b59fdb7fbefb2d591782002
User & Date: mistachkin 2016-07-01 09:28:02
Context
2016-07-01
20:40
Bump version to 1.0.103.0. Update version history docs. check-in: 328757b2bf user: mistachkin tags: blobIo
09:28
Slight test improvement. check-in: 8d6ce5d334 user: mistachkin tags: blobIo
09:06
Add experimental support for incremental blob I/O. check-in: ccf2547bfd user: mistachkin tags: blobIo
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

4443
4444
4445
4446
4447
4448
4449

4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
....
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
    INSERT INTO t1 (x, y) VALUES(1, 'nope');
    INSERT INTO t1 (x, y) VALUES(2, '1984');
  }

  set dataReader [sql execute -execute reader -format datareader \
      -behavior +KeyInfo -alias $db "SELECT x, y FROM t1;"]


  set bytes(1) [object create -alias Byte\[\] 4]
  set bytes(2) [object create -alias Byte\[\] 4]
  set result [list]

  while {[$dataReader Read]} {
    set blob [$dataReader -alias GetBlob 1 false]
    lappend result [$blob GetCount]
    $blob Read $bytes(1) 4 0
    lappend result [getBytesAsList $bytes(1)]

    for {set i 0} {$i < 4} {incr i} {
      set byte [$bytes(1) GetValue $i]
      incr byte; set byte [object invoke -create Byte Parse $byte]
      $bytes(1) SetValue $byte $i
    }

    $blob Write $bytes(1) 4 0

    if {[$dataReader GetInt64 0] == 1} then {
      $blob Reopen 2
      $blob Read $bytes(2) 4 0
      lappend result [getBytesAsList $bytes(2)]
    }

    $blob Close
  }

  $dataReader Close; unset dataReader
................................................................................
  set result
} -cleanup {
  unset -nocomplain blob
  unset -nocomplain dataReader

  cleanupDb $fileName

  unset -nocomplain byte i bytes result db fileName

  rename getBytesAsList ""
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {4 {110 111 112 101} {49 57 56 52} 4 {49 57 56 52}\
1 1 0 opqf 2 2 2 2:95}}

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







>
|
|





|


|





|



|







 







|







4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
....
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
    INSERT INTO t1 (x, y) VALUES(1, 'nope');
    INSERT INTO t1 (x, y) VALUES(2, '1984');
  }

  set dataReader [sql execute -execute reader -format datareader \
      -behavior +KeyInfo -alias $db "SELECT x, y FROM t1;"]

  set size 4
  set bytes(1) [object create -alias Byte\[\] $size]
  set bytes(2) [object create -alias Byte\[\] $size]
  set result [list]

  while {[$dataReader Read]} {
    set blob [$dataReader -alias GetBlob 1 false]
    lappend result [$blob GetCount]
    $blob Read $bytes(1) $size 0
    lappend result [getBytesAsList $bytes(1)]

    for {set i 0} {$i < $size} {incr i} {
      set byte [$bytes(1) GetValue $i]
      incr byte; set byte [object invoke -create Byte Parse $byte]
      $bytes(1) SetValue $byte $i
    }

    $blob Write $bytes(1) $size 0

    if {[$dataReader GetInt64 0] == 1} then {
      $blob Reopen 2
      $blob Read $bytes(2) $size 0
      lappend result [getBytesAsList $bytes(2)]
    }

    $blob Close
  }

  $dataReader Close; unset dataReader
................................................................................
  set result
} -cleanup {
  unset -nocomplain blob
  unset -nocomplain dataReader

  cleanupDb $fileName

  unset -nocomplain byte i bytes size result db fileName

  rename getBytesAsList ""
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {4 {110 111 112 101} {49 57 56 52} 4 {49 57 56 52}\
1 1 0 opqf 2 2 2 2:95}}

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