System.Data.SQLite
Check-in [3c9aa14d0e]
Not logged in

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

Overview
Comment:Merge updates from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | netStandard20
Files: files | file ages | folders
SHA1: 3c9aa14d0e913e01fa23d205a79b6ac92acaec67
User & Date: mistachkin 2018-04-13 12:49:23
Context
2018-04-13
12:59
Merge updates from trunk. check-in: 940912844b user: mistachkin tags: netStandard20
12:49
Merge updates from trunk. check-in: 3c9aa14d0e user: mistachkin tags: netStandard20
2018-04-12
22:21
Correct result checking semantics and expected results for test 'types-2.13' to account for a String.Equals() issue in the .NET Framework. check-in: 37355d65e9 user: mistachkin tags: trunk
2018-04-09
17:26
Merge updates from trunk. check-in: c0a69eeb3c user: mistachkin tags: netStandard20
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

44
45
46
47
48
49
50

51
52
53
54
55
56
57
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.109.0 - May XX, 2018 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_23_0.html">SQLite 3.23.0</a>.</li>
      <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for <a href="https://system.data.sqlite.org/index.html/info/baf42ee135">[baf42ee135]</a>.</li>
      <li>Add preliminary support for .NET Core 2.0 and the .NET Standard 2.0.</li>

    </ul>
    <p><b>1.0.108.0 - March 2, 2018</b></p>
    <ul>
      <li>Support extended result codes when messages are looked up without the SQLite core library.</li>
      <li>Override System.Object members for the SQLiteException class to improve its ToString return value. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/53962f9eff">[53962f9eff]</a>.</li>
      <li>More database connection configuration options for the <a href="https://www.sqlite.org/c3ref/db_config.html">sqlite3_db_config()</a> interface.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Set HResult property of SQLiteException based on the SQLite core library error code.&nbsp;<b>** Potentially Incompatible Change **</b></li>







>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.109.0 - May XX, 2018 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_23_0.html">SQLite 3.23.0</a>.</li>
      <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for <a href="https://system.data.sqlite.org/index.html/info/baf42ee135">[baf42ee135]</a>.</li>
      <li>Add preliminary support for .NET Core 2.0 and the .NET Standard 2.0.</li>
      <li>Add GetFieldAffinity method to the SQLiteDataReader class.</li>
    </ul>
    <p><b>1.0.108.0 - March 2, 2018</b></p>
    <ul>
      <li>Support extended result codes when messages are looked up without the SQLite core library.</li>
      <li>Override System.Object members for the SQLiteException class to improve its ToString return value. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/53962f9eff">[53962f9eff]</a>.</li>
      <li>More database connection configuration options for the <a href="https://www.sqlite.org/c3ref/db_config.html">sqlite3_db_config()</a> interface.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Set HResult property of SQLiteException based on the SQLite core library error code.&nbsp;<b>** Potentially Incompatible Change **</b></li>

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

909
910
911
912
913
914
915





















916
917
918
919
920
921
922

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetDouble(i - PrivateVisibleFieldCount);

        VerifyType(i, DbType.Double);
        return _activeStatement._sql.GetDouble(_activeStatement, i);
    }






















    /// <summary>
    /// Returns the .NET type of a given column
    /// </summary>
    /// <param name="i">The index of the column.</param>
    /// <returns>Type</returns>
    public override Type GetFieldType(int i)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetDouble(i - PrivateVisibleFieldCount);

        VerifyType(i, DbType.Double);
        return _activeStatement._sql.GetDouble(_activeStatement, i);
    }

    /// <summary>
    /// Determines and returns the <see cref="TypeAffinity" /> of the
    /// specified column.
    /// </summary>
    /// <param name="i">
    /// The index of the column.
    /// </param>
    /// <returns>
    /// The <see cref="TypeAffinity" /> associated with the specified
    /// column, if any.
    /// </returns>
    public TypeAffinity GetFieldAffinity(int i)
    {
        CheckDisposed();

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetFieldAffinity(i - PrivateVisibleFieldCount);

        return GetSQLiteType(_flags, i).Affinity;
    }

    /// <summary>
    /// Returns the .NET type of a given column
    /// </summary>
    /// <param name="i">The index of the column.</param>
    /// <returns>Type</returns>
    public override Type GetFieldType(int i)

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

