System.Data.SQLite

Check-in [b37afb1ddc]
Login

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

Overview
Comment:Add GetInvariantDecimal connection flag, enabled by default, to force returning of decimal values using the invariant culture. Update version history docs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b37afb1ddc1ad5e1685167b777381b30931f2e58
User & Date: mistachkin 2017-10-18 17:59:21.811
Context
2017-10-19
17:26
Fix an incorrect doc comment on the Schema_Columns method. Pursuant to [ff163eb3d8]. check-in: 7632e932f5 user: mistachkin tags: trunk
2017-10-18
17:59
Add GetInvariantDecimal connection flag, enabled by default, to force returning of decimal values using the invariant culture. Update version history docs. check-in: b37afb1ddc user: mistachkin tags: trunk
07:11
Update comments in the session test file. check-in: 7957c296b8 user: mistachkin tags: trunk
Changes
Unified Diff 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.106.0 - October XX, 2017 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/draft/releaselog/3_21_0.html">SQLite 3.21.0</a>.</li>
      <li>Add full support for the native <a href="https://www.sqlite.org/sessionintro.html">session</a> extension.</li>
      <li>Add BindDecimalAsText and GetDecimalAsText connection flags to force binding and returning of decimal values as text. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/b167206ad3">[b167206ad3]</a>.</li>

      <li>Add preliminary support for Visual Studio 2017 and the .NET Framework 4.7. This does <b>not</b> include support for the design-time components for Visual Studio, see <a href="https://system.data.sqlite.org/index.html/info/8292431f51">[8292431f51]</a>.</li>
    </ul>
    <p><b>1.0.105.2 - June 12, 2017</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_19_3.html">SQLite 3.19.3</a>.</li>
      <li>Fix issues that prevented SQLiteBlob creation from succeeding for tables that did not have an integer primary key.</li>
    </ul>







>







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.106.0 - October XX, 2017 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/draft/releaselog/3_21_0.html">SQLite 3.21.0</a>.</li>
      <li>Add full support for the native <a href="https://www.sqlite.org/sessionintro.html">session</a> extension.</li>
      <li>Add BindDecimalAsText and GetDecimalAsText connection flags to force binding and returning of decimal values as text. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/b167206ad3">[b167206ad3]</a>.</li>
      <li>Add BindInvariantDecimal and GetInvariantDecimal connection flags, enabled by default, to force binding and returning of decimal values using the invariant culture. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/b167206ad3">[b167206ad3]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Add preliminary support for Visual Studio 2017 and the .NET Framework 4.7. This does <b>not</b> include support for the design-time components for Visual Studio, see <a href="https://system.data.sqlite.org/index.html/info/8292431f51">[8292431f51]</a>.</li>
    </ul>
    <p><b>1.0.105.2 - June 12, 2017</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_19_3.html">SQLite 3.19.3</a>.</li>
      <li>Fix issues that prevented SQLiteBlob creation from succeeding for tables that did not have an integer primary key.</li>
    </ul>
Changes to System.Data.SQLite/SQLiteBase.cs.
1261
1262
1263
1264
1265
1266
1267






1268
1269
1270
1271
1272
1273
1274

      /// <summary>
      /// When binding <see cref="Decimal" /> parameter values, always use
      /// the invariant culture when converting their values to strings.
      /// </summary>
      BindInvariantDecimal = 0x40000000000,







      /// <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,








>
>
>
>
>
>







1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280

      /// <summary>
      /// When binding <see cref="Decimal" /> parameter values, always use
      /// the invariant culture when converting their values to strings.
      /// </summary>
      BindInvariantDecimal = 0x40000000000,

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

      /// <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,

1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
#else
      LogDefault = LogCallbackException,
#endif

      /// <summary>
      /// The default extra flags for new connections.
      /// </summary>
      Default = LogDefault | BindInvariantDecimal,

      /// <summary>
      /// The default extra flags for new connections with all logging enabled.
      /// </summary>
      DefaultAndLogAll = Default | LogAll
  }








|







1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
#else
      LogDefault = LogCallbackException,
#endif

      /// <summary>
      /// The default extra flags for new connections.
      /// </summary>
      Default = LogDefault | BindInvariantDecimal | GetInvariantDecimal,

      /// <summary>
      /// The default extra flags for new connections with all logging enabled.
      /// </summary>
      DefaultAndLogAll = Default | LogAll
  }

Changes to System.Data.SQLite/SQLiteDataReader.cs.
867
868
869
870
871
872
873






