System.Data.SQLite
Check-in [4012cc2587]
Not logged in

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

Overview
Comment:Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4012cc2587fb9149225c579a959f637fa8c16d6b
User & Date: mistachkin 2018-12-23 00:01:45
References
2018-12-23
05:00 Closed ticket [e36e05e299]: SqliteDataReader getOrdinal does not conform System.Data.Common.DbDataReader plus 3 other changes artifact: dae01f4545 user: mistachkin
Context
2018-12-23
04:56
Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to [23d8d6171e]. check-in: 02ed8cae60 user: mistachkin tags: trunk
00:01
Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299]. check-in: 4012cc2587 user: mistachkin tags: trunk
2018-12-19
02:36
Pickup the SQLite core library 3.26.0 docs from upstream. check-in: 7cacc45fe2 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Doc/Extra/Provider/version.html.

42
43
44
45
46
47
48

49
50
51
52
53
54
55
    </div>
    <div id="mainSection">
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li>

    </ul>
    <p><b>1.0.109.0 - August 15, 2018</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li>
      <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li>
      <li>Do not attempt to initialize the logging subsystem more than once.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for <a href="https://system.data.sqlite.org/index.html/info/baf42ee135">[baf42ee135]</a>.</li>







>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    </div>
    <div id="mainSection">
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li>
      <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/e36e05e299">[e36e05e299]</a>.</li>
    </ul>
    <p><b>1.0.109.0 - August 15, 2018</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li>
      <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li>
      <li>Do not attempt to initialize the logging subsystem more than once.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for <a href="https://system.data.sqlite.org/index.html/info/baf42ee135">[baf42ee135]</a>.</li>

Changes to Setup/data/verify.lst.

934
935
936
937
938
939
940

941
942
943
944
945
946
947
  Tests/tkt-da685c0bac.eagle
  Tests/tkt-da9f18d039.eagle
  Tests/tkt-daeaf3150a.eagle
  Tests/tkt-dbd65441a5.eagle
  Tests/tkt-e06c4caff3.eagle
  Tests/tkt-e1b2e0f769.eagle
  Tests/tkt-e30b820248.eagle

  Tests/tkt-e47b3d8346.eagle
  Tests/tkt-ef2216192d.eagle
  Tests/tkt-f2c47a01eb.eagle
  Tests/tkt-f8dbab8baf.eagle
  Tests/tkt-fe50b8c2e8.eagle
  Tests/types.eagle
  Tests/version.eagle







>







934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
  Tests/tkt-da685c0bac.eagle
  Tests/tkt-da9f18d039.eagle
  Tests/tkt-daeaf3150a.eagle
  Tests/tkt-dbd65441a5.eagle
  Tests/tkt-e06c4caff3.eagle
  Tests/tkt-e1b2e0f769.eagle
  Tests/tkt-e30b820248.eagle
  Tests/tkt-e36e05e299.eagle
  Tests/tkt-e47b3d8346.eagle
  Tests/tkt-ef2216192d.eagle
  Tests/tkt-f2c47a01eb.eagle
  Tests/tkt-f8dbab8baf.eagle
  Tests/tkt-fe50b8c2e8.eagle
  Tests/types.eagle
  Tests/version.eagle

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

1318
1319
1320
1321
1322
1323
1324







1325
1326
1327
1328
1329
1330
1331

      /// <summary>
      /// When returning <see cref="Double" /> column values, always use
      /// the invariant culture when converting their values from strings.
      /// </summary>
      GetInvariantDouble = 0x400000000000,








      /// <summary>
      /// When binding parameter values or returning column values, always
      /// treat them as though they were plain text (i.e. no numeric,
      /// date/time, or other conversions should be attempted).
      /// </summary>
      BindAndGetAllAsText = BindAllAsText | GetAllAsText,








>
>
>
>
>
>
>







1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338

      /// <summary>
      /// When returning <see cref="Double" /> column values, always use
      /// the invariant culture when converting their values from strings.
      /// </summary>
      GetInvariantDouble = 0x400000000000,

      /// <summary>
      /// <b>EXPERIMENTAL</b> --
      /// Enable strict conformance to the ADO.NET standard, e.g. use of
      /// thrown exceptions to indicate common error conditions.
      /// </summary>
      StrictConformance = 0x800000000000,

      /// <summary>
      /// When binding parameter values or returning column values, always
      /// treat them as though they were plain text (i.e. no numeric,
      /// date/time, or other conversions should be attempted).
      /// </summary>
      BindAndGetAllAsText = BindAllAsText | GetAllAsText,

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

1223
1224
1225
1226
1227
1228
1229