518
519
520
521
522
523
524







525
526
527
528
529
530
531

    internal string GetDataTypeName(int i)
    {
      Sync();
      if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetDataTypeName(_keyInfo[i].column);
      else return "integer";
    }








    internal Type GetFieldType(int i)
    {
      Sync();
      if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetFieldType(_keyInfo[i].column);
      else return typeof(Int64);
    }







>
>
>
>
>
>
>







518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538

    internal string GetDataTypeName(int i)
    {
      Sync();
      if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetDataTypeName(_keyInfo[i].column);
      else return "integer";
    }

    internal TypeAffinity GetFieldAffinity(int i)
    {
      Sync();
      if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetFieldAffinity(_keyInfo[i].column);
      else return TypeAffinity.Uninitialized;
    }

    internal Type GetFieldType(int i)
    {
      Sync();
      if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetFieldType(_keyInfo[i].column);
      else return typeof(Int64);
    }

Changes to Tests/types.eagle.

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
312
313
314
315
316
317
318


319
320
321
322
323
324
325
326
    [list Double          GetDouble     false   DoubleValue     true    0] \
    [list Single          GetFloat      false   FloatValue      true    0] \
    [list Guid            GetGuid       false   GuidValue       true    \
        00000000-0000-0000-0000-000000000000] \
    [list Int16           GetInt16      false   Int16Value      true    0] \
    [list Int32           GetInt32      false   Int32Value      true    0] \
    [list Int64           GetInt64      false   Int64Value      true    0] \
    [list String          GetString     false   StringValue     false   null] \
    [list Object          GetValue      false   Value           false   null] \
    [list SDS.SQLiteBlob  GetBlob       false   BlobValue       false   0]]

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

set expectedResults [list \
    {False False True False False False False False} \
................................................................................
        00000000-0000-0000-0000-000000000000\
        00060504-0000-0000-0000-000000000000\
        00000000-0000-0000-0000-000000000000\
        74f1f402-ddef-4027-a78f-3847fa97b830} \
    {0 0 1 0 0 0 0 0} \
    {0 0 1 0 0 0 0 0} \
    {0 0 1 0 0 0 0 0} \
    "<NUL> <NUL> <NUL> <NUL> three \x04\x05\x06\
        {2016-06-19 19:50:04.1234567}\
        74f1f402-ddef-4027-a78f-3847fa97b830" \
    {{} 0 1 1.2 three {4 5 6} {2016-06-19\
        19:50:04.1234567}\
        74f1f402-ddef-4027-a78f-3847fa97b830} \
    {System.Data.SQLite.SQLiteBlob System.Data.SQLite.SQLiteBlob\
        System.Data.SQLite.SQLiteBlob System.Data.SQLite.SQLiteBlob\
................................................................................
        if {[catch {
          if {$typeName eq "System.Data.SQLite.SQLiteBlob"} then {
            $dataReader $methodName 0 true; # read-only
          } else {
            $dataReader $methodName 0
          }
        } value] == 0} then {


          if {$value eq "\x00"} then {
            lappend result <NUL>
          } else {
            lappend result [getStringFromObjectHandle $value]
          }
        } else {
          lappend result [list error(value) $::errorCode]
        }







|







 







|







 







>
>
|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
    [list Double          GetDouble     false   DoubleValue     true    0] \
    [list Single          GetFloat      false   FloatValue      true    0] \
    [list Guid            GetGuid       false   GuidValue       true    \
        00000000-0000-0000-0000-000000000000] \
    [list Int16           GetInt16      false   Int16Value      true    0] \
    [list Int32           GetInt32      false   Int32Value      true    0] \
    [list Int64           GetInt64      false   Int64Value      true    0] \
    [list String          GetString     false   StringValue     false   none] \
    [list Object          GetValue      false   Value           false   null] \
    [list SDS.SQLiteBlob  GetBlob       false   BlobValue       false   0]]

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

