System.Data.SQLite
Check-in [684f381cd4]
Not logged in

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

Overview
Comment:More minor performance enhancements. Pursuant to [e122d26e70].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1: 684f381cd4a940a1ce23be8e61a959ca40ec074f
User & Date: mistachkin 2014-09-30 14:03:00
Context
2014-10-06
22:38
Merge updates from trunk. check-in: 5fb0f836bd user: mistachkin tags: experimental
2014-09-30
14:03
More minor performance enhancements. Pursuant to [e122d26e70]. check-in: 684f381cd4 user: mistachkin tags: experimental
2014-09-26
04:01
Change the type of all '_version' fields to simply 'int' instead of 'long', which will hopefully result in a small speed increase. check-in: ffbc71c72b user: mistachkin tags: experimental
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

265
266
267
268
269
270
271
272


273
274
275
276
277
278
279
...
402
403
404
405
406
407
408
409
410

411
412
413
414
415
416
417

      if (_command == null)
        throw new InvalidOperationException("DataReader has been closed");

      if (_version == 0)
        throw new SQLiteException("Execution was aborted by the user");

      if (_command.Connection.State != ConnectionState.Open || _command.Connection._version != _version)


        throw new InvalidOperationException("Connection was closed, statement was terminated");
    }

    /// <summary>
    /// Throw an error if a row is not loaded
    /// </summary>
    private void CheckValidRow()
................................................................................
                if (typ == DbType.Byte) return affinity;
                if (typ == DbType.DateTime) return affinity;
                if (typ == DbType.Single) return affinity;
                if (typ == DbType.Double) return affinity;
                if (typ == DbType.Decimal) return affinity;
                break;
            case TypeAffinity.Double:
                if (typ == DbType.Single) return affinity;
                if (typ == DbType.Double) return affinity;

                if (typ == DbType.Decimal) return affinity;
                if (typ == DbType.DateTime) return affinity;
                break;
            case TypeAffinity.Text:
                if (typ == DbType.String) return affinity;
                if (typ == DbType.Guid) return affinity;
                if (typ == DbType.DateTime) return affinity;







|
>
>







 







<

>







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
...
404
405
406
407
408
409
410

411
412
413
414
415
416
417
418
419

      if (_command == null)
        throw new InvalidOperationException("DataReader has been closed");

      if (_version == 0)
        throw new SQLiteException("Execution was aborted by the user");

      SQLiteConnection connection = _command.Connection;

      if (connection._version != _version || connection.State != ConnectionState.Open)
        throw new InvalidOperationException("Connection was closed, statement was terminated");
    }

    /// <summary>
    /// Throw an error if a row is not loaded
    /// </summary>
    private void CheckValidRow()
................................................................................
                if (typ == DbType.Byte) return affinity;
                if (typ == DbType.DateTime) return affinity;
                if (typ == DbType.Single) return affinity;
                if (typ == DbType.Double) return affinity;
                if (typ == DbType.Decimal) return affinity;
                break;
            case TypeAffinity.Double:

                if (typ == DbType.Double) return affinity;
                if (typ == DbType.Single) return affinity;
                if (typ == DbType.Decimal) return affinity;
                if (typ == DbType.DateTime) return affinity;
                break;
            case TypeAffinity.Text:
                if (typ == DbType.String) return affinity;
                if (typ == DbType.Guid) return affinity;
                if (typ == DbType.DateTime) return affinity;