1230
1231
1232
1233
1234
1235
1236
          {
              r = _keyInfo.GetOrdinal(name);
              if (r > -1) r += PrivateVisibleFieldCount;
          }

          _fieldIndexes.Add(name, r);
      }







      return r;
    }

    /// <summary>
    /// Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done
    /// to gather the necessary information so it can be represented in an ADO.NET manner.







>
>
>
>
>
>







1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
          {
              r = _keyInfo.GetOrdinal(name);
              if (r > -1) r += PrivateVisibleFieldCount;
          }

          _fieldIndexes.Add(name, r);
      }

      if (r == -1 && HelperMethods.HasFlags(
            _flags, SQLiteConnectionFlags.StrictConformance))
      {
          throw new IndexOutOfRangeException();
      }

      return r;
    }

    /// <summary>
    /// Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done
    /// to gather the necessary information so it can be represented in an ADO.NET manner.

Added Tests/tkt-e36e05e299.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
102
103
104
105
106
107
108
###############################################################################
#
# tkt-e36e05e299.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

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

proc hasIndexOutOfRangeException { value } {
  return [regexp -- { System\.IndexOutOfRangeException: } $value]
}

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

runTest {test tkt-e36e05e299-1.1 {GetOrdinal, -1 for not found} -setup {
  setupDb [set fileName tkt-e36e05e299-1.1.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x);
    INSERT INTO t1 (x) VALUES(NULL);
  }

  set dataReader [sql execute \
      -execute reader -format datareader \
      -alias $db "SELECT x FROM t1 ORDER BY x;"]

  lappend result(1) [catch {$dataReader GetOrdinal x} result(2)]

  if {$result(1)} then {
    set result(2) [hasIndexOutOfRangeException $result(2)]
  }

  lappend result(3) [catch {$dataReader GetOrdinal y} result(4)]

  if {$result(3)} then {
    set result(4) [hasIndexOutOfRangeException $result(4)]
  }

  testArrayGet result
} -cleanup {
  unset -nocomplain dataReader

  cleanupDb $fileName db

  unset -nocomplain result db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
{1 0 2 0 3 0 4 -1}}

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

runTest {test tkt-e36e05e299-1.2 {GetOrdinal, throw on not found} -setup {
  setupDb [set fileName tkt-e36e05e299-1.2.db] "" "" "" StrictConformance
} -body {
  sql execute $db {
    CREATE TABLE t1(x);
    INSERT INTO t1 (x) VALUES(NULL);
  }

  set dataReader [sql execute \
      -execute reader -format datareader \
      -alias $db "SELECT x FROM t1 ORDER BY x;"]

  lappend result(1) [catch {$dataReader GetOrdinal x} result(2)]

  if {$result(1)} then {
    set result(2) [hasIndexOutOfRangeException $result(2)]
  }

  lappend result(3) [catch {$dataReader GetOrdinal y} result(4)]

  if {$result(3)} then {
    set result(4) [hasIndexOutOfRangeException $result(4)]
  }

  testArrayGet result
} -cleanup {
  unset -nocomplain dataReader

  cleanupDb $fileName db

  unset -nocomplain result db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
{1 0 2 0 3 1 4 1}}

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

rename hasIndexOutOfRangeException ""

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

runSQLiteTestEpilogue
runTestEpilogue

Changes to readme.htm.

208
209
210
211
212
213
214

215
216
217
218
219
220
221
<h2><b>Version History</b></h2>

<p>
    <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li>

</ul>
<p>
    <b>1.0.109.0 - August 15, 2018</b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li>
    <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li>







>







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<h2><b>Version History</b></h2>

<p>
    <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li>
    <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].</li>
</ul>
<p>
    <b>1.0.109.0 - August 15, 2018</b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li>
    <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li>

Changes to www/news.wiki.

45
46
47
48
49
50
51

52
53
54
55
56
57
58
<div align="center"><h2><b>Version History</b></h2></div>

<p>
    <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_26_0.html|SQLite 3.26.0].</li>

</ul>
<p>
    <b>1.0.109.0 - August 15, 2018</b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_24_0.html|SQLite 3.24.0].</li>
    <li>Updated to [https://www.nuget.org/packages/EntityFramework/6.2.0|Entity Framework 6.2.0].</li>







>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div align="center"><h2><b>Version History</b></h2></div>

<p>
    <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_26_0.html|SQLite 3.26.0].</li>
    <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].</li>
</ul>
<p>
    <b>1.0.109.0 - August 15, 2018</b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_24_0.html|SQLite 3.24.0].</li>
    <li>Updated to [https://www.nuget.org/packages/EntityFramework/6.2.0|Entity Framework 6.2.0].</li>