System.Data.SQLite
Check-in [044e580886]
Not logged in

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

Overview
Comment:Pass the original connection flags into the invoked parameter binding and data reader callbacks.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | customDataTypes
Files: files | file ages | folders
SHA1: 044e580886e91c58f7b47cf364eae0c60be6dfab
User & Date: mistachkin 2016-06-19 20:38:33
Context
2016-06-19
21:24
Further enhancements to the new test suite procedures. check-in: 3febc8dc31 user: mistachkin tags: customDataTypes
20:38
Pass the original connection flags into the invoked parameter binding and data reader callbacks. check-in: 044e580886 user: mistachkin tags: customDataTypes
20:28
When invoking a data reader callback, pass in the method name that was responsible for invoking it. check-in: 5bead76447 user: mistachkin tags: customDataTypes
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

448
449
450
451
452
453
454

455
456
457
458
459
460
461
...
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
    private void InvokeReadValueCallback(
        int index,
        SQLiteReadValueEventArgs eventArgs,
        out bool complete
        )
    {
        complete = false;

        _flags &= ~SQLiteConnectionFlags.UseConnectionReadValueCallbacks;

        try
        {
            string typeName = GetDataTypeName(index);

            if (typeName == null)
................................................................................

            if (callback == null)
                return;

            object userData = callbacks.ReadValueUserData;

            callback(
                _activeStatement._sql, this, _flags, eventArgs, typeName,
                index, userData, out complete); /* throw */
        }
        finally
        {
            _flags |= SQLiteConnectionFlags.UseConnectionReadValueCallbacks;
        }
    }







>







 







|







448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
...
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
    private void InvokeReadValueCallback(
        int index,
        SQLiteReadValueEventArgs eventArgs,
        out bool complete
        )
    {
        complete = false;
        SQLiteConnectionFlags oldFlags = _flags;
        _flags &= ~SQLiteConnectionFlags.UseConnectionReadValueCallbacks;

        try
        {
            string typeName = GetDataTypeName(index);

            if (typeName == null)
................................................................................

            if (callback == null)
                return;

            object userData = callbacks.ReadValueUserData;

            callback(
                _activeStatement._sql, this, oldFlags, eventArgs, typeName,
                index, userData, out complete); /* throw */
        }
        finally
        {
            _flags |= SQLiteConnectionFlags.UseConnectionReadValueCallbacks;
        }
    }

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

294
295
296
297
298
299
300

301
302
303
304
305
306
307
...
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
    private void InvokeBindValueCallback(
        int index,
        SQLiteParameter parameter,
        out bool complete
        )
    {
        complete = false;

        _flags &= ~SQLiteConnectionFlags.UseConnectionBindValueCallbacks;

        try
        {
            if (parameter == null)
                return;

................................................................................

            if (callback == null)
                return;

            object userData = callbacks.BindValueUserData;

            callback(
                _sql, _command, _flags, parameter, typeName, index,
                userData, out complete); /* throw */
        }
        finally
        {
            _flags |= SQLiteConnectionFlags.UseConnectionBindValueCallbacks;
        }
    }







>







 







|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
...
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
    private void InvokeBindValueCallback(
        int index,
        SQLiteParameter parameter,
        out bool complete
        )
    {
        complete = false;
        SQLiteConnectionFlags oldFlags = _flags;
        _flags &= ~SQLiteConnectionFlags.UseConnectionBindValueCallbacks;

        try
        {
            if (parameter == null)
                return;

................................................................................

            if (callback == null)
                return;

            object userData = callbacks.BindValueUserData;

            callback(
                _sql, _command, oldFlags, parameter, typeName, index,
                userData, out complete); /* throw */
        }
        finally
        {
            _flags |= SQLiteConnectionFlags.UseConnectionBindValueCallbacks;
        }
    }