Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add more backup API test cases. Modify BackupDatabase method to prevent looping when the number of pages is zero. Modify SQLiteBackupCallback delegate to accept additional context information and move it outside the scope of the SQLiteConnection class. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5f8913872b9b87ea5032cd5de22fc904 |
User & Date: | mistachkin 2012-03-26 09:14:57.698 |
Context
2012-03-26
| ||
09:18 | Make all the dynamic test classes static, when possible. check-in: 3f6ed3b646 user: mistachkin tags: trunk | |
09:14 | Add more backup API test cases. Modify BackupDatabase method to prevent looping when the number of pages is zero. Modify SQLiteBackupCallback delegate to accept additional context information and move it outside the scope of the SQLiteConnection class. check-in: 5f8913872b user: mistachkin tags: trunk | |
2012-03-24
| ||
16:48 | Add support for the native SQLite Online Backup API. check-in: 4926b5d713 user: mistachkin tags: trunk | |
Changes
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | |||
329 330 331 332 333 334 335 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + | } } } /////////////////////////////////////////////////////////////////////////////////////////////// #region Backup API Members |
︙ | |||
420 421 422 423 424 425 426 | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | - + - - + + + + + + + + + + | try { backup = sqliteBase.InitializeBackup( destination, destinationName, sourceName); /* throw */ bool retry; |
︙ | |||
2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 | 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | /// <summary> /// Raised when a statement first begins executing on a given connection /// </summary> /// <param name="sender">The connection executing the statement</param> /// <param name="e">Event arguments of the trace</param> public delegate void SQLiteTraceEventHandler(object sender, TraceEventArgs e); /////////////////////////////////////////////////////////////////////////////////////////////// #region Backup API Members /// <summary> /// Raised between each backup step. /// </summary> /// <param name="source"> /// The source database connection. /// </param> /// <param name="sourceName"> /// The source database name. /// </param> /// <param name="destination"> /// The destination database connection. /// </param> /// <param name="destinationName"> /// The destination database name. /// </param> /// <param name="pages"> /// The number of pages copied with each step. /// </param> /// <param name="remainingPages"> /// The number of pages remaining to be copied. /// </param> /// <param name="totalPages"> /// The total number of pages in the source database. /// </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 to continue with the backup process or false to halt the backup /// process, rolling back any changes that have been made so far. /// </returns> public delegate bool SQLiteBackupCallback( SQLiteConnection source, string sourceName, SQLiteConnection destination, string destinationName, int pages, int remainingPages, int totalPages, bool retry ); #endregion /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Whenever an update event is triggered on a connection, this enum will indicate /// exactly what type of operation is being performed. /// </summary> public enum UpdateEventType { |
︙ |
Changes to Tests/backup.eagle.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 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 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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + - + - + - + + + - - + + - - + + + - - - + + + + + + + | ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### set params(pages) [list -1 -1 0 0 1 1 1000 1000] |