System.Data.SQLite

Check-in [837870c7bb]
Login

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

Overview
Comment:Rename MapTextToAffinity connection flag to DetectTextAffinity. Update version history docs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tkt-3c00ec5b52
Files: files | file ages | folders
SHA1: 837870c7bbe470d3a3c90d95d2c2a9351025c56a
User & Date: mistachkin 2014-05-26 20:56:29.074
Context
2014-05-26
22:51
Merge updates from trunk. check-in: ce61807139 user: mistachkin tags: tkt-3c00ec5b52
20:56
Rename MapTextToAffinity connection flag to DetectTextAffinity. Update version history docs. check-in: 837870c7bb user: mistachkin tags: tkt-3c00ec5b52
20:36
Merge updates from trunk. check-in: 99904a25b4 user: mistachkin tags: tkt-3c00ec5b52
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.93.0 - June XX, 2014 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_4_3.html">SQLite 3.8.4.3</a>.</li>
      <li>Add support for mapping transaction isolation levels to their legacy default values. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/56b42d99c1">[56b42d99c1]</a>.</li>
      <li>Add support for setting the default DbType and type name used for mappings on a per-connection basis. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/3c00ec5b52">[3c00ec5b52]</a>.</li>

      <li>Add SetChunkSize method to the SQLiteConnection class. Pursuant to [d1c008fa0a].</li>
      <li>Make the ISQLiteSchemaExtensions interface public.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Have the SQLiteProviderFactory class (in the System.Data.SQLite.Linq assembly) implement the IServiceProvider interface.</li>
      <li>Fix bug in documentation generator automation that prevented some internal documentation links from working.</li>
    </ul>
    <p><b>1.0.92.0 - March 19, 2014</p>
    <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.93.0 - June XX, 2014 <font color="red">(release scheduled)</font></b></p>
    <ul>
      <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_4_3.html">SQLite 3.8.4.3</a>.</li>
      <li>Add support for mapping transaction isolation levels to their legacy default values. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/56b42d99c1">[56b42d99c1]</a>.</li>
      <li>Add support for setting the default DbType and type name used for mappings on a per-connection basis. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/3c00ec5b52">[3c00ec5b52]</a>.</li>
      <li>Add DetectTextAffinity connection flag to enable automatic detection of column affinities, when necessary. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/3c00ec5b52">[3c00ec5b52]</a>.</li>
      <li>Add SetChunkSize method to the SQLiteConnection class. Pursuant to [d1c008fa0a].</li>
      <li>Make the ISQLiteSchemaExtensions interface public.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Have the SQLiteProviderFactory class (in the System.Data.SQLite.Linq assembly) implement the IServiceProvider interface.</li>
      <li>Fix bug in documentation generator automation that prevented some internal documentation links from working.</li>
    </ul>
    <p><b>1.0.92.0 - March 19, 2014</p>
    <ul>
Changes to System.Data.SQLite/SQLiteBase.cs.
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
      /// <summary>
      /// Enable mapping of unsupported transaction isolation levels to the
      /// closest supported transaction isolation level.
      /// </summary>
      MapIsolationLevels = 0x1000000,

      /// <summary>
      /// When returning column values, attempt to map textual values
      /// onto fully conforming values of
      /// <see cref="TypeAffinity.Null" />,
      /// <see cref="TypeAffinity.Int64" />,
      /// <see cref="TypeAffinity.Double" />,
      /// or <see cref="TypeAffinity.DateTime" />.
      /// </summary>
      MapTextToAffinity = 0x2000000,

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







|
|



|

|







1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
      /// <summary>
      /// Enable mapping of unsupported transaction isolation levels to the
      /// closest supported transaction isolation level.
      /// </summary>
      MapIsolationLevels = 0x1000000,

      /// <summary>
      /// When returning column values, attempt to detect the affinity of
      /// textual values to see if they fully conform to those of the
      /// <see cref="TypeAffinity.Null" />,
      /// <see cref="TypeAffinity.Int64" />,
      /// <see cref="TypeAffinity.Double" />,
      /// or <see cref="TypeAffinity.DateTime" /> types.
      /// </summary>
      DetectTextAffinity = 0x2000000,

      /// <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.
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147

      if (i >= VisibleFieldCount && _keyInfo != null)
        return _keyInfo.GetValue(i - VisibleFieldCount);

      SQLiteConnectionFlags flags = SQLiteCommand.GetFlags(_command);
      SQLiteType typ = GetSQLiteType(flags, i);

      if (((flags & SQLiteConnectionFlags.MapTextToAffinity) == SQLiteConnectionFlags.MapTextToAffinity) &&
          (typ != null) && (typ.Affinity == TypeAffinity.Text))
      {
          typ = GetSQLiteType(
              typ, _activeStatement._sql.GetText(_activeStatement, i));
      }

      return _activeStatement._sql.GetValue(_activeStatement, flags, i, typ);
    }







|
|