set expectedResults [list \
    {False False True False False False False False} \
................................................................................
        00000000-0000-0000-0000-000000000000\
        00060504-0000-0000-0000-000000000000\
        00000000-0000-0000-0000-000000000000\
        74f1f402-ddef-4027-a78f-3847fa97b830} \
    {0 0 1 0 0 0 0 0} \
    {0 0 1 0 0 0 0 0} \
    {0 0 1 0 0 0 0 0} \
    "none none none none three \x04\x05\x06\
        {2016-06-19 19:50:04.1234567}\
        74f1f402-ddef-4027-a78f-3847fa97b830" \
    {{} 0 1 1.2 three {4 5 6} {2016-06-19\
        19:50:04.1234567}\
        74f1f402-ddef-4027-a78f-3847fa97b830} \
    {System.Data.SQLite.SQLiteBlob System.Data.SQLite.SQLiteBlob\
        System.Data.SQLite.SQLiteBlob System.Data.SQLite.SQLiteBlob\
................................................................................
        if {[catch {
          if {$typeName eq "System.Data.SQLite.SQLiteBlob"} then {
            $dataReader $methodName 0 true; # read-only
          } else {
            $dataReader $methodName 0
          }
        } value] == 0} then {
          if {[string length $value] == 0} then {
            lappend result <EMPTY>
          } elseif {$value eq "\x00"} then {
            lappend result <NUL>
          } else {
            lappend result [getStringFromObjectHandle $value]
          }
        } else {
          lappend result [list error(value) $::errorCode]
        }

Changes to readme.htm.

210
211
212
213
214
215
216

217
218
219
220
221
222
223
<p>
    <b>1.0.109.0 - May XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_23_0.html">SQLite 3.23.0</a>.</li>
    <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for [baf42ee135].</li>
    <li>Add preliminary support for .NET Core 2.0 and the .NET Standard 2.0.</li>

</ul>
<p>
    <b>1.0.XXX.0 - March 2, 2018</b>
</p>
<ul>
    <li>Support extended result codes when messages are looked up without the SQLite core library.</li>
    <li>Override System.Object members for the SQLiteException class to improve its ToString return value. Pursuant to [53962f9eff].</li>







>







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<p>
    <b>1.0.109.0 - May XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_23_0.html">SQLite 3.23.0</a>.</li>
    <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for [baf42ee135].</li>
    <li>Add preliminary support for .NET Core 2.0 and the .NET Standard 2.0.</li>
    <li>Add GetFieldAffinity method to the SQLiteDataReader class.</li>
</ul>
<p>
    <b>1.0.XXX.0 - March 2, 2018</b>
</p>
<ul>
    <li>Support extended result codes when messages are looked up without the SQLite core library.</li>
    <li>Override System.Object members for the SQLiteException class to improve its ToString return value. Pursuant to [53962f9eff].</li>

Changes to www/news.wiki.

47
48
49
50
51
52
53

54
55
56
57
58
59
60
<p>
    <b>1.0.109.0 - May XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_23_0.html|SQLite 3.23.0].</li>
    <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for [baf42ee135].</li>
    <li>Add preliminary support for .NET Core 2.0 and the .NET Standard 2.0.</li>

</ul>
<p>
    <b>1.0.108.0 - March 2, 2018</b>
</p>
<ul>
    <li>Support extended result codes when messages are looked up without the SQLite core library.</li>
    <li>Override System.Object members for the SQLiteException class to improve its ToString return value. Pursuant to [53962f9eff].</li>







>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<p>
    <b>1.0.109.0 - May XX, 2018 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_23_0.html|SQLite 3.23.0].</li>
    <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for [baf42ee135].</li>
    <li>Add preliminary support for .NET Core 2.0 and the .NET Standard 2.0.</li>
    <li>Add GetFieldAffinity method to the SQLiteDataReader class.</li>
</ul>
<p>
    <b>1.0.108.0 - March 2, 2018</b>
</p>
<ul>
    <li>Support extended result codes when messages are looked up without the SQLite core library.</li>
    <li>Override System.Object members for the SQLiteException class to improve its ToString return value. Pursuant to [53962f9eff].</li>