Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add support for the sqlite3changeset_start_v2() and sqlite3changeset_start_v2_strm() interfaces. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
291cfeef7e0b0712c1889bb9739b6123 |
User & Date: | mistachkin 2018-12-24 03:14:03.155 |
Context
2019-01-04
| ||
19:52 | Update the VsWhere tool in externals to the 2.5.9 release. check-in: be3816073e user: mistachkin tags: trunk | |
2018-12-24
| ||
03:14 | Add support for the sqlite3changeset_start_v2() and sqlite3changeset_start_v2_strm() interfaces. check-in: 291cfeef7e user: mistachkin tags: trunk | |
2018-12-23
| ||
18:32 | Use the EventArg connection string for debug tracing. check-in: 4e730fa902 user: mistachkin tags: trunk | |
Changes
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.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b></p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li> <li>Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/23d8d6171e">[23d8d6171e]</a>.</li> <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/e36e05e299">[e36e05e299]</a>.</li> </ul> <p><b>1.0.109.0 - August 15, 2018</b></p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li> <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li> <li>Do not attempt to initialize the logging subsystem more than once. <b>** Potentially Incompatible Change **</b></li> <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for <a href="https://system.data.sqlite.org/index.html/info/baf42ee135">[baf42ee135]</a>.</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.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b></p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li> <li>Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/23d8d6171e">[23d8d6171e]</a>.</li> <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/e36e05e299">[e36e05e299]</a>.</li> <li>Add support for the <a href="https://www.sqlite.org/session/c_changesetstart_invert.html">sqlite3changeset_start_v2()</a> and <a href="https://www.sqlite.org/session/c_changesetstart_invert.html">sqlite3changeset_start_v2_strm()</a> interfaces.</li> </ul> <p><b>1.0.109.0 - August 15, 2018</b></p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li> <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li> <li>Do not attempt to initialize the logging subsystem more than once. <b>** Potentially Incompatible Change **</b></li> <li>Prevent GetSchemaTable from throwing InvalidCastException. Fix for <a href="https://system.data.sqlite.org/index.html/info/baf42ee135">[baf42ee135]</a>.</li> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 | byte[] rawData ) { CheckDisposed(); return new SQLiteMemoryChangeSet(rawData, GetNativeHandle(this), _flags); } /// <summary> /// Attempts to create a new <see cref="ISQLiteChangeSet" /> object instance /// using this connection and the specified stream. /// </summary> /// <param name="inputStream"> /// The stream where the raw data that contains a change set (or patch set) | > > > > > > > > > > > > > > > > > > > > > > > | 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 | byte[] rawData ) { CheckDisposed(); return new SQLiteMemoryChangeSet(rawData, GetNativeHandle(this), _flags); } /// <summary> /// Attempts to create a new <see cref="ISQLiteChangeSet" /> object instance /// using this connection and the specified raw data. /// </summary> /// <param name="rawData"> /// The raw data that contains a change set (or patch set). /// </param> /// <param name="flags"> /// The flags used to create the change set iterator. /// </param> /// <returns> /// The newly created change set -OR- null if it cannot be created. /// </returns> public ISQLiteChangeSet CreateChangeSet( byte[] rawData, SQLiteChangeSetStartFlags flags ) { CheckDisposed(); return new SQLiteMemoryChangeSet(rawData, GetNativeHandle(this), _flags, flags); } /// <summary> /// Attempts to create a new <see cref="ISQLiteChangeSet" /> object instance /// using this connection and the specified stream. /// </summary> /// <param name="inputStream"> /// The stream where the raw data that contains a change set (or patch set) |
︙ | ︙ | |||
3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 | ) { CheckDisposed(); return new SQLiteStreamChangeSet( inputStream, outputStream, GetNativeHandle(this), _flags); } /// <summary> /// Attempts to create a new <see cref="ISQLiteChangeGroup" /> object /// instance using this connection. /// </summary> /// <returns> /// The newly created change group -OR- null if it cannot be created. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 | ) { CheckDisposed(); return new SQLiteStreamChangeSet( inputStream, outputStream, GetNativeHandle(this), _flags); } /// <summary> /// Attempts to create a new <see cref="ISQLiteChangeSet" /> object instance /// using this connection and the specified stream. /// </summary> /// <param name="inputStream"> /// The stream where the raw data that contains a change set (or patch set) /// may be read. /// </param> /// <param name="outputStream"> /// The stream where the raw data that contains a change set (or patch set) /// may be written. /// </param> /// <param name="flags"> /// The flags used to create the change set iterator. /// </param> /// <returns> /// The newly created change set -OR- null if it cannot be created. /// </returns> public ISQLiteChangeSet CreateChangeSet( Stream inputStream, Stream outputStream, SQLiteChangeSetStartFlags flags ) { CheckDisposed(); return new SQLiteStreamChangeSet( inputStream, outputStream, GetNativeHandle(this), _flags, flags); } /// <summary> /// Attempts to create a new <see cref="ISQLiteChangeGroup" /> object /// instance using this connection. /// </summary> /// <returns> /// The newly created change group -OR- null if it cannot be created. |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteSession.cs.
︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 136 137 138 | /// back and the call to /// <see cref="ISQLiteChangeSet.Apply(SessionConflictCallback,SessionTableFilterCallback,object)" /> /// will raise a <see cref="SQLiteException" /> with an error code of /// <see cref="SQLiteErrorCode.Abort" />. /// </summary> Abort = 2 } #endregion /////////////////////////////////////////////////////////////////////////// #region Session Extension Delegates /// <summary> /// This callback is invoked when a determination must be made about | > > > > > > > > > > > > > > > > > > > > > > > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /// back and the call to /// <see cref="ISQLiteChangeSet.Apply(SessionConflictCallback,SessionTableFilterCallback,object)" /> /// will raise a <see cref="SQLiteException" /> with an error code of /// <see cref="SQLiteErrorCode.Abort" />. /// </summary> Abort = 2 } /////////////////////////////////////////////////////////////////////////// /// <summary> /// This enumerated type represents possible flags that may be passed /// to the appropriate overloads of various change set creation methods. /// </summary> public enum SQLiteChangeSetStartFlags { /// <summary> /// No special handling. /// </summary> None = 0x0, /// <summary> /// Invert the change set while iterating through it. /// This is equivalent to inverting a change set using /// <see cref="ISQLiteChangeSet.Invert" /> before /// applying it. It is an error to specify this flag /// with a patch set. /// </summary> Invert = 0x2 } #endregion /////////////////////////////////////////////////////////////////////////// #region Session Extension Delegates /// <summary> /// This callback is invoked when a determination must be made about |
︙ | ︙ | |||
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 | pData = IntPtr.Zero; } } } return result; } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members /// <summary> /// Non-zero if this object instance has been disposed. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 | pData = IntPtr.Zero; } } } return result; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Attempts to create an instance of this class using the specified /// raw byte data. /// </summary> /// <param name="rawData"> /// The raw byte data containing the set of changes for this native /// iterator. /// </param> /// <param name="flags"> /// The flags used to create the change set iterator. /// </param> /// <returns> /// The new instance of this class -OR- null if it cannot be created. /// </returns> public static SQLiteMemoryChangeSetIterator Create( byte[] rawData, SQLiteChangeSetStartFlags flags ) { SQLiteSessionHelpers.CheckRawData(rawData); SQLiteMemoryChangeSetIterator result = null; IntPtr pData = IntPtr.Zero; IntPtr iterator = IntPtr.Zero; try { int nData = 0; pData = SQLiteBytes.ToIntPtr(rawData, ref nData); if (pData == IntPtr.Zero) throw new SQLiteException(SQLiteErrorCode.NoMem, null); SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3changeset_start_v2( ref iterator, nData, pData, flags); if (rc != SQLiteErrorCode.Ok) throw new SQLiteException(rc, "sqlite3changeset_start_v2"); result = new SQLiteMemoryChangeSetIterator( pData, iterator, true); } finally { if (result == null) { if (iterator != IntPtr.Zero) { UnsafeNativeMethods.sqlite3changeset_finalize( iterator); iterator = IntPtr.Zero; } if (pData != IntPtr.Zero) { SQLiteMemory.Free(pData); pData = IntPtr.Zero; } } } return result; } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members /// <summary> /// Non-zero if this object instance has been disposed. |
︙ | ︙ | |||
1471 1472 1473 1474 1475 1476 1477 | /// Attempts to create an instance of this class using the specified /// <see cref="Stream" />. /// </summary> /// <param name="stream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > | > | | | > | | 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | /// Attempts to create an instance of this class using the specified /// <see cref="Stream" />. /// </summary> /// <param name="stream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> /// <param name="connectionFlags"> /// The flags associated with the parent connection. /// </param> /// <returns> /// The new instance of this class -OR- null if it cannot be created. /// </returns> public static SQLiteStreamChangeSetIterator Create( Stream stream, SQLiteConnectionFlags connectionFlags ) { if (stream == null) throw new ArgumentNullException("stream"); SQLiteStreamAdapter streamAdapter = null; SQLiteStreamChangeSetIterator result = null; IntPtr iterator = IntPtr.Zero; try { streamAdapter = new SQLiteStreamAdapter(stream, connectionFlags); SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3changeset_start_strm( ref iterator, streamAdapter.GetInputDelegate(), IntPtr.Zero); if (rc != SQLiteErrorCode.Ok) { throw new SQLiteException( rc, "sqlite3changeset_start_strm"); } result = new SQLiteStreamChangeSetIterator( streamAdapter, iterator, true); } finally { if (result == null) { if (iterator != IntPtr.Zero) { UnsafeNativeMethods.sqlite3changeset_finalize( iterator); iterator = IntPtr.Zero; } if (streamAdapter != null) { streamAdapter.Dispose(); streamAdapter = null; } } } return result; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Attempts to create an instance of this class using the specified /// <see cref="Stream" />. /// </summary> /// <param name="stream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> /// <param name="connectionFlags"> /// The flags associated with the parent connection. /// </param> /// <param name="startFlags"> /// The flags used to create the change set iterator. /// </param> /// <returns> /// The new instance of this class -OR- null if it cannot be created. /// </returns> public static SQLiteStreamChangeSetIterator Create( Stream stream, SQLiteConnectionFlags connectionFlags, SQLiteChangeSetStartFlags startFlags ) { if (stream == null) throw new ArgumentNullException("stream"); SQLiteStreamAdapter streamAdapter = null; SQLiteStreamChangeSetIterator result = null; IntPtr iterator = IntPtr.Zero; try { streamAdapter = new SQLiteStreamAdapter(stream, connectionFlags); SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3changeset_start_v2_strm( ref iterator, streamAdapter.GetInputDelegate(), IntPtr.Zero, startFlags); if (rc != SQLiteErrorCode.Ok) { throw new SQLiteException( rc, "sqlite3changeset_start_v2_strm"); } result = new SQLiteStreamChangeSetIterator( streamAdapter, iterator, true); } finally { |
︙ | ︙ | |||
3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 | /// <summary> /// The raw byte data for this set of changes. Since this data must /// be marshalled to a native memory buffer before being used, there /// must be enough memory available to store at least two times the /// amount of data contained within it. /// </summary> private byte[] rawData; #endregion /////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified raw byte /// data and wrapped native connection handle. /// </summary> /// <param name="rawData"> /// The raw byte data for the specified change set (or patch set). /// </param> /// <param name="handle"> /// The wrapped native connection handle to be associated with this /// set of changes. /// </param> | > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > | > | > | 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 | /// <summary> /// The raw byte data for this set of changes. Since this data must /// be marshalled to a native memory buffer before being used, there /// must be enough memory available to store at least two times the /// amount of data contained within it. /// </summary> private byte[] rawData; /// <summary> /// The flags used to create the change set iterator. /// </summary> private SQLiteChangeSetStartFlags startFlags; #endregion /////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified raw byte /// data and wrapped native connection handle. /// </summary> /// <param name="rawData"> /// The raw byte data for the specified change set (or patch set). /// </param> /// <param name="handle"> /// The wrapped native connection handle to be associated with this /// set of changes. /// </param> /// <param name="connectionFlags"> /// The flags associated with the connection represented by the /// <paramref name="handle" /> value. /// </param> internal SQLiteMemoryChangeSet( byte[] rawData, SQLiteConnectionHandle handle, SQLiteConnectionFlags connectionFlags ) : base(handle, connectionFlags) { this.rawData = rawData; this.startFlags = SQLiteChangeSetStartFlags.None; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Constructs an instance of this class using the specified raw byte /// data and wrapped native connection handle. /// </summary> /// <param name="rawData"> /// The raw byte data for the specified change set (or patch set). /// </param> /// <param name="handle"> /// The wrapped native connection handle to be associated with this /// set of changes. /// </param> /// <param name="connectionFlags"> /// The flags associated with the connection represented by the /// <paramref name="handle" /> value. /// </param> /// <param name="startFlags"> /// The flags used to create the change set iterator. /// </param> internal SQLiteMemoryChangeSet( byte[] rawData, SQLiteConnectionHandle handle, SQLiteConnectionFlags connectionFlags, SQLiteChangeSetStartFlags startFlags ) : base(handle, connectionFlags) { this.rawData = rawData; this.startFlags = startFlags; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteChangeSet Members /// <summary> |
︙ | ︙ | |||
3810 3811 3812 3813 3814 3815 3816 | /// </summary> /// <returns> /// The new <see cref="IEnumerator{ISQLiteChangeSetMetadataItem}" /> /// instance. /// </returns> public IEnumerator<ISQLiteChangeSetMetadataItem> GetEnumerator() { | > > > > > > > | > | 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 | /// </summary> /// <returns> /// The new <see cref="IEnumerator{ISQLiteChangeSetMetadataItem}" /> /// instance. /// </returns> public IEnumerator<ISQLiteChangeSetMetadataItem> GetEnumerator() { if (startFlags != SQLiteChangeSetStartFlags.None) { return new SQLiteMemoryChangeSetEnumerator( rawData, startFlags); } else { return new SQLiteMemoryChangeSetEnumerator(rawData); } } #endregion /////////////////////////////////////////////////////////////////////// #region IEnumerable Members /// <summary> |
︙ | ︙ | |||
3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 | /// <summary> /// The <see cref="Stream" /> instance used as the backing store for /// the set of changes generated by the <see cref="Invert" /> or /// <see cref="CombineWith" /> methods. /// </summary> private Stream outputStream; #endregion /////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified streams | > > > > > | 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 | /// <summary> /// The <see cref="Stream" /> instance used as the backing store for /// the set of changes generated by the <see cref="Invert" /> or /// <see cref="CombineWith" /> methods. /// </summary> private Stream outputStream; /// <summary> /// The flags used to create the change set iterator. /// </summary> private SQLiteChangeSetStartFlags startFlags; #endregion /////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified streams |
︙ | ︙ | |||
3955 3956 3957 3958 3959 3960 3961 | /// The <see cref="Stream" /> where the raw byte data for resulting /// sets of changes may be written. /// </param> /// <param name="handle"> /// The wrapped native connection handle to be associated with this /// set of changes. /// </param> | > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > | > | > | 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 | /// The <see cref="Stream" /> where the raw byte data for resulting /// sets of changes may be written. /// </param> /// <param name="handle"> /// The wrapped native connection handle to be associated with this /// set of changes. /// </param> /// <param name="connectionFlags"> /// The flags associated with the connection represented by the /// <paramref name="handle" /> value. /// </param> internal SQLiteStreamChangeSet( Stream inputStream, Stream outputStream, SQLiteConnectionHandle handle, SQLiteConnectionFlags connectionFlags ) : base(handle, connectionFlags) { this.inputStream = inputStream; this.outputStream = outputStream; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Constructs an instance of this class using the specified streams /// and wrapped native connection handle. /// </summary> /// <param name="inputStream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> /// <param name="outputStream"> /// The <see cref="Stream" /> where the raw byte data for resulting /// sets of changes may be written. /// </param> /// <param name="handle"> /// The wrapped native connection handle to be associated with this /// set of changes. /// </param> /// <param name="connectionFlags"> /// The flags associated with the connection represented by the /// <paramref name="handle" /> value. /// </param> /// <param name="startFlags"> /// The flags used to create the change set iterator. /// </param> internal SQLiteStreamChangeSet( Stream inputStream, Stream outputStream, SQLiteConnectionHandle handle, SQLiteConnectionFlags connectionFlags, SQLiteChangeSetStartFlags startFlags ) : base(handle, connectionFlags) { this.inputStream = inputStream; this.outputStream = outputStream; this.startFlags = startFlags; } #endregion /////////////////////////////////////////////////////////////////////// #region Private Methods /// <summary> |
︙ | ︙ | |||
4181 4182 4183 4184 4185 4186 4187 | /// </summary> /// <returns> /// The new <see cref="IEnumerator{ISQLiteChangeSetMetadataItem}" /> /// instance. /// </returns> public IEnumerator<ISQLiteChangeSetMetadataItem> GetEnumerator() { | > > | > > > > > | > | 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 | /// </summary> /// <returns> /// The new <see cref="IEnumerator{ISQLiteChangeSetMetadataItem}" /> /// instance. /// </returns> public IEnumerator<ISQLiteChangeSetMetadataItem> GetEnumerator() { if (startFlags != SQLiteChangeSetStartFlags.None) { return new SQLiteStreamChangeSetEnumerator( inputStream, GetFlags(), startFlags); } else { return new SQLiteStreamChangeSetEnumerator( inputStream, GetFlags()); } } #endregion /////////////////////////////////////////////////////////////////////// #region IEnumerable Members /// <summary> |
︙ | ︙ | |||
4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 | /// <summary> /// The raw byte data for this set of changes. Since this data must /// be marshalled to a native memory buffer before being used, there /// must be enough memory available to store at least two times the /// amount of data contained within it. /// </summary> private byte[] rawData; #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class using the specified raw byte /// data. /// </summary> /// <param name="rawData"> /// The raw byte data containing the set of changes for this /// enumerator. /// </param> public SQLiteMemoryChangeSetEnumerator( byte[] rawData ) : base(SQLiteMemoryChangeSetIterator.Create(rawData)) { this.rawData = rawData; } #endregion /////////////////////////////////////////////////////////////////////// #region IEnumerator Overrides /// <summary> /// Resets the enumerator to its initial position. /// </summary> public override void Reset() { CheckDisposed(); | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > | 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 | /// <summary> /// The raw byte data for this set of changes. Since this data must /// be marshalled to a native memory buffer before being used, there /// must be enough memory available to store at least two times the /// amount of data contained within it. /// </summary> private byte[] rawData; /// <summary> /// The flags used to create the change set iterator. /// </summary> private SQLiteChangeSetStartFlags flags; #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class using the specified raw byte /// data. /// </summary> /// <param name="rawData"> /// The raw byte data containing the set of changes for this /// enumerator. /// </param> public SQLiteMemoryChangeSetEnumerator( byte[] rawData ) : base(SQLiteMemoryChangeSetIterator.Create(rawData)) { this.rawData = rawData; this.flags = SQLiteChangeSetStartFlags.None; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Constructs an instance of this class using the specified raw byte /// data. /// </summary> /// <param name="rawData"> /// The raw byte data containing the set of changes for this /// enumerator. /// </param> /// <param name="flags"> /// The flags used to create the change set iterator. /// </param> public SQLiteMemoryChangeSetEnumerator( byte[] rawData, SQLiteChangeSetStartFlags flags ) : base(SQLiteMemoryChangeSetIterator.Create(rawData, flags)) { this.rawData = rawData; this.flags = flags; } #endregion /////////////////////////////////////////////////////////////////////// #region IEnumerator Overrides /// <summary> /// Resets the enumerator to its initial position. /// </summary> public override void Reset() { CheckDisposed(); SQLiteMemoryChangeSetIterator result; if (flags != SQLiteChangeSetStartFlags.None) result = SQLiteMemoryChangeSetIterator.Create(rawData, flags); else result = SQLiteMemoryChangeSetIterator.Create(rawData); ResetIterator(result); } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members /// <summary> |
︙ | ︙ | |||
4675 4676 4677 4678 4679 4680 4681 | /// <summary> /// Constructs an instance of this class using the specified stream. /// </summary> /// <param name="stream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> | > > > > > > > > > > > > > > > > > > | > > > > > > > | > | > | 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 | /// <summary> /// Constructs an instance of this class using the specified stream. /// </summary> /// <param name="stream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> /// <param name="connectionFlags"> /// The flags associated with the parent connection. /// </param> public SQLiteStreamChangeSetEnumerator( Stream stream, SQLiteConnectionFlags connectionFlags ) : base(SQLiteStreamChangeSetIterator.Create( stream, connectionFlags)) { // do nothing. } /////////////////////////////////////////////////////////////////////// /// <summary> /// Constructs an instance of this class using the specified stream. /// </summary> /// <param name="stream"> /// The <see cref="Stream" /> where the raw byte data for the set of /// changes may be read. /// </param> /// <param name="connectionFlags"> /// The flags associated with the parent connection. /// </param> /// <param name="startFlags"> /// The flags used to create the change set iterator. /// </param> public SQLiteStreamChangeSetEnumerator( Stream stream, SQLiteConnectionFlags connectionFlags, SQLiteChangeSetStartFlags startFlags ) : base(SQLiteStreamChangeSetIterator.Create( stream, connectionFlags, startFlags)) { // do nothing. } #endregion /////////////////////////////////////////////////////////////////////// |
︙ | ︙ |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | ︙ | |||
4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 | [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_start(ref IntPtr iterator, int nChangeSet, IntPtr pChangeSet); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_next(IntPtr iterator); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else | > > > > > > > | 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 | [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_start(ref IntPtr iterator, int nChangeSet, IntPtr pChangeSet); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_start_v2(ref IntPtr iterator, int nChangeSet, IntPtr pChangeSet, SQLiteChangeSetStartFlags flags); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_next(IntPtr iterator); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else |
︙ | ︙ | |||
4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_start_strm(ref IntPtr iterator, xSessionInput xInput, IntPtr pIn); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3session_changeset_strm(IntPtr session, xSessionOutput xOutput, IntPtr pOut); | > > > > > > > | 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_start_strm(ref IntPtr iterator, xSessionInput xInput, IntPtr pIn); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3changeset_start_v2_strm(ref IntPtr iterator, xSessionInput xInput, IntPtr pIn, SQLiteChangeSetStartFlags flags); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3session_changeset_strm(IntPtr session, xSessionOutput xOutput, IntPtr pOut); |
︙ | ︙ |
Changes to Tests/session.eagle.
︙ | ︙ | |||
104 105 106 107 108 109 110 | return [object invoke -flags +NonPublic \ System.Data.SQLite.HelperMethods ToDisplayString $value] } } ############################################################################### | | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | return [object invoke -flags +NonPublic \ System.Data.SQLite.HelperMethods ToDisplayString $value] } } ############################################################################### proc createMemoryChangeSetForConnection { connection rawData flags } { if {[isObjectHandle $connection] && $connection ne "null"} then { return [$connection -alias CreateChangeSet $rawData $flags] } return null } ############################################################################### |
︙ | ︙ | |||
152 153 154 155 156 157 158 | return false } ############################################################################### proc openStreamChangeSetForConnection { | | | > | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | return false } ############################################################################### proc openStreamChangeSetForConnection { connection inputFileName outputFileName flags {varName ""} } { if {[isObjectHandle $connection] && $connection ne "null"} then { if {[string length $varName] > 0} then { upvar 1 $varName state } if {[string length $inputFileName] > 0} then { set state(inputStream) [object create -alias \ System.IO.FileStream $inputFileName Open Read] } else { set state(inputStream) null } if {[string length $outputFileName] > 0} then { set state(outputStream) [object create -alias \ System.IO.FileStream $outputFileName Create Write] } else { set state(outputStream) null } set state(changeSet) [$connection -alias \ CreateChangeSet $state(inputStream) $state(outputStream) \ $flags] return true } return false } |
︙ | ︙ | |||
219 220 221 222 223 224 225 | } return false } ############################################################################### | | | | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | } return false } ############################################################################### proc changeSetFileToString { connection fileName flags includeValues } { set result [list] if {[isObjectHandle $connection] && $connection ne "null"} then { if {[openStreamChangeSetForConnection \ $connection $fileName "" $flags state]} then { return [changeSetToString $state(changeSet) $includeValues] } } return $result } |
︙ | ︙ | |||
287 288 289 290 291 292 293 | } return $result } ############################################################################### | | | | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | } return $result } ############################################################################### proc matchSession { connection session flags expr } { if {[isObjectHandle $session] && $session ne "null"} then { if {![$session IsEmpty]} then { set rawData [createMemoryChangeSetForObject $session] object removeref $rawData if {[isObjectHandle $rawData] && $rawData ne "null"} then { return [matchChangeSet [set changeSet \ [$connection -alias CreateChangeSet $rawData $flags]] $expr] } } } return false } |
︙ | ︙ | |||
507 508 509 510 511 512 513 | makeSomeChanges $db t1 [list insert update delete] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData writeRawDataToFile $fileName(1) $rawData writeStreamChangeSetForObject $session $fileName(2) | | | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | makeSomeChanges $db t1 [list insert update delete] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData writeRawDataToFile $fileName(1) $rawData writeStreamChangeSetForObject $session $fileName(2) openStreamChangeSetForConnection $connection $fileName(2) "" None state list [expr {[file size $fileName(1)] > 0}] \ [string equal [readFile $fileName(1)] [readFile $fileName(2)]] \ [changeSetToString $state(changeSet) true] } -cleanup { cleanupSomeText |
︙ | ︙ | |||
564 565 566 567 568 569 570 | makeSomeChanges $db t1 [list insert update delete] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ | | | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | makeSomeChanges $db t1 [list insert update delete] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ [createMemoryChangeSetForConnection $connection $rawData None] object removeref $changeSet(1) set changeSet(2) [$changeSet(1) -alias Invert] list [changeSetToString $changeSet(2) true] } -cleanup { |
︙ | ︙ | |||
626 627 628 629 630 631 632 | $session AttachTable null makeSomeChanges $db t1 [list insert update delete] writeStreamChangeSetForObject $session $fileName(1) openStreamChangeSetForConnection \ | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | $session AttachTable null makeSomeChanges $db t1 [list insert update delete] writeStreamChangeSetForObject $session $fileName(1) openStreamChangeSetForConnection \ $connection $fileName(1) $fileName(2) None state $state(changeSet) -alias Invert; unset state list [changeSetFileToString $connection $fileName(2) None true] } -cleanup { cleanupSomeText unset -nocomplain state byteArray session freeDbConnection unset -nocomplain connection cleanupFile $fileName(2) cleanupFile $fileName(1) cleanupDb $fileName(0) unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ defineConstant.System.Data.SQLite.INTEROP_SESSION_EXTENSION} -result \ {{{TableName t1 NumberOfColumns 2 OperationCode Insert Indirect False\ PrimaryKeyColumns {[True, False]} OldValue 0 <nullObject> NewValue 0 1\ ConflictValue 0 <nullObject> OldValue 1 <nullObject> NewValue 1 {"inserted:\ Alpha Bravo Charlie Delta Echo"} ConflictValue 1 <nullObject>} {TableName t1\ NumberOfColumns 2 OperationCode Update Indirect False PrimaryKeyColumns {[True,\ False]} OldValue 0 2 NewValue 0 <nullObject> ConflictValue 0 <nullObject>\ OldValue 1 {"updated: Uniform Victor Whiskey X-ray Yankee"} NewValue 1\ {"inserted: Foxtrot Golf Hotel India Juliet"} ConflictValue 1 <nullObject>}\ {TableName t1 NumberOfColumns 2 OperationCode Update Indirect False\ PrimaryKeyColumns {[True, False]} OldValue 0 3 NewValue 0 <nullObject>\ ConflictValue 0 <nullObject> OldValue 1 {"updated: Uniform Victor Whiskey X-ray\ Yankee"} NewValue 1 {"inserted: Kilo Lima Mike November Oscar"} ConflictValue 1\ <nullObject>} {TableName t1 NumberOfColumns 2 OperationCode Delete Indirect\ False PrimaryKeyColumns {[True, False]} OldValue 0 4 NewValue 0 <nullObject>\ ConflictValue 0 <nullObject> OldValue 1 {"inserted: Papa Quebec Romeo Sierra\ Tango"} NewValue 1 <nullObject> ConflictValue 1 <nullObject>}}}} ############################################################################### runTest {test session-1.2.3 {change set read/write/invert (memory)} -setup { setupDb [set fileName session-1.2.3.db] cleanupSomeText } -body { createTheSchema $db main makeSomeChanges $db t1 [list insert insert insert] set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null makeSomeChanges $db t1 [list insert update delete] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ [createMemoryChangeSetForConnection $connection $rawData Invert] object removeref $changeSet(1) list [changeSetToString $changeSet(1) true] } -cleanup { cleanupSomeText unset -nocomplain changeSet rawData byteArray session freeDbConnection unset -nocomplain connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ defineConstant.System.Data.SQLite.INTEROP_SESSION_EXTENSION} -result \ {{{TableName t1 NumberOfColumns 2 OperationCode Insert Indirect False\ PrimaryKeyColumns {[True, False]} OldValue 0 <nullObject> NewValue 0 1\ ConflictValue 0 <nullObject> OldValue 1 <nullObject> NewValue 1 {"inserted:\ Alpha Bravo Charlie Delta Echo"} ConflictValue 1 <nullObject>} {TableName t1\ NumberOfColumns 2 OperationCode Update Indirect False PrimaryKeyColumns {[True,\ False]} OldValue 0 2 NewValue 0 <nullObject> ConflictValue 0 <nullObject>\ OldValue 1 {"updated: Uniform Victor Whiskey X-ray Yankee"} NewValue 1\ {"inserted: Foxtrot Golf Hotel India Juliet"} ConflictValue 1 <nullObject>}\ {TableName t1 NumberOfColumns 2 OperationCode Update Indirect False\ PrimaryKeyColumns {[True, False]} OldValue 0 3 NewValue 0 <nullObject>\ ConflictValue 0 <nullObject> OldValue 1 {"updated: Uniform Victor Whiskey X-ray\ Yankee"} NewValue 1 {"inserted: Kilo Lima Mike November Oscar"} ConflictValue 1\ <nullObject>} {TableName t1 NumberOfColumns 2 OperationCode Delete Indirect\ False PrimaryKeyColumns {[True, False]} OldValue 0 4 NewValue 0 <nullObject>\ ConflictValue 0 <nullObject> OldValue 1 {"inserted: Papa Quebec Romeo Sierra\ Tango"} NewValue 1 <nullObject> ConflictValue 1 <nullObject>}}}} ############################################################################### runTest {test session-1.2.4 {change set read/write/invert (stream)} -setup { setupDb [set fileName(0) session-1.2.4.db] set fileName(1) [getChangeSetFileName 1] cleanupSomeText } -body { createTheSchema $db main makeSomeChanges $db t1 [list insert insert insert] set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null makeSomeChanges $db t1 [list insert update delete] writeStreamChangeSetForObject $session $fileName(1) list [changeSetFileToString $connection $fileName(1) Invert true] } -cleanup { cleanupSomeText unset -nocomplain state byteArray session freeDbConnection unset -nocomplain connection cleanupFile $fileName(1) cleanupDb $fileName(0) unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ |
︙ | ︙ | |||
704 705 706 707 708 709 710 | makeSomeChanges $db t1 [list insert] lappend result IsEmpty [$session IsEmpty] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ | | | 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | makeSomeChanges $db t1 [list insert] lappend result IsEmpty [$session IsEmpty] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ [createMemoryChangeSetForConnection $connection $rawData None] object removeref $changeSet(1) lappend result [changeSetToString $changeSet(1) false] } -cleanup { cleanupSomeText |
︙ | ︙ | |||
765 766 767 768 769 770 771 | makeSomeChanges $db t1 [list insert] lappend result IsEmpty [$session IsEmpty] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ | | | 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 | makeSomeChanges $db t1 [list insert] lappend result IsEmpty [$session IsEmpty] set rawData [createMemoryChangeSetForObject $session] object removeref $rawData set changeSet(1) \ [createMemoryChangeSetForConnection $connection $rawData None] object removeref $changeSet(1) lappend result [changeSetToString $changeSet(1) false] } -cleanup { cleanupSomeText |
︙ | ︙ | |||
810 811 812 813 814 815 816 | $session -marshalflags +DynamicCallback \ SetTableFilter tableFilterCallbackT1 null makeSomeChanges $db t2 [list insert] lappend result IsEmpty [$session IsEmpty] | | | | | | 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | $session -marshalflags +DynamicCallback \ SetTableFilter tableFilterCallbackT1 null makeSomeChanges $db t2 [list insert] lappend result IsEmpty [$session IsEmpty] lappend result MatchT2 [matchSession $connection $session None { [$item TableName] eq "t2" }] makeSomeChanges $db t1 [list insert] lappend result IsEmpty [$session IsEmpty] lappend result MatchT1 [matchSession $connection $session None { [$item TableName] eq "t1" }] $session SetTableFilter null null makeSomeChanges $db t2 [list insert] lappend result IsEmpty [$session IsEmpty] lappend result MatchT2 [matchSession $connection $session None { [$item TableName] eq "t2" }] makeSomeChanges $db t1 [list insert] lappend result IsEmpty [$session IsEmpty] lappend result MatchT1 [matchSession $connection $session None { [$item TableName] eq "t1" }] set result } -cleanup { cleanupSomeText |
︙ | ︙ | |||
887 888 889 890 891 892 893 | makeSomeChanges $db t1 [list insert] 1 set rawData(2) [captureChangeSetRawData $connection main null { makeSomeChanges $db t1 [list insert] }]; object removeref $rawData(2) set changeSet(1) \ | | | | 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | makeSomeChanges $db t1 [list insert] 1 set rawData(2) [captureChangeSetRawData $connection main null { makeSomeChanges $db t1 [list insert] }]; object removeref $rawData(2) set changeSet(1) \ [createMemoryChangeSetForConnection $connection $rawData(1) None] object removeref $changeSet(1) set changeSet(2) \ [createMemoryChangeSetForConnection $connection $rawData(2) None] object removeref $changeSet(2) set changeSet(3) [$changeSet(1) -alias CombineWith $changeSet(2)] $changeSet(3) -marshalflags +DynamicCallback \ Apply conflictCallback null |
︙ | ︙ | |||
965 966 967 968 969 970 971 | makeSomeChanges $db t1 [list insert] 1 captureChangeSetFile $connection main null { makeSomeChanges $db t1 [list insert] } $fileName(2) openStreamChangeSetForConnection \ | | | | | | 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 | makeSomeChanges $db t1 [list insert] 1 captureChangeSetFile $connection main null { makeSomeChanges $db t1 [list insert] } $fileName(2) openStreamChangeSetForConnection \ $connection $fileName(1) $fileName(3) None state1 openStreamChangeSetForConnection \ $connection $fileName(2) "" None state2 $state1(changeSet) CombineWith $state2(changeSet); unset state2 state1 openStreamChangeSetForConnection \ $connection $fileName(3) "" None state3 $state3(changeSet) -marshalflags +DynamicCallback \ Apply conflictCallback null; unset state3 openStreamChangeSetForConnection \ $connection $fileName(3) "" None state4 list [changeSetToString $state4(changeSet) true] Data \ [sql execute -execute reader -format list $db \ {SELECT x, y FROM t1 ORDER BY x;}] } -cleanup { cleanupSomeText |
︙ | ︙ | |||
1044 1045 1046 1047 1048 1049 1050 | makeSomeChanges $db t1 [list insert] 1 set rawData(2) [captureChangeSetRawData $connection main null { makeSomeChanges $db t1 [list insert] } true]; object removeref $rawData(2) set changeSet(1) \ | | | | 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 | makeSomeChanges $db t1 [list insert] 1 set rawData(2) [captureChangeSetRawData $connection main null { makeSomeChanges $db t1 [list insert] } true]; object removeref $rawData(2) set changeSet(1) \ [createMemoryChangeSetForConnection $connection $rawData(1) None] object removeref $changeSet(1) set changeSet(2) \ [createMemoryChangeSetForConnection $connection $rawData(2) None] object removeref $changeSet(2) set changeSet(3) [$changeSet(1) -alias CombineWith $changeSet(2)] $changeSet(3) -marshalflags +DynamicCallback \ Apply conflictCallback null |
︙ | ︙ | |||
1121 1122 1123 1124 1125 1126 1127 | makeSomeChanges $db t1 [list insert] 1 captureChangeSetFile $connection main null { makeSomeChanges $db t1 [list insert] } $fileName(2) true openStreamChangeSetForConnection \ | | | | | | 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 | makeSomeChanges $db t1 [list insert] 1 captureChangeSetFile $connection main null { makeSomeChanges $db t1 [list insert] } $fileName(2) true openStreamChangeSetForConnection \ $connection $fileName(1) $fileName(3) None state1 openStreamChangeSetForConnection \ $connection $fileName(2) "" None state2 $state1(changeSet) CombineWith $state2(changeSet); unset state1 openStreamChangeSetForConnection \ $connection $fileName(3) "" None state3 $state3(changeSet) -marshalflags +DynamicCallback \ Apply conflictCallback null; unset state3 openStreamChangeSetForConnection \ $connection $fileName(3) "" None state4 list [changeSetToString $state4(changeSet) true] Data \ [sql execute -execute reader -format list $db \ {SELECT x, y FROM t1 ORDER BY x;}] } -cleanup { cleanupSomeText |
︙ | ︙ | |||
1301 1302 1303 1304 1305 1306 1307 | $changeGroup AddChangeSet $rawData(1) $changeGroup AddChangeSet $rawData(2) set rawData(3) [createMemoryChangeSetForObject $changeGroup] object removeref $rawData(3) set changeSet \ | | | 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 | $changeGroup AddChangeSet $rawData(1) $changeGroup AddChangeSet $rawData(2) set rawData(3) [createMemoryChangeSetForObject $changeGroup] object removeref $rawData(3) set changeSet \ [createMemoryChangeSetForConnection $connection $rawData(3) None] object removeref $changeSet changeSetToString $changeSet true } -cleanup { cleanupSomeText |
︙ | ︙ | |||
1361 1362 1363 1364 1365 1366 1367 | set changeGroup [$connection -alias CreateChangeGroup] addStreamChangeSetForObject $changeGroup $fileName(1) addStreamChangeSetForObject $changeGroup $fileName(2) writeStreamChangeSetForObject $changeGroup $fileName(3) openStreamChangeSetForConnection \ | | | 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 | set changeGroup [$connection -alias CreateChangeGroup] addStreamChangeSetForObject $changeGroup $fileName(1) addStreamChangeSetForObject $changeGroup $fileName(2) writeStreamChangeSetForObject $changeGroup $fileName(3) openStreamChangeSetForConnection \ $connection $fileName(3) "" None state changeSetToString $state(changeSet) true } -cleanup { cleanupSomeText unset -nocomplain state changeGroup |
︙ | ︙ |
Changes to readme.htm.
︙ | ︙ | |||
210 211 212 213 214 215 216 217 218 219 220 221 222 223 | <p> <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li> <li>Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to [23d8d6171e].</li> <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].</li> </ul> <p> <b>1.0.109.0 - August 15, 2018</b> </p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li> <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</a>.</li> | > | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | <p> <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_26_0.html">SQLite 3.26.0</a>.</li> <li>Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to [23d8d6171e].</li> <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].</li> <li>Add support for the <a href="https://www.sqlite.org/session/c_changesetstart_invert.html">sqlite3changeset_start_v2()</a> and <a href="https://www.sqlite.org/session/c_changesetstart_invert.html">sqlite3changeset_start_v2_strm()</a> interfaces.</li> </ul> <p> <b>1.0.109.0 - August 15, 2018</b> </p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_24_0.html">SQLite 3.24.0</a>.</li> <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.2.0">Entity Framework 6.2.0</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.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Updated to [https://www.sqlite.org/releaselog/3_26_0.html|SQLite 3.26.0].</li> <li>Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to [23d8d6171e].</li> <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].</li> </ul> <p> <b>1.0.109.0 - August 15, 2018</b> </p> <ul> <li>Updated to [https://www.sqlite.org/releaselog/3_24_0.html|SQLite 3.24.0].</li> <li>Updated to [https://www.nuget.org/packages/EntityFramework/6.2.0|Entity Framework 6.2.0].</li> | > | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <p> <b>1.0.110.0 - December XX, 2018 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Updated to [https://www.sqlite.org/releaselog/3_26_0.html|SQLite 3.26.0].</li> <li>Add HidePassword connection flag to remove the password from the connection string once the database is opened. Pursuant to [23d8d6171e].</li> <li>Add experimental StrictConformance connection flag to force strict compliance to the ADO.NET standard. Pursuant to [e36e05e299].</li> <li>Add support for the [https://www.sqlite.org/session/c_changesetstart_invert.html|sqlite3changeset_start_v2()] and [https://www.sqlite.org/session/c_changesetstart_invert.html|sqlite3changeset_start_v2_strm()] interfaces.</li> </ul> <p> <b>1.0.109.0 - August 15, 2018</b> </p> <ul> <li>Updated to [https://www.sqlite.org/releaselog/3_24_0.html|SQLite 3.24.0].</li> <li>Updated to [https://www.nuget.org/packages/EntityFramework/6.2.0|Entity Framework 6.2.0].</li> |
︙ | ︙ |