874
875
876
877
878
879
880
881
            }
        }

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

        VerifyType(i, DbType.Decimal);






        return Decimal.Parse(_activeStatement._sql.GetText(_activeStatement, i), NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture);
    }

    /// <summary>
    /// Returns the column as a double
    /// </summary>
    /// <param name="i">The index of the column.</param>
    /// <returns>double</returns>







>
>
>
>
>
>
|







867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
            }
        }

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

        VerifyType(i, DbType.Decimal);

        CultureInfo cultureInfo = CultureInfo.CurrentCulture;

        if ((_flags & SQLiteConnectionFlags.GetInvariantDecimal) == SQLiteConnectionFlags.GetInvariantDecimal)
            cultureInfo = CultureInfo.InvariantCulture;

        return Decimal.Parse(_activeStatement._sql.GetText(_activeStatement, i), NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingSign, cultureInfo);
    }

    /// <summary>
    /// Returns the column as a double
    /// </summary>
    /// <param name="i">The index of the column.</param>
    /// <returns>double</returns>
Changes to readme.htm.
210
211
212
213
214
215
216

217
218
219
220
221
222
223
<p>
    <b>1.0.106.0 - October XX, 2017 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/draft/releaselog/3_21_0.html">SQLite 3.21.0</a>.</li>
    <li>Add full support for the native <a href="https://www.sqlite.org/sessionintro.html">session</a> extension.</li>
    <li>Add BindDecimalAsText and GetDecimalAsText connection flags to force binding and returning of decimal values as text. Pursuant to [b167206ad3].</li>

    <li>Add preliminary support for Visual Studio 2017 and the .NET Framework 4.7. This does <b>not</b> include support for the design-time components for Visual Studio, see [8292431f51].</li>
</ul>
<p>
    <b>1.0.105.2 - June 12, 2017</b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_19_3.html">SQLite 3.19.3</a>.</li>







>







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<p>
    <b>1.0.106.0 - October XX, 2017 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/draft/releaselog/3_21_0.html">SQLite 3.21.0</a>.</li>
    <li>Add full support for the native <a href="https://www.sqlite.org/sessionintro.html">session</a> extension.</li>
    <li>Add BindDecimalAsText and GetDecimalAsText connection flags to force binding and returning of decimal values as text. Pursuant to [b167206ad3].</li>
    <li>Add BindInvariantDecimal and GetInvariantDecimal connection flags, enabled by default, to force binding and returning of decimal values using the invariant culture. Pursuant to [b167206ad3].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Add preliminary support for Visual Studio 2017 and the .NET Framework 4.7. This does <b>not</b> include support for the design-time components for Visual Studio, see [8292431f51].</li>
</ul>
<p>
    <b>1.0.105.2 - June 12, 2017</b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_19_3.html">SQLite 3.19.3</a>.</li>
Changes to www/news.wiki.
47
48
49
50
51
52
53

54
55
56
57
58
59
60
<p>
    <b>1.0.106.0 - October XX, 2017 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/draft/releaselog/3_21_0.html|SQLite 3.21.0].</li>
    <li>Add full support for the native [https://www.sqlite.org/sessionintro.html|session] extension.</li>
    <li>Add BindDecimalAsText and GetDecimalAsText connection flags to force binding and returning of decimal values as text. Pursuant to [b167206ad3].</li>

    <li>Add preliminary support for Visual Studio 2017 and the .NET Framework 4.7. This does <b>not</b> include support for the design-time components for Visual Studio, see [8292431f51].</li>
</ul>
<p>
    <b>1.0.105.2 - June 12, 2017</b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_19_3.html|SQLite 3.19.3].</li>







>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<p>
    <b>1.0.106.0 - October XX, 2017 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/draft/releaselog/3_21_0.html|SQLite 3.21.0].</li>
    <li>Add full support for the native [https://www.sqlite.org/sessionintro.html|session] extension.</li>
    <li>Add BindDecimalAsText and GetDecimalAsText connection flags to force binding and returning of decimal values as text. Pursuant to [b167206ad3].</li>
    <li>Add BindInvariantDecimal and GetInvariantDecimal connection flags, enabled by default, to force binding and returning of decimal values using the invariant culture. Pursuant to [b167206ad3].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Add preliminary support for Visual Studio 2017 and the .NET Framework 4.7. This does <b>not</b> include support for the design-time components for Visual Studio, see [8292431f51].</li>
</ul>
<p>
    <b>1.0.105.2 - June 12, 2017</b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_19_3.html|SQLite 3.19.3].</li>