Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch backupApi Excluding Merge-Ins
This is equivalent to a diff from 5ba5fc374d to 7cf3031f35
2012-03-24
| ||
16:48 | Add support for the native SQLite Online Backup API. check-in: 4926b5d713 user: mistachkin tags: trunk | |
16:46 | Update version history docs. Closed-Leaf check-in: 7cf3031f35 user: mistachkin tags: backupApi | |
16:12 | Fix typo in test case. check-in: ca5d14e4ae user: mistachkin tags: backupApi | |
10:05 | Start of work on ticket [c71846ed57], supporting the SQLite online backup API. check-in: 6eac31ab88 user: mistachkin tags: backupApi | |
2012-03-23
| ||
12:09 | Lock access to the static data used by the native SQLite library pre-load mechanism. check-in: 5ba5fc374d user: mistachkin tags: trunk | |
2012-03-22
| ||
15:45 | Modify the native library pre-loader to recognize the 'PreLoadSQLite_BaseDirectory' environment variable as an override for the base directory to use. check-in: e0c2dcac4c user: mistachkin tags: trunk | |
Changes to Doc/Extra/version.html.
︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + | <h1 class="heading">Version History</h1> <p><b>1.0.80.0 - April XX, 2012</b></p> <ul> <li>In the SQLiteFunction class, when calling user-provided methods from a delegate called by native code, avoid throwing exceptions, optionally tracing the caught exceptions. Fix for <a href="http://system.data.sqlite.org/index.html/info/8a426d12eb">[8a426d12eb]</a>.</li> <li>Add Visual Studio 2005 support to all the applicable solution/project files, their associated supporting files, and the test suite.</li> <li>Add Visual Studio 2005 support to the redesigned designer support installer.</li> <li>Add experimental support for "pre-loading" the native SQLite library based on the processor architecture of the current process. This feature is now enabled by default at compile-time.</li> <li>Add support for the native <a href="http://www.sqlite.org/backup.html">SQLite Online Backup API</a>. Fix for <a href="http://system.data.sqlite.org/index.html/info/c71846ed57">[c71846ed57]</a>.</li> <li>Acquire and hold a static data lock while checking if the native SQLite library has been initialized to prevent a subtle race condition that can result in superfluous error messages. Fix for <a href="http://system.data.sqlite.org/index.html/info/72905c9a77">[72905c9a77]</a>.</li> <li>Support tracing of all parameter binding activity and use the connection flags to control what is traced.</li> <li>When converting a DateTime instance of an "Unspecified" kind to a string, use the same kind as the connection, if available.</li> <li>Add overload of the SQLiteDataReader.GetValues method that returns a NameValueCollection.</li> <li>Add static ToUnixEpoch method to the SQLiteConvert class to convert a DateTime value to the number of whole seconds since the Unix epoch.</li> <li>In the implicit conversion operators (to IntPtr) for both the SQLiteConnectionHandle and SQLiteStatementHandle classes, return IntPtr.Zero if the instance being converted is null.</li> <li>Write warning message to the active trace listners (for the Debug build configuration only) if a column type or type name cannot be mapped properly. See <a href="http://system.data.sqlite.org/index.html/info/4bbf851fa5">[4bbf851fa5]</a>.</li> |
︙ |
Changes to System.Data.SQLite/SQLite3.cs.
︙ | |||
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 | 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 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | internal override int SetLogCallback(SQLiteLogCallback func) { int rc = UnsafeNativeMethods.sqlite3_config( (int)SQLiteConfigOpsEnum.SQLITE_CONFIG_LOG, func, (IntPtr)0); return rc; } /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Creates a new SQLite backup object based on the provided destination /// database connection. The source database connection is the one /// associated with this object. The source and destination database /// connections cannot be the same. /// </summary> /// <param name="destCnn">The destination database connection.</param> /// <param name="destName">The destination database name.</param> /// <param name="sourceName">The source database name.</param> /// <returns>The newly created backup object.</returns> internal override SQLiteBackup InitializeBackup( SQLiteConnection destCnn, string destName, string sourceName ) { if (destCnn == null) throw new ArgumentNullException("destCnn"); if (destName == null) throw new ArgumentNullException("destName"); if (sourceName == null) throw new ArgumentNullException("sourceName"); SQLite3 destSqlite3 = destCnn._sql as SQLite3; if (destSqlite3 == null) throw new ArgumentException( "Destination connection has no wrapper.", "destCnn"); SQLiteConnectionHandle destHandle = destSqlite3._sql; if (destHandle == null) throw new ArgumentException( "Destination connection has an invalid handle.", "destCnn"); SQLiteConnectionHandle sourceHandle = _sql; if (sourceHandle == null) throw new InvalidOperationException( "Source connection has an invalid handle."); byte[] zDestName = ToUTF8(destName); byte[] zSourceName = ToUTF8(sourceName); IntPtr backup = UnsafeNativeMethods.sqlite3_backup_init( destHandle, zDestName, sourceHandle, zSourceName); if (backup == IntPtr.Zero) throw new SQLiteException(ResultCode(), SQLiteLastError()); return new SQLiteBackup( this, backup, destHandle, zDestName, sourceHandle, zSourceName); } /// <summary> /// Copies up to N pages from the source database to the destination /// database associated with the specified backup object. /// </summary> /// <param name="backup">The backup object to use.</param> /// <param name="nPage"> /// The number of pages to copy, negative to copy all remaining pages. /// </param> /// <param name="retry"> /// Set to true if the operation needs to be retried due to database /// locking issues; otherwise, set to false. /// </param> /// <returns> /// True if there are more pages to be copied, false otherwise. /// </returns> internal override bool StepBackup( SQLiteBackup backup, int nPage, out bool retry ) { retry = false; if (backup == null) throw new ArgumentNullException("backup"); SQLiteBackupHandle handle = backup._sqlite_backup; if (handle == null) throw new InvalidOperationException( "Backup object has an invalid handle."); int n = UnsafeNativeMethods.sqlite3_backup_step(handle, nPage); backup._stepResult = n; /* NOTE: Save for use by FinishBackup. */ if (n == (int)SQLiteErrorCode.Ok) { return true; } else if (n == (int)SQLiteErrorCode.Busy) { retry = true; return true; } else if (n == (int)SQLiteErrorCode.Locked) { retry = true; return true; } else if (n == (int)SQLiteErrorCode.Done) { return false; } else { throw new SQLiteException(n, SQLiteLastError()); } } /// <summary> /// Returns the number of pages remaining to be copied from the source /// database to the destination database associated with the specified /// backup object. /// </summary> /// <param name="backup">The backup object to check.</param> /// <returns>The number of pages remaining to be copied.</returns> internal override int RemainingBackup( SQLiteBackup backup ) { if (backup == null) throw new ArgumentNullException("backup"); SQLiteBackupHandle handle = backup._sqlite_backup; if (handle == null) throw new InvalidOperationException( "Backup object has an invalid handle."); return UnsafeNativeMethods.sqlite3_backup_remaining(handle); } /// <summary> /// Returns the total number of pages in the source database associated /// with the specified backup object. /// </summary> /// <param name="backup">The backup object to check.</param> /// <returns>The total number of pages in the source database.</returns> internal override int PageCountBackup( SQLiteBackup backup ) { if (backup == null) throw new ArgumentNullException("backup"); SQLiteBackupHandle handle = backup._sqlite_backup; if (handle == null) throw new InvalidOperationException( "Backup object has an invalid handle."); return UnsafeNativeMethods.sqlite3_backup_pagecount(handle); } /// <summary> /// Destroys the backup object, rolling back any backup that may be in /// progess. /// </summary> /// <param name="backup">The backup object to destroy.</param> internal override void FinishBackup( SQLiteBackup backup ) { if (backup == null) throw new ArgumentNullException("backup"); SQLiteBackupHandle handle = backup._sqlite_backup; if (handle == null) throw new InvalidOperationException( "Backup object has an invalid handle."); int n = UnsafeNativeMethods.sqlite3_backup_finish(handle); handle.SetHandleAsInvalid(); if ((n > 0) && (n != backup._stepResult)) throw new SQLiteException(n, SQLiteLastError()); } /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Determines if the SQLite core library has been initialized for the /// current process. /// </summary> /// <returns> /// A boolean indicating whether or not the SQLite core library has been |
︙ |
Added System.Data.SQLite/SQLiteBackup.cs.