1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147

      if (i >= VisibleFieldCount && _keyInfo != null)
        return _keyInfo.GetValue(i - VisibleFieldCount);

      SQLiteConnectionFlags flags = SQLiteCommand.GetFlags(_command);
      SQLiteType typ = GetSQLiteType(flags, i);

      if (((flags & SQLiteConnectionFlags.DetectTextAffinity) == SQLiteConnectionFlags.DetectTextAffinity) &&
          ((typ == null) || (typ.Affinity == TypeAffinity.Text)))
      {
          typ = GetSQLiteType(
              typ, _activeStatement._sql.GetText(_activeStatement, i));
      }

      return _activeStatement._sql.GetValue(_activeStatement, flags, i, typ);
    }
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
    /// <param name="text">
    /// The textual value of the column for a given row.
    /// </param>
    /// <returns>
    /// The SQLiteType structure.
    /// </returns>
    private SQLiteType GetSQLiteType(
        SQLiteType oldType,
        string text
        )
    {
        if (SQLiteConvert.LooksLikeNull(text))
            return new SQLiteType(TypeAffinity.Null, DbType.Object);

        if (SQLiteConvert.LooksLikeInt64(text))







|







1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
    /// <param name="text">
    /// The textual value of the column for a given row.
    /// </param>
    /// <returns>
    /// The SQLiteType structure.
    /// </returns>
    private SQLiteType GetSQLiteType(
        SQLiteType oldType, /* PASS-THROUGH */
        string text
        )
    {
        if (SQLiteConvert.LooksLikeNull(text))
            return new SQLiteType(TypeAffinity.Null, DbType.Object);

        if (SQLiteConvert.LooksLikeInt64(text))
Changes to readme.htm.
211
212
213
214
215
216
217

218
219
220
221
222
223
224
<p>
    <b>1.0.93.0 - June XX, 2014 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_4_3.html">SQLite 3.8.4.3</a>.</li>
    <li>Add support for mapping transaction isolation levels to their legacy default values. Pursuant to [56b42d99c1].</li>
    <li>Add support for setting the default DbType and type name used for mappings on a per-connection basis. Pursuant to [3c00ec5b52].</li>

    <li>Add SetChunkSize method to the SQLiteConnection class. Pursuant to [d1c008fa0a].</li>
    <li>Make the ISQLiteSchemaExtensions interface public.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Have the SQLiteProviderFactory class (in the System.Data.SQLite.Linq assembly) implement the IServiceProvider interface.</li>
    <li>Fix bug in documentation generator automation that prevented some internal documentation links from working.</li>
</ul>
<p>
    <b>1.0.92.0 - March 19, 2014</b>







>







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<p>
    <b>1.0.93.0 - June XX, 2014 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_4_3.html">SQLite 3.8.4.3</a>.</li>
    <li>Add support for mapping transaction isolation levels to their legacy default values. Pursuant to [56b42d99c1].</li>
    <li>Add support for setting the default DbType and type name used for mappings on a per-connection basis. Pursuant to [3c00ec5b52].</li>
    <li>Add DetectTextAffinity connection flag to enable automatic detection of column affinities, when necessary. Pursuant to [3c00ec5b52].</li>
    <li>Add SetChunkSize method to the SQLiteConnection class. Pursuant to [d1c008fa0a].</li>
    <li>Make the ISQLiteSchemaExtensions interface public.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Have the SQLiteProviderFactory class (in the System.Data.SQLite.Linq assembly) implement the IServiceProvider interface.</li>
    <li>Fix bug in documentation generator automation that prevented some internal documentation links from working.</li>
</ul>
<p>
    <b>1.0.92.0 - March 19, 2014</b>
Changes to www/news.wiki.
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
<title>News</title>

<b>Version History</b>

<p>
    <b>1.0.93.0 - June XX, 2014 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_4_3.html">SQLite 3.8.4.3</a>.</li>
    <li>Add support for mapping transaction isolation levels to their legacy default values. Pursuant to [56b42d99c1].</li>
    <li>Add support for setting the default DbType and type name used for mappings on a per-connection basis. Pursuant to [3c00ec5b52].</li>

    <li>Add SetChunkSize method to the SQLiteConnection class. Pursuant to [d1c008fa0a].</li>
    <li>Make the ISQLiteSchemaExtensions interface public.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Have the SQLiteProviderFactory class (in the System.Data.SQLite.Linq assembly) implement the IServiceProvider interface.</li>
    <li>Fix bug in documentation generator automation that prevented some internal documentation links from working.</li>
</ul>
<p>
    <b>1.0.92.0 - March 19, 2014</b>











>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<title>News</title>

<b>Version History</b>

<p>
    <b>1.0.93.0 - June XX, 2014 <font color="red">(release scheduled)</font></b>
</p>
<ul>
    <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_4_3.html">SQLite 3.8.4.3</a>.</li>
    <li>Add support for mapping transaction isolation levels to their legacy default values. Pursuant to [56b42d99c1].</li>
    <li>Add support for setting the default DbType and type name used for mappings on a per-connection basis. Pursuant to [3c00ec5b52].</li>
    <li>Add DetectTextAffinity connection flag to enable automatic detection of column affinities, when necessary. Pursuant to [3c00ec5b52].</li>
    <li>Add SetChunkSize method to the SQLiteConnection class. Pursuant to [d1c008fa0a].</li>
    <li>Make the ISQLiteSchemaExtensions interface public.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Have the SQLiteProviderFactory class (in the System.Data.SQLite.Linq assembly) implement the IServiceProvider interface.</li>
    <li>Fix bug in documentation generator automation that prevented some internal documentation links from working.</li>
</ul>
<p>
    <b>1.0.92.0 - March 19, 2014</b>