Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From 13e7a22c1eff4e07 To a36b502b6a3ae3a5
2012-01-27
| ||
17:03 | Changes to VS designer component installer tests. check-in: 5267ac587b user: mistachkin tags: tkt-d8491abd0b | |
15:53 | Make the VS designer component installer aware of the WoW64 subsystem on 64-bit Windows. See ticket [d8491abd0b]. check-in: 13e7a22c1e user: mistachkin tags: tkt-d8491abd0b | |
11:29 | Update downloads page for release 1.0.78.0. check-in: cf6bbc3fd4 user: mistachkin tags: trunk, release | |
2011-10-11
| ||
04:53 | Add tests to verify the assembly versions of the core projects. check-in: ff63be6a1f user: mistachkin tags: trunk | |
04:22 | Make sure all remaining version numbers match the core projects, adding tests to verify them. check-in: a36b502b6a user: mistachkin tags: trunk | |
04:11 | Make the version number for the VS designer installer command line tool match the core projects. check-in: 6ad0a2ffd3 user: mistachkin tags: trunk | |
︙ | ︙ | |||
81 82 83 84 85 86 87 | <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.76.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> </DbProviderFactories> </system.data> </configuration> </pre> </div> <p> |
︙ | ︙ |
︙ | ︙ | |||
46 47 48 49 50 51 52 | <h1 class="heading">Installing SQLite Visual Studio Design-Time Support</h1> <p>Supporting the Visual Studio query designer and allowing you to manipulate SQLite databases from within Visual Studio is a great time-saver. Though the support is not yet fully-implemented, there's certainly enough there to keep you busy. You can create databases, design and execute queries, create typed datasets and lots more all from Visual Studio.</p> <h3> Installation Instructions</h3> | | > > | > < < < < < | > > | | | | 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 | <h1 class="heading">Installing SQLite Visual Studio Design-Time Support</h1> <p>Supporting the Visual Studio query designer and allowing you to manipulate SQLite databases from within Visual Studio is a great time-saver. Though the support is not yet fully-implemented, there's certainly enough there to keep you busy. You can create databases, design and execute queries, create typed datasets and lots more all from Visual Studio.</p> <h3> Installation Instructions</h3> <p> In Windows Explorer, navigate to <STRONG>SQLite.Net\bin\Designer</STRONG> and execute the <STRONG>INSTALL.EXE</STRONG> program. It will automatically detect what eligible Visual Studio products are installed, and allow you to check and uncheck which environments to install the designer for.</p> <h3> Express Edition Limitations</h3> <p>All Express Editions (except Visual Web Developer) are hard-coded to only allow you to design for Jet and Sql Server Database Files. The only way for SQLite to install its designer is to temporarily replace one of the existing "approved" designers. Therefore, when you install the SQLite designer for one of these express editions, it will temporarily replace the Microsoft Access designer. You can revert back to the Access designer simply by re-running the install.exe program and un-checking the boxes.</p> <hr/> <div id="footer"> <p> <a href="mailto:sqlite-users@sqlite.org?subject=SQLite.NET%20Class%20Library%20Documentation%20Feedback:%20Designer%20Support"> Send comments on this topic.</a> </p> <p> |
︙ | ︙ |
︙ | ︙ | |||
39 40 41 42 43 44 45 | </td> </tr> </table> </div> <div id="mainSection"> <div id="mainBody"> <h1 class="heading">Version History</h1> | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | </td> </tr> </table> </div> <div id="mainSection"> <div id="mainBody"> <h1 class="heading">Version History</h1> <p><b>1.0.76.0 - October 4, 2011</b></p> <ul> <li>Prevent the domain unload event handler in SQLiteLog from being registered multiple times. Fix for <a href="http://system.data.sqlite.org/index.html/info/0d5b1ef362">[0d5b1ef362]</a>.</li> <li>Stop allowing non-default application domains to initialize the SQLiteLog class. Fix for <a href="http://system.data.sqlite.org/index.html/info/ac47dd230a">[ac47dd230a]</a>.</li> </ul> <p><b>1.0.75.0 - October 3, 2011</b></p> <ul> <li>Updated to SQLite 3.7.8 <a href="http://www.sqlite.org/src/info/3e0da808d2">[3e0da808d2]</a>.</li> <li>More enhancements to the build system.</li> <li>Add official <a href="http://www.nuget.org/">NuGet</a> packages for x86 and x64.</li> <li>Add Changes and LastInsertRowId properties to the connection class.</li> <li>Support more formats when converting data from/to the DateTime type.</li> <li>Make all the assembly versioning attributes consistent.</li> <li>Add unit testing infrastructure using <a href="http://eagle.to/">Eagle</a>.</li> <li>Integrate all legacy unit tests, including the "testlinq" project, into the new test suite.</li> |
︙ | ︙ | |||
108 109 110 111 112 113 114 | <li>Minor optimization to GetParamValueBytes(). Fix for <a href="http://system.data.sqlite.org/index.html/info/201128cc88">[201128cc88]</a>.</li> <li>Support the ON UPDATE, ON DELETE, and MATCH clause information when generating schema metadata for foreign keys. Partial fix for <a href="http://system.data.sqlite.org/index.html/info/b226147b37">[b226147b37]</a>. VS designer changes are not yet tested.</li> <li>Fix incorrect resource name for SR.resx in the mixed-mode assembly.</li> <li>Reduce the number of String.Compare() calls in the hot path for SQLiteCommand.ExecuteReader().</li> </ul> <p><b>1.0.74.0 - July 4, 2011</b></p> <ul> | | | | | | | 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 | <li>Minor optimization to GetParamValueBytes(). Fix for <a href="http://system.data.sqlite.org/index.html/info/201128cc88">[201128cc88]</a>.</li> <li>Support the ON UPDATE, ON DELETE, and MATCH clause information when generating schema metadata for foreign keys. Partial fix for <a href="http://system.data.sqlite.org/index.html/info/b226147b37">[b226147b37]</a>. VS designer changes are not yet tested.</li> <li>Fix incorrect resource name for SR.resx in the mixed-mode assembly.</li> <li>Reduce the number of String.Compare() calls in the hot path for SQLiteCommand.ExecuteReader().</li> </ul> <p><b>1.0.74.0 - July 4, 2011</b></p> <ul> <li>Updated to SQLite 3.7.7.1 <a href="http://www.sqlite.org/src/info/af0d91adf4">[af0d91adf4]</a>.</li> <li>Fix incorrect hard-coded .NET Framework version information SQLiteFactory_Linq.cs that was causing IServiceProvider.GetService to fail when running against the .NET Framework 3.5.</li> <li>Fix all XML documentation warnings.</li> <li>Restore support for the mixed-mode assembly (i.e. the one that can be registered in the Global Assembly Cache).</li> <li>Restore support for the Compact Framework.</li> <li>Remove unused "using" statements from the System.Data.SQLite and System.Data.SQLite.Linq projects.</li> <li>Remove hard-coded System.Data.SQLite.Linq version from SQLiteFactory_Linq.cs</li> <li>Modify the setup to support bundled packages (i.e. with the mixed-mode assembly) and standard packages (i.e. with the managed assembly separate from the native interop library).</li> <li>Disable the ability to register with the Global Assembly Cache in the standard setup package (i.e. it is available in the bundled setup only).</li> <li>Remove PATH modification from the setup.</li> <li>Modify the naming scheme for the source, setup, and binary packages to allow for the necessary variants.</li> <li>In the build automation, attempt to automatically detect if Visual Studio 2008 and/or 2010 are installed and support building binaries for both at once, when available.</li> <li>Add release automation to build the source, setup, and binary packages in all supported build variants.</li> <li>Add the testlinq project to the new build system and make it work properly with Visual Studio 2008 and 2010.</li> </ul> <p><b>1.0.73.0 - June 2, 2011</b></p> <ul> <li>Updated to SQLite 3.7.6.3 <a href="http://www.sqlite.org/src/info/ed1da510a2">[ed1da510a2]</a>.</li> <li>Minor optimization to GetBytes(). Fix for <a href="http://system.data.sqlite.org/index.html/info/8c1650482e">[8c1650482e]</a>.</li> <li>Update various assembly information settings.</li> <li>Correct System.Data.SQLite.Linq version and resource information. Fix for <a href="http://system.data.sqlite.org/index.html/info/6489c5a396">[6489c5a396]</a> and <a href="http://system.data.sqlite.org/index.html/info/133daf50d6">[133daf50d6]</a>.</li> <li>Moved log handler from SQLiteConnection object to SQLiteFactory object to prevent if from being prematurely GCed.</li> <li>We should block x64 installs on x86 and we should install native only if the setup package itself is native. Fix for <a href="http://system.data.sqlite.org/index.html/info/e058ce156e">[e058ce156e]</a>.</li> </ul> <p><b>1.0.72.0 - May 1, 2011</b></p> <ul> <li>Add the correct directory to the path. Fix for <a href="http://system.data.sqlite.org/index.html/info/50515a0c8e">[50515a0c8e]</a>.</li> </ul> <p><b>1.0.71.0 - April 27, 2011</b></p> <ul> <li>Updated to SQLite 3.7.6+ <a href="http://www.sqlite.org/src/info/1bd1484cd7">[1bd1484cd7]</a> to get additional Windows error logging.</li> <li>Updated setup to optionally add install directory to PATH if GAC option selected.</li> </ul> <p><b>1.0.69.0 - April 12, 2011</b></p> <ul> <li>Code merge with SQLite 3.7.6</li> <li>New VS2008 and VS2010 solution files</li> <li>Build and packaging automation</li> <li>New Inno Setup files</li> <li>Designer support currently not ready for release</li> </ul> <p><b>1.0.68.0 - February 2011</b></p> <ul> <li>Code merge with SQLite 3.7.5</li> <li>Continuing work on supporting Visual Studio 2010</li> </ul> <p><b>1.0.67.0 - January 3, 2011</b></p> <ul> <li>Code merge with SQLite 3.7.4</li> <li>Continuing work on supporting Visual Studio 2010</li> </ul> <p><b>1.0.66.1 - August 1, 2010</b></p> <ul> <li>Code merge with SQLite 3.7.0.1</li> <li>Re-enabled VS2005 designer support, broken in previous versions during the 2008 transition</li> <li>Implemented new forms of Take/Skip in the EF framework courtesy jlsantiago</li> |
︙ | ︙ | |||
180 181 182 183 184 185 186 | </ul> <p><b>1.0.65.0 - July 26, 2009</b></p> <ul> <li>Fixed a bug in the encryption module to prevent a double free() when rekeying a database.</li> <li>Fixed a bug in the encryption module when ATTACHing an encrypted database.</li> <li>Incorporated the WinCE locking fix from ticket <a href="http://www.sqlite.org/cvstrac/tktview?tn=3991">#3991</a></li> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 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 435 436 | </ul> <p><b>1.0.65.0 - July 26, 2009</b></p> <ul> <li>Fixed a bug in the encryption module to prevent a double free() when rekeying a database.</li> <li>Fixed a bug in the encryption module when ATTACHing an encrypted database.</li> <li>Incorporated the WinCE locking fix from ticket <a href="http://www.sqlite.org/cvstrac/tktview?tn=3991">#3991</a></li> <li>Added "bigint" to the dropdown in the table designer, plus other minor table designer bugfixes.</li> </ul> <p><b>1.0.64.0 - July 9, 2009</b></p> <ul> <li>Fixed the missing resources problem from the 63 release.</li> <li>Added preliminary support for the Visual Studio 2010 beta.</li> <li>Fixed a bug in SQLiteCommand that threw a null reference exception when setting the Transaction object to null.</li> <li>If SQLiteConnection.EnlistTransaction is called multiple times for the same transaction scope, just return without throwing an error.</li> </ul> <p><b>1.0.63.0 - June 29, 2009</b></p> <ul> <li>Code merge with SQLite 3.6.16</li> <li>Check the autocommit mode of the connection to which a transaction is bound during the disposal of the transaction. If autocommit is enabled, then the database has already rolled back the transaction and we don't need to do it during dispose, and can quietly ignore the step without throwing an error.</li> <li>Eliminated the mergebin step altogether. It was developed primarily to merge the Compact Framework binaries together, but since we're not doing that anymore, its use is limited. Its non-standard method of merging a binary on the desktop framework is redundant as well. The desktop binary now hard-links to MSCOREE, but as of Windows XP, this was redundant as well since XP and beyond automatically attempt to load MSCOREE on startup when a DLL has a .NET header.</li> <li>More improvements to the test.exe program for running the tests against Sql Server for comparison purposes.</li> </ul> <p><b>1.0.62.0 - June 20, 2009</b></p> <ul> <li>Code merge with SQLite 3.6.15</li> <li>Fixed the decimal reading bug in the SQLiteDataReader</li> <li>Changed Join()'s to Sleep()'s in the statement retry code to prevent message pumping</li> <li>Fixed a bad pointer conversion when retrieving blobs using GetBytes() in 64-bit land</li> <li>Several changes to the Test program that comes with the provider. Tests can now be individually disabled, and the test program can run against several provider back-ends</li> </ul> <p><b>1.0.61.0 - April 28, 2009</b></p> <ul> <li>Code merge with SQLite 3.6.13. The new backup features are as yet unimplemented in the provider, but will be forthcoming in a subsequent release</li> <li>Fixed the default-value lookups in SQLiteConnectionStringBuilder when accessing properties</li> <li>Lock the SQLiteTransaction object during dispose to avoid potential race condition during cleanup</li> <li>Fixed SQLiteDataReader.GetDecimal() processing and parsing of decimal values for cases when SQLite returns things like "1.0e-05" instead of "0.0001"</li> </ul> <p><b>1.0.60.0 - October 3, 2008</b></p> <ul> <li>Throw a NotSupported exception in the EF Sql Gen code instead of parsing illegal SQL during an update/insert/delete where no primary key is defined.</li> <li>Fixed the Compact Framework interop library. Since the linker flag /subsystem had no version specified, it was causing a problem for many CE-based platforms.</li> <li>Incorporated SQLite patch for ticket <a href="http://www.sqlite.org/cvstrac/tktview?tn=3387">#3387</a> and reverted out the vfs override code I added in build 59 to work around this problem.</li> <li>Fixed a designer issue when creating a new table from the Server Explorer. After initially saving it, if you then continued to edit it and tried to save it again, it would generate the change SQL using the old temporary table name rather than the new name.</li> </ul> <p><b>1.0.59.0 - September 22, 2008</b></p> <ul> <li>Code merge with SQLite 3.6.3. Solves a couple different EF issues that were either giving inconsistent results or crashing the engine.</li> <li>Fixed the parsing of literal binaries in the EF SqlGen code. SQLite now passes nearly all the testcases in <a href="http://sqlite.phxsoftware.com/forums/p/1377/5921.aspx#5921">Microsoft's EF Query Samples</a> application -- the exception being the <i>datetimeoffset </i>and<i> time</i> constants tests, and tests that use the <i>APPLY </i>keyword which are unsupported for now.</li> <li>Revamped the Compact Framework mixed-mode assembly. Tired of playing cat and mouse with the Compact Framework's support for mixed-mode assemblies. The CF build now requires that you distribute both the System.Data.SQLite library and the paired SQLite.Interop.XXX library. The XXX denotes the build number of the library.</li> <li>Implemented a workaround for Vista's overzealous caching by turning off FILE_FLAG_RANDOM_ACCESS for OS versions above XP. This is implemented as a custom (default override) VFS in the interop.c file, so no changes are made to the SQLite source code.</li> <li>Fixed some registry issues in the designer install.exe, which prevented some design-time stuff from working on the Compact Framework when .NET 3.5 was installed.</li> </ul> <p><b>1.0.58.0 - August 30, 2008</b></p> <ul> <li>Code merge with SQLite 3.6.2. If only I'd waited one more day to release 57! Several LINQ issues have been resolved with this engine release relating to deeply-nested subqueries that the EF SqlGen creates.</li> <li>Fixed the Rollback SQLiteConnection event to not require a connection be opened first.</li> </ul> <p><b>1.0.57.0 - August 29, 2008</b></p> <ul> <li>Compiled against 3.6.1 with checkin <a href="http://www.sqlite.org/cvstrac/tktview?tn=3300">#3300</a> resolved, which fixes an Entity Framework bug I was seeing. I currently have 3 other tickets out on the engine, which are not yet resolved and relate to EF.</li> <li>Fixed decimal types to store and fetch using InvariantCulture. If you're using decimal datatypes in your database and were affected by the 56 release, please issue an UPDATE <table> SET <column> = REPLACE(<column>, ',', '.'); to fix the decimal separators. Apologies for not testing that more thoroughly before releasing 56.</li> <li>Too many LINQ fixes to list. Fixed views so they generate, fixed the LIMIT clause, implemented additional functionality and removed unnecessary code.</li> <li>Fixed foreign key names in the designer so viewing the SQL script on a new unsaved table after renaming it in the properties toolwindow will reflect in the script properly.</li> <li>Fixed the Update and Commit events on SQLiteConnection so they don't require the connection to be opened first.</li> <li>Fixed userdef aggregate functions so they play nice with each other when appearing multiple times in the same statement.</li> <li>Fixed the editing and saving of default values in the table designer.</li> <li>Fixed ForeignKeys schema to support multi-column foreign keys. Also hacked support for them in the table designer, provided two foreign keys in the designer have the same name and reference the same foreign table and different columns. Will implement first-class support for this in the next release.</li> </ul> <p><b>1.0.56.0 - August 11, 2008</b></p> <ul> <li>Fixed a bug in the table designer when designing new tables, wherein you had to save the table first before being able to create indexes and foreign keys.</li> <li>Tweaks to decimal type handling. The 'decimal' type can't be represented by Int64 or Double (without loss of precision) in SQLite, so we have to fudge it by treating it like a string and converting it back and forth in the provider. Unfortunately backing it to the db as a string causes sorting problems. See <a href="http://sqlite.phxsoftware.com/forums/p/1296/5595.aspx#5595">this post</a> for details on using a custom collation sequence to overcome the sorting issue arising from this patch.</li> <li>Minor tweaks and bugfixes to the test program and the provider.</li> <li>More adjustments to make the managed-only version of the provider run and pass all tests on Mono.</li> <li>LINQ to Entities bits heavily updated and compiled against VS2008 SP1 RTM. SQLite LINQ support is still considered beta.</li> </ul> <p><b>1.0.55.0 - August 6, 2008</b></p> <ul> <li>Code merge with SQLite 3.6.1</li> <li>Added support for the user-contributed extension-functions at <a href="http://www.sqlite.org/contrib">http://www.sqlite.org/contrib</a>. Feel free to override any of them with your own implementation. The new functions are: <i>acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi, replicate, charindex, leftstr, rightstr, reverse, proper, padl, padr, padc, strfilter,</i> and aggregates <i>stdev, variance, mode, median, lower_quartile, upper_quartile.</i></li> <li>Moved the last_rows_affected() function to the C extension library.</li> <li>Added a new class, SQLiteFunctionEx which extends SQLiteFunction and adds the ability for a user-defined function to get the collating sequence during the Invoke/Step methods. User-defined functions can use the collating sequence as a helper to compare values.</li> <li>When registering user-defined collation sequences and functions, the provider will now register both a UTF8 and a UTF16 version instead of just UTF8.</li> <li>Revamped connection pooling and added static ClearPool() and ClearAllPools() functions to SQLiteConnection. Behavior of the pool and its clearing mechanics match SqlClient.</li> <li>Fixed connections going to the pool so that any unfinalized lingering commands from un-collected datareaders are automatically reset and any lurking transactions made on the connection are rolled back.</li> <li>Transaction isolation levels are now partially supported. Serializable is the default, which obtains read/write locks immediately -- this is compatible with previous releases of the provider. Unspecified will default to whatever the default isolation mode is set to, and ReadCommitted will cause a deferred lock to be obtained. No other values are legal.</li> <li>Revamped the test.exe program. It's now an interactive GUI application. Easier for me to add tests now.</li> <li>Tweaks to the VS designer package and installer.</li> <li>More adjustments to the internal SQLite3.Prepare() method to account for both kinds of lock errors when retrying.</li> <li>Stripped a lot of unnecessary interop() calls and replaced with base sqlite calls. Revamped most of UnsafeNativeMethods to make it easier to port the code.</li> <li>Rerigged internal callbacks for userdef functions and other native to managed callbacks. More portable this way.</li> <li>Source can now can be compiled with the SQLITE_STANDARD preprocessor symbol to force the wrapper to use the stock sqlite3 library. Some functionality is missing, but its minimal. None of the precompiled binaries are compiled using this setting, but its useful for testing portability.</li> <li>Added "boolean" and a couple other missing datatypes to the "DataTypes" schema xml file. Used by the VS designer when displaying tables and querying.</li> <li>Added a new connection string option "Read Only". When set to True, the database will be opened in read-only mode.</li> <li>Added a new connection string option "Max Pool Size" to set the maximum size of the connection pool for a given db file connection.</li> <li>Added a new connection string option "Default IsolationLevel" to set the default isolation level of transactions. Possible values are Serializable and ReadCommitted.</li> <li>Added a new connection string option "URI" as an optional parameter for compatibility with other ports of the provider.</li> </ul> <p><b>1.0.54.0 - July 25, 2008</b></p> <ul> <li>Fixed the setup project, which somehow "forgot" to include all the binaries in the 53 release.</li> <li>Fixed a crash in the table designer when creating a new table and tabbing past the "Allow Nulls" cell in the grid while creating a new column.</li> <li>Fixed a mostly-benign bug in SQLiteDataReader's GetEnumerator, which failed to pass along a flag to the underyling DbEnumerator it creates. This one's been around since day 1 and nobody's noticed it in all these years.</li> <li>Added a new connection string parameter "Journal Mode" that allows you to set the SQLite journal mode to Delete, Persist or Off.</li> </ul> <p><b>1.0.53.0 - July 24, 2008</b></p> <ul> <li>Enabled sqlite_load_extension</li> <li>Added retry/timeout code to SQLite3.Prepare() when preparing statements for execution and a SQLITE_BUSY error occurs.</li> <li>Added a new schema to SQLiteConnection.GetSchema() called <i>Triggers</i>. Used to retrieve the trigger(s) associated with a database and/or table/view.</li> <li>Extensive updates to table/view editing capabilities inside Visual Studio's Server Explorer. The program now parses and lets you edit CHECK constraints and triggers on a table, as well as define triggers on views. Experimental still, so e-mail me if you have issues.</li> <li>Minor bugfix to the ViewColumns schema to return the proper base column name for a view that aliases a column.</li> <li>Fixed the insert/update/delete DML support in the Linq module.</li> <li>Changed the behavior of SQLiteCommand to allow a transaction to be set even if the command hasn't been associated with a connection yet.</li> </ul> <p><b>1.0.52.0 - July 16, 2008</b></p> <ul> <li>Code merge with SQLite 3.6.0</li> <li>Added a lot of previously-missing exports to the DEF file for the native library.</li> <li>Fixed SQLiteDataReader to check for an invalid connection before operating on an open cursor.</li> <li>Implemented the Cancel() function of SQLiteCommand to cancel an active reader.</li> <li>Added beta table and view designers to the Visual Studio Server Explorer. You can now edit/create tables and views, manage indexes and foreign keys from Visual Studio. This feature is still undergoing testing so use at your own risk!</li> <li>Fixed the Server Explorer so VS2005 users can once again right-click tables and views and open the table data.</li> <li>Added some new interop code to assist in returning more metadata not normally available through the SQLite API. Specifically, index column sort modes and collating sequences. Also added code to detect (but not parse) CHECK constraints, so the table designer can pop up a warning when editing a table with these constraints. Since I can't currently parse them.</li> <li>Lots of LINQ SQL generation improvements and fixes.</li> <li>Made some progress cleaning up and fixing up the schema definitions and manifests for EdmGen.</li> <li>Added a built-in SQLiteFunction called last_rows_affected() which can be called from SQL to get the number of rows affected by the last update/insert operation on the connection. This is roughly equivalent to Sql Server's @@ROWCOUNT variable.</li> </ul> <p><b>1.0.51.0 - July 1, 2008</b></p> <ul> <li><b>VS2008 SP1 Beta1 LINQ Support</b></li> <li>Added experimental Entity Framework support in a new library, System.Data.SQLite.Linq. Some things work, some don't. I haven't finished rigging everything up yet. The core library remains stable. All LINQ-specific code is completely separate from the core.</li> <li> Added some columns to several existing schemas to support some of the EDM framework stuff.</li> <li>Minor tweaks to the factory to better support dynamic loading of the Linq extension library for SQLite.</li> <li>SQLite's busy handler was interfering with the provider's busy handling mechanism, so its been disabled.</li> </ul> <p><b>1.0.50.0 - June 27, 2008</b></p> <ul> <li>Fixed some lingering dispose issues and race conditions when some objects were finalized.</li> <li>Fixed the SQLiteConvert.Split() routine to be a little smarter when splitting strings, which solves the quoted data source filename problem.</li> <li>Enhanced the mergebin utility to work around the strong name validation bug on the Compact Framework. The old workaround kludged the DLL and caused WM6.1 to fail to load it. This new solution is permanent and no longer kludges the DLL.</li> </ul> <p><b>1.0.49.0 - May 28, 2008</b></p> <ul> <li>Code merge with SQLite 3.5.9</li> <li>Fixed schema problems when querying the TEMP catalog.</li> <li>Changed BLOB datatype schema to return IsLong = False instead of True. This was preventing DbCommandBuilder from using GUID's and BLOB's as primary keys.</li> <li>Fix rollover issue with SQLite3.Reset() using TickCount.</li> <li>Fixed SQLiteDataReader to dispose of its command (if called for) before closing the connection (when flagged to do so) instead of the other way around.</li> <li>Fixed a DbNull error when retrieving items not backed by a table schema.</li> <li>Fixed foreign key constraint parsing bug.</li> <li>Added FailIfMissing property to the SQLiteConnectionStringBuilder.</li> <li>Converted the source projects to Visual Studio 2008.</li> </ul> <p><b>1.0.48.0 - December 28, 2007</b></p> |
︙ | ︙ | |||
638 639 640 641 642 643 644 | <ul> <li>Fixed a bug when using CommandBehavior.KeyInfo whereby integer primary key columns may be duplicated in the results. </li> <li>Enhanced the CommandBuilder so that update/delete statements are optimized when the affected table contains unique constraints and a primary key is present.</li> <li>Fixed a bug in the DataReader when used in conjunction with CommandBehavior.CloseConnection.</li></ul> <p><b>1.0.37.0 - November 19, 2006</b></p> <ul> | | | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | <ul> <li>Fixed a bug when using CommandBehavior.KeyInfo whereby integer primary key columns may be duplicated in the results. </li> <li>Enhanced the CommandBuilder so that update/delete statements are optimized when the affected table contains unique constraints and a primary key is present.</li> <li>Fixed a bug in the DataReader when used in conjunction with CommandBehavior.CloseConnection.</li></ul> <p><b>1.0.37.0 - November 19, 2006</b></p> <ul> <li>Added support for CommandBehavior.KeyInfo. When specified in a query, additional column(s) will be returned describing the key(s) defined for the table(s) selected in the query. This is optimized when INTEGER PRIMARY KEY is set for the given tables, but does additional work for other kinds of primary keys.</li> <li>Removed the default values from SQLiteDataReader.GetTableSchema(), to better follow Sql Server's pattern and suppress schema errors when loading the records into a dataset/datatable.</li> |
︙ | ︙ | |||
951 952 953 954 955 956 957 | Fixed a shortcut in SQLiteBase.GetValue which was insufficient for international environments. The shortcut was removed and the "proper" procedure put in. </UL> <P><STRONG>1.0.19 - October 5, 2005</STRONG></P> <UL> <LI> Code merge with SQLite 3.2.7 <LI> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 916 917 918 919 920 921 922 923 924 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 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 | Fixed a shortcut in SQLiteBase.GetValue which was insufficient for international environments. The shortcut was removed and the "proper" procedure put in. </UL> <P><STRONG>1.0.19 - October 5, 2005</STRONG></P> <UL> <LI> Code merge with SQLite 3.2.7 <LI> Fixed bugs in the CE port code (os_wince.c) which were brought to light by recent changes in the SQLite engine. <LI> Recompiled and modified to be compatible with the September VS2005 Release Candidate.<BR> Beta 2 users should continue to use 1.0.18.1</LI></UL> <P><STRONG>1.0.18.1 - September 19, 2005</STRONG></P> <UL> <LI> Code merge with SQLite 3.2.6</LI></UL> <P><STRONG>1.0.18 - September 1, 2005</STRONG></P> <UL> <li> Added type-specific method calls when using the various SQLite classes that would've normally returned a a generic Db base class, which aligns the code better with the Microsoft-supplied data providers.</li></UL> <p><b>1.0.17 - August 26, 2005</b></p> <ul> <li> Code merge with SQLite 3.2.5 <li> Added Itanium and x64 build settings to the project (needs testing) <li> Bugfixes and enhancements to several schema types <li> Additional design-time support to include index and foreign key enumerations. Requires re-registering the designer using INSTALL.CMD. The new designer code now allows the VS query designer and typed datasets to automatically link up foreign keys, use indexes, and automatically generate relationships from the schema.<li> Additional static methods on SQLiteConnection to create a database file, encrypt a file using the Encrypted File System (EFS) on NTFS (requires NT 2K or above) and NTFS file compression</li> </ul> <p><b>1.0.16 - August 24, 2005</b></p> <ul> <li> Code merge with SQLite 3.2.4 with the large delete bugfix in CVS (which will become 3.2.5 soon) <li> Added new GetSchema() types: IndexColumns, ViewColumns, ForeignKeys</li> </ul> <p><b>1.0.15 - August 22, 2005</b><br> </p> <ul> <li> Code merge with SQLite 3.2.3 <LI> Minor updates for better design-time experience. More design-time code to follow in subsequent releases.</LI> </ul> <p><b>1.0.14 - August 16, 2005</b><br> </p> <ul> <li> Fixed a bug in the SQLiteDataAdapter due to insufficient implementation of the class. The RowUpdating and RowUpdated events are now properly implemented, but unfortunately inserting and updating data in a DataTable or DataSet is now much slower. This is the proper design however, so the changes are here to stay. <LI> Lots of schema changes to support Visual Studio's Data Designer architecture.<li>Added Designer support for the provider. It's not 100%, but you can design queries, add typed datasets and perform quite a number of tasks all within Visual Studio now.</li></ul> <P><B>1.0.13 - August 8, 2005</B><BR> </P> <DIV> <UL> <LI> Fixed a named parameter bug in the base SQLite_UTF16 class, which of course only showed up when a database connection was opened using the UseUTF16Encoding=True parameter. <LI> Fixed a performance issue in SQLite_UTF16 involving string marshaling.</LI></UL> </DIV> <P><B>1.0.12 - August 5, 2005</B><BR> </P> <DIV> <UL> <LI> Full support for the Compact Framework. Each build (Debug/Release) now has a platform, either Win32 or Compact Framework. The correct projects are built accordingly. See the <A href="#redist">Distributing SQLite</A> section for information on what files need to be distributed for each platform. <LI> Modified SQLite3.Reset() and Step() functions to transparently handle timeouts while waiting on the database to become available (typically when a writer is waiting on a reader to finish, or a reader is waiting on a writer to finish). <LI> Lots of code cleanup as suggested by the Code Analyzer (FxCop). <LI> Lots of updates to the helpfile (as you can see). <LI> Statements were already prepared lazily in a SQLiteCommand, but now its even more lazy. Statements are now only prepared if the statements haven't been previously prepared and a Prepare() function is called (and the command is associated with a connection) or just prior to the command being executed. </LI></UL> </DIV> <P><B>1.0.11 - August 1, 2005</B><BR> </P> <UL> <LI> <STRONG>For everything except the Compact Framework, System.Data.SQLite.DLL is now the <EM>only</EM> DLL required to use this provider!</STRONG> The assembly is now a multi-module assembly, containing both the native SQLite3 codebase and the C# classes built on top of it. The Compact Framework version (when completed) will not be able to support this feature, so backwards compatibility with the Compact Framework has been preserved for the future. <LI> Fixed a bug in SQLiteCommand.ExecuteScalar() that caused it to stop executing commands once it obtained the first column of the first row-returning resultset. Any remaining statements after the row-returning statement was ignored. </LI> </UL> <P><B>1.0.10 - June 10, 2005</B><BR> </P> <UL> <LI> Fixed a bug in the SQLite3.cs Prepare() function that created a statement even when the SQLite engine returned a NULL pointer. Typically this occurs when multiple statements are processed and there are trailing comments at the end of the statement. <LI> Fixed a bug in SQLiteStatement.cs that retrieved parameter names for a parameterized query. SQLite's parameters are 1-based, and the function was starting at 0. This was fine when all parameters were unnamed, but for named parameters it caused the parameters to be out of whack. </LI> </UL> <P><B>1.0.09a - May 25, 2005</B><BR> </P> <UL> <LI> Fixed a broken helpfile and corrected some obsolete help remarks in SQLiteFunction.cs <LI> Added a version resource to the SQLite.Interop.DLL. </LI></UL> <P><B>1.0.09 - May 24, 2005</B><BR> </P> <UL> <LI> |
︙ | ︙ | |||
1124 1125 1126 1127 1128 1129 1130 | Code merged the SQLite 3.14 source. </LI> </UL> <P><B>1.0.07 - Mar 5, 2005</B><BR> </P> <UL> <LI> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 | Code merged the SQLite 3.14 source. </LI> </UL> <P><B>1.0.07 - Mar 5, 2005</B><BR> </P> <UL> <LI> Made more optimizations to frequently-called functions, resulting in significant performance gains in all tests. <LI> Recompiled the binaries using the latest VS2005 February CTP, resulting in yet more significant speed gains. The 100k insert test used to take 3.5 seconds and the insertwithidentity took almost 8 seconds. With the above two changes, those tests are now executing in 1.9 and 4.9 seconds respectively.</LI></UL> <P><B>1.0.06 - Mar 1, 2005<BR> </B> </P> <UL> <LI> Speed-ups to SQLiteDataReader. It was interop'ing unnecessarily every time it tried to fetch a field due to a logic error. <LI> Changed/Added some code to SQLiteConvert's internal DbType, Type and TypeAffinity functions. <LI> Fixed the SQLiteDataReader to obey the flags set in the optional CommandBehavior flag from SQLiteCommand.ExecuteReader(). <LI> Changed the default page size to 1024 to reflect the defaults of SQLite. Ignores the "Page Size" connection string option for memory databases, as tests revealed that changing it resulted in memory corruption errors. <LI> Performance enhancements to the SQLiteCommand and SQLiteStatement classes which reduced the 100,000 row insert execution time as well as the various Function execution times significantly. </LI> </UL> <P><B>1.0.05 - Feb 25, 2005</B> </P> <UL> <LI> Fixed the SQLite3 C# class step/reset functions to accomodate schema changes that invalidate a prepared statement. Statements are recompiled transparently. <LI> Moved all native DLL declarations to an UnsafeNativeMethods class. <LI> Split several classes into their own modules for readability. <LI> Renamed many internal variables, reviewed access to variables marked as internal and altered their protection levels accordingly. <LI> Due to the presence of the altered sqlite3 codebase and so many added interop functions, I decided to rename the sqlite3 C project and the DLL to SQLite.Interop.DLL. This is the same core sqlite3 codebase but designed specifically for this ADO.NET provider. This eliminates any possibility of someone dropping another build of sqlite3.dll into the system and rendering the provider inoperable. In the future if the folks at sqlite.org finally introduce a method of retrieving column usage for an arbitrary prepared statement, I'll retool this library to be a lightweight function call wrapper around the core binary distribution. <LI> Added [SuppressUnmanagedCodeSecurity] attribute to the UnsafeNativeMethods class which brings VS2005 November CTP execution speeds inline with the December CTP. <LI> Added a <B>bin</B> directory to the project root where pre-compiled binaries can be found. <LI> Added a <B>doc</B> directory where preliminary documentation on the class library can be found. <LI> Documented a lot more of the classes internally. </LI> </UL> <P><B>1.0.04 - Feb 24, 2005</B> </P> <UL> <LI> Removed the SQLiteContext class and revamped the way UserFunctions work to simplify the imlementation. <LI> Fixed a counting bug in the TestCases class, specifically in the function tests where I wasn't resetting the counter and it was consequently reporting intrinsic and raw select calls as being much much faster than they actually were. The numbers are now much closer to what I expected for performance, with .NET user-functions still being the slowest, but only by a small margin. <LI> Small performance tweaks to SQLiteDataReader. <LI> Added PageSize to the SQLiteConnectionStringBuilder and subsequently to the SQLiteConnection <LI> Added a PRAGMA encoding=XXX execution statement to the SQLiteConnection after opening a connection. </LI> </UL> <P><B>1.0.03 - Feb 23, 2005</B> </P> <UL> <LI> Fixed up SQLiteCommandBuilder to correct implementation errors, which resulted in an enormous performance boost in the InsertMany test. 10,000 row insert that executed in 1500ms now executes in 500ms. <LI> Fixed several errors in the SQLite3_UTF16 class. ToString() was working incorrectly and the Open() method failed to register user defined functions and collations. <LI> Fixed a bug in SQLiteCommand.ClearCommands() whereby only the first statement was being properly cleaned up. <LI> Fixed a bug in SQLiteDataReader whereby calling NextResult() would not properly reset the previously-executed command in the sequence. <LI> Added an InsertManyWithIdentityFetch test, which appends a select clause to populate the ID of the last inserted row into the InsertCommand, demonstrating ADO.NET's ability to auto-fetch identity columns on insert. </LI> </UL> <P><B>1.0.02 - Feb 21, 2005</B></P> <UL> <LI> Tweaks to the xxx_interop functions that return char *'s, so they also return the length. Saves an interop call to get the UTF-8 string length during conversion to a .NET string. <LI> Reworked the whole interop.c thing into interop.h and reduced the code required to merge the main sqlite3 codebase. <LI> Added support for user-defined collations. </LI> </UL> <hr /> <div id="footer"> |
︙ | ︙ |
︙ | ︙ | |||
73 74 75 76 77 78 79 | engine (compared to other providers and engines)</a></p> <br> <h1 class="heading">SQLite.NET Provider Features</h1> <p>This SQLite provider implements every feature of the underlying SQLite database engine without omission. Here's a brief summary:</p> <UL> <LI> | | | | < < | < < < < < | 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 | engine (compared to other providers and engines)</a></p> <br> <h1 class="heading">SQLite.NET Provider Features</h1> <p>This SQLite provider implements every feature of the underlying SQLite database engine without omission. Here's a brief summary:</p> <UL> <LI> Written from scratch on VS2005/2008 specifically for ADO.NET, implenting all the base classes and features recently introduced in the framework, including automatic transaction enlistment.<li>Supports the Full and Compact .NET Framework, as well as native C/C++ development. 100% binary compatible with the original sqlite3.dll.</li> <li>Full support for Mono via a "managed only" provider that runs against the official SQLite 3.6.1 or higher library.</li> <li>Full Entity Framework support (ADO.NET 3.5 SP1)</li> <li> On the Compact Framework, it is faster than Sql Server Mobile. SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime, runs queries faster, and has a smaller database file size as well. </li> <li>Encrypted database support. Encrypted databases are fully encrypted and support both binary and cleartext password types. </li> <li>Visual Studio 2005/2008 Design-Time Support. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc.</li> <li>Full SQLite schema editing inside Visual Studio. You can create/edit tables, views, triggers, indexes, check constraints and foreign keys. </li> <li> Single file redistributable (except Compact Framework). The core sqlite3 codebase and the ADO.NET wrapper are combined into one multi-module assembly. </li> <li>Binaries included for Itanium, x64, x86 and ARM processors. </li> <li> DbProviderFactory support. </li> <li> Full support for ATTACH'ed databases. Exposed as <i>Catalogs</i> in the schema. When cloning a connection, all attached databases are automatically re-attached to the new connection. </li> <li> |
︙ | ︙ | |||
137 138 139 140 141 142 143 | implement as user-defined functions and uses the same base class. </li> <li> Full source for the entire engine and wrapper. No copyrights. Public Domain. 100% free for commercial and non-commercial use. </li> </UL> <br> <h1 class="heading">Distributing the Binaries (Desktop)</h1> | | | | | < < | < < < < < | | | < | | | 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 | implement as user-defined functions and uses the same base class. </li> <li> Full source for the entire engine and wrapper. No copyrights. Public Domain. 100% free for commercial and non-commercial use. </li> </UL> <br> <h1 class="heading">Distributing the Binaries (Desktop)</h1> <p><b>System.Data.SQLite.DLL</b> is a mixed assembly signed with a strong name in case you want to add it to the Global Assembly Cache (GAC). This is the only DLL required to be redistributed with your SQLite.NET application(s). It comes in 3 flavors: Win32, Itanium and x64 (AMD64).</p> <h1 class="heading">Distributing the Binaries (Compact Framework)</h1> <p><b>System.Data.SQLite.DLL </b>and <b>SQLite.Interop.XXX.DLL</b> must be deployed on the Compact Framework. The XXX is the build number of the System.Data.SQLite library (e.g. "076"). SQLite.Interop.XXX is a fully native assembly compiled for the ARM processor, and System.Data.SQLite is the fully-managed Compact Framework assembly.</p> <hr /> <div id="footer"> <p> <a href="mailto:sqlite-users@sqlite.org?subject=SQLite.NET%20Class%20Library%20Documentation%20Feedback:%20Welcome"> Send comments on this topic.<!--[if gte IE 5]><tool:tip element="seeAlsoToolTip" avoidmouse="false" /><tool:tip element="languageFilterToolTip" avoidmouse="false" /><![endif]--> </div> </div> </body> </html> |
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
1 2 3 4 5 6 7 | ############################################################################### # # embed.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Application Embedding Initialization File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # embed.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Application Embedding Initialization File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ |
1 2 3 4 5 6 7 | ############################################################################### # # init.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Interpreter Initialization File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # init.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Interpreter Initialization File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ | |||
74 75 76 77 78 79 80 | proc getEnvironmentVariable { name } { # # NOTE: This should work properly in both Tcl and Eagle. # return [expr {[info exists ::env($name)] ? $::env($name) : ""}] } | < < < < < < < < < < < < < < < < < < < | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | proc getEnvironmentVariable { name } { # # NOTE: This should work properly in both Tcl and Eagle. # return [expr {[info exists ::env($name)] ? $::env($name) : ""}] } proc getCompileInfo {} { # # NOTE: Return the important compile-time information for use by the # setup or other callers. # return [expr {[isEagle] ? [lappend result \ TimeStamp $::eagle_platform(timeStamp) \ |
︙ | ︙ | |||
765 766 767 768 769 770 771 | unset -nocomplain process; # dispose } } # # NOTE: This proc can be used to dynamically compile C# code in a script. # | | < | > < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 | unset -nocomplain process; # dispose } } # # NOTE: This proc can be used to dynamically compile C# code in a script. # proc compileCSharp { string resultsVarName errorsVarName args } { # # NOTE: Create the C# code provider object (i.e. the compiler). # set provider [object create -alias Microsoft.CSharp.CSharpCodeProvider] # # NOTE: Create the object that provides various parameters to the C# # code provider (i.e. the compiler options). # set parameters [object create -alias \ System.CodeDom.Compiler.CompilerParameters] # # NOTE: By default, we do not want to persist the generated assembly # to disk. # $parameters GenerateInMemory true # # NOTE: Process any extra compiler settings the caller may have # provided. # foreach {name value} $args { $parameters -nocase $name $value |
︙ | ︙ | |||
856 857 858 859 860 861 862 863 864 | unset provider; # dispose # # NOTE: Fetch the collection of compiler errors (which may be empty). # set errors [$results -alias Errors] # # NOTE: It is assumed that no assembly was generated if there were | > > > > > | < | < < < < < < < < < | 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | unset provider; # dispose # # NOTE: Fetch the collection of compiler errors (which may be empty). # set errors [$results -alias Errors] # # NOTE: How many compile errors? # set count [$errors Count] # # NOTE: It is assumed that no assembly was generated if there were # any compile errors. # if {$count > 0} then { # # NOTE: Compilation of the assembly failed. # set code Error # # NOTE: Prepare to transfer the error messages to the caller. # upvar 1 $errorsVarName local_errors for {set index 0} {$index < $count} {incr index} { # # NOTE: Get the compiler error object at this index. # set error [$errors -alias Item $index] # |
︙ | ︙ | |||
1277 1278 1279 1280 1281 1282 1283 | } } } return [list "cannot determine if your build is the latest"] } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 | } } } return [list "cannot determine if your build is the latest"] } proc parray { a {pattern *} } { upvar 1 $a array if {![array exists array]} { error "\"$a\" isn't an array" } |
︙ | ︙ | |||
1646 1647 1648 1649 1650 1651 1652 | # # NOTE: This should work properly in Tcl only. # # NOTE: Forget any previous commands that were imported from this # namespace into the global namespace? # if {$forget} then { | | | | | | | | < < < < | < < < < < | > | > | | | | | 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 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 | # # NOTE: This should work properly in Tcl only. # # NOTE: Forget any previous commands that were imported from this # namespace into the global namespace? # if {$forget} then { namespace forget ${namespace}::* } # # NOTE: Process each of the commands to be exported from this # namespace and import it into the global namespace, if # necessary. # foreach export $exports { # # NOTE: Force importing of our exported commands into the # global namespace? Otherwise, see if the command is # already present in the global namespace before trying # to import it. # if {$force || [llength [info commands ::$export]] == 0} then { namespace export $export if {$force} then { namespace eval :: [list namespace import -force \ ${namespace}::$export] } else { namespace eval :: [list namespace import \ ${namespace}::$export] } } } } # # NOTE: Exports the necessary commands from this package and import # them into the global namespace. # exportAndImportPackageCommands [namespace current] [list \ exportAndImportPackageCommands isEagle isMono getEnvironmentVariable \ getPluginPath getDictionaryValue getColumnValue getRowColumnValue \ appendArgs haveGaruda lappendArgs readFile filter map reduce \ getPlatformInfo execShell] false false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } # # NOTE: Provide the Eagle library package to the interpreter. # package provide EagleLibrary \ [expr {[isEagle] ? [info engine PatchLevel] : 1.0}] } |
1 2 3 4 5 6 7 | ############################################################################### # # pkgIndex.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # pkgIndex.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ |
1 2 3 4 5 6 7 | ############################################################################### # # pkgIndex.tcl -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # pkgIndex.tcl -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ |
1 2 3 4 5 6 7 | ############################################################################### # # safe.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Safe Interpreter Initialization File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # safe.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Safe Interpreter Initialization File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ | |||
76 77 78 79 80 81 82 | ########################################################################### } # # NOTE: Provide the Eagle "safe" package to the interpreter. # package provide EagleSafe \ | | | 76 77 78 79 80 81 82 83 84 85 | ########################################################################### } # # NOTE: Provide the Eagle "safe" package to the interpreter. # package provide EagleSafe \ [expr {[isEagle] ? [info engine PatchLevel] : 1.0}] } |
1 2 3 4 5 6 7 | ############################################################################### # # shell.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Shell Initialization File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # shell.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Shell Initialization File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ | |||
48 49 50 51 52 53 54 | ########################################################################### } # # NOTE: Provide the Eagle shell package to the interpreter. # package provide EagleShell \ | | | 48 49 50 51 52 53 54 55 56 57 | ########################################################################### } # # NOTE: Provide the Eagle shell package to the interpreter. # package provide EagleShell \ [expr {[isEagle] ? [info engine PatchLevel] : 1.0}] } |
1 2 3 4 5 6 7 | ############################################################################### # # test.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Initialization File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # test.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Initialization File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ | |||
168 169 170 171 172 173 174 | proc sourceIfValid { type fileName } { if {[string length $fileName] > 0} then { if {[file exists $fileName]} then { tputs $::test_channel [appendArgs \ "---- evaluating $type file: \"" $fileName \"\n] | | | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | proc sourceIfValid { type fileName } { if {[string length $fileName] > 0} then { if {[file exists $fileName]} then { tputs $::test_channel [appendArgs \ "---- evaluating $type file: \"" $fileName \"\n] if {[catch {uplevel 1 [list source $fileName]} error] != 0} then { tputs $::test_channel [appendArgs \ "---- error during $type file: " $error \n] # # NOTE: The error has been logged, now re-throw it. # error $error $::errorInfo $::errorCode |
︙ | ︙ | |||
427 428 429 430 431 432 433 | proc isExitOnComplete {} { return [expr {[info exists ::test_exit_on_complete] && \ [string is boolean -strict $::test_exit_on_complete] && \ $::test_exit_on_complete}] } | < < < < | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | proc isExitOnComplete {} { return [expr {[info exists ::test_exit_on_complete] && \ [string is boolean -strict $::test_exit_on_complete] && \ $::test_exit_on_complete}] } proc runTestPrologue {} { # # HACK: We do not want to force every third-party test suite # to come up with a half-baked solution to finding its # own files. # if {![info exists ::no(prologue.eagle)] && ![info exists ::path]} then { |
︙ | ︙ | |||
548 549 550 551 552 553 554 | if {$code == 0 && [regexp -- {\s==== (.*?) FAILED\s} $result]} then { set code 1 } # # NOTE: Display and log the result of the test we just completed. # | | > | > | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | if {$code == 0 && [regexp -- {\s==== (.*?) FAILED\s} $result]} then { set code 1 } # # NOTE: Display and log the result of the test we just completed. # host result $code $result tlog $result # # NOTE: If the test failed with an actual error (i.e. not just a # test failure), make sure we do not obscure the error # message with test suite output. # if {$error} then { tputs $::test_channel \n; # emit a blank line. } # # NOTE: If this test failed and the stop-on-failure flag is set, # raise an error now. If we are being run from inside # runAllTests, this will also serve to signal it to stop # processing further test files. # if {$code != 0 && [isStopOnFailure]} then { host result Error "OVERALL RESULT: STOP-ON-FAILURE\n" tlog "OVERALL RESULT: STOP-ON-FAILURE\n" error ""; # no message } } else { if {$error} then { tputs $::test_channel [appendArgs "ERROR (runTest): " $result \n] } |
︙ | ︙ | |||
695 696 697 698 699 700 701 | catch {set array(tclinterps,$index) [llength [tcl interps]]} catch {set array(tclthreads,$index) [llength [tcl threads]]} catch {set array(tclcommands,$index) [llength [tcl command list]]} } } | | | < < < < < < < < < < < < < | 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 | catch {set array(tclinterps,$index) [llength [tcl interps]]} catch {set array(tclthreads,$index) [llength [tcl threads]]} catch {set array(tclcommands,$index) [llength [tcl command list]]} } } proc reportTestStatistics { channel fileName varName } { set statistics [list afters variables commands procedures files \ temporaryFiles channels aliases interpreters environment] if {[isEagle]} then { # # TODO: For now, tracking "leaked" assemblies is meaningless because # the .NET Framework has no way to unload them without tearing # down the entire application domain. # lappend statistics scopes objects callbacks types interfaces \ namespaces processes connections transactions modules \ delegates tcl tclinterps tclthreads tclcommands; # assemblies } # # NOTE: Show what leaked, if anything. # upvar 1 $varName array foreach statistic $statistics { if {$array($statistic,after) > $array($statistic,before)} then { tputs $channel [appendArgs "==== \"" $fileName "\" LEAKED " \ $statistic \n] if {[info exists array($statistic,before,list)]} then { tputs $channel [appendArgs "---- " $statistic " BEFORE: " \ $array($statistic,before,list) \n] } if {[info exists array($statistic,after,list)]} then { tputs $channel [appendArgs "---- " $statistic " AFTER: " \ $array($statistic,after,list) \n] } } } } proc formatList { list {default ""} {columns 1} } { set count 1 set result "" foreach item $list { |
︙ | ︙ | |||
853 854 855 856 857 858 859 | proc clearTestPercent { channel } { if {[isEagle]} then { host title "" } } | | | | 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 | proc clearTestPercent { channel } { if {[isEagle]} then { host title "" } } proc reportTestPercent { channel percent } { set status [appendArgs "---- test suite running, about " $percent \ "% complete..."] tputs $channel [appendArgs $status \n] if {[isEagle]} then { host title $status } } |
︙ | ︙ | |||
889 890 891 892 893 894 895 | # # NOTE: So far, we have run no tests. # set count 0 # | | < | | < < | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 | # # NOTE: So far, we have run no tests. # set count 0 # # NOTE: So far, no files have had no files with failing tests. # set failed [list] # # NOTE: Process each file name we have been given by the caller... # set total [llength $fileNames]; set lastPercent -1 foreach fileName $fileNames { # # NOTE: In terms of files, not tests, what percent done are we now? # set percent [formatDecimal \ [expr {100.0 * ($count / double($total))}]] if {$percent != $lastPercent} then { reportTestPercent $channel $percent set lastPercent $percent } # # NOTE: Skipping over any file name that matches a pattern in the # list of file names to skip. # |
︙ | ︙ | |||
1027 1028 1029 1030 1031 1032 1033 | # incr count # # NOTE: In terms of files, not tests, what percent done are we now? # set percent [formatDecimal \ | | | < < | 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 | # incr count # # NOTE: In terms of files, not tests, what percent done are we now? # set percent [formatDecimal \ [expr {100.0 * ($count / double($total))}]] if {$percent != $lastPercent} then { reportTestPercent $channel $percent set lastPercent $percent } # # NOTE: Record failed test count after this file. # if {[isEagle]} then { |
︙ | ︙ | |||
1071 1072 1073 1074 1075 1076 1077 | # recordTestStatistics leaks after # # NOTE: Determine if any resource leaks have occurred and # output diagnostics as necessary if they have. # | | | | < < | 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | # recordTestStatistics leaks after # # NOTE: Determine if any resource leaks have occurred and # output diagnostics as necessary if they have. # reportTestStatistics $channel $fileName leaks } } else { # # NOTE: This file does not actually count towards the total (i.e. # it contains no actual tests). # incr total -1 } # # NOTE: In terms of files, not tests, what percent done are we now? # set percent [formatDecimal \ [expr {100.0 * ($count / double($total))}]] if {$percent != $lastPercent} then { reportTestPercent $channel $percent set lastPercent $percent } # # NOTE: If the test file raised an error (i.e. to indicate a # test failure with the stop-on-failure flag enabled), # break out of the test loop now. |
︙ | ︙ | |||
1114 1115 1116 1117 1118 1119 1120 | incr total -1 } # # NOTE: In terms of files, not tests, what percent done are we now? # set percent [formatDecimal \ | | | < < | < < < < | < < < | < < < < < < < < | 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 | incr total -1 } # # NOTE: In terms of files, not tests, what percent done are we now? # set percent [formatDecimal \ [expr {100.0 * ($count / double($total))}]] if {$percent != $lastPercent} then { reportTestPercent $channel $percent set lastPercent $percent } } # # NOTE: Reset the host title because we may have changed it in the for # loop (above). # clearTestPercent $channel tputs $channel [appendArgs "---- sourced " $count " test " \ [expr {$count > 1 ? "files" : "file"}] \n] # # NOTE: Show the files that had failing tests. # if {[llength $failed] > 0} then { tputs $channel [appendArgs "---- files with failing tests: " $failed \n] } } proc configureTcltest { imports force } { if {[isEagle]} then { # # NOTE: Fake having the tcltest package. # package provide tcltest 2.2.10; # Tcl 8.4 # # HACK: Compatibility shim(s) for use with various tests in the Tcl # test suite. # interp alias {} testConstraint {} haveOrAddConstraint interp alias {} ::tcltest::testConstraint {} haveOrAddConstraint # # NOTE: This is needed by most tests in the Tcl test suite. # proc ::tcltest::cleanupTests { args } {} } else { # # NOTE: Load the tcltest package. # package require tcltest # |
︙ | ︙ | |||
1260 1261 1262 1263 1264 1265 1266 | if {[info exists test_flags(-constraints)]} then { eval lappend eagle_tests(constraints) $test_flags(-constraints) } } } | < < < < | 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 | if {[info exists test_flags(-constraints)]} then { eval lappend eagle_tests(constraints) $test_flags(-constraints) } } } proc getPassPercentage {} { if {$::eagle_tests(total) > 0} then { return [expr \ {100.0 * (($::eagle_tests(passed) + \ $::eagle_tests(skipped)) / \ double($::eagle_tests(total)))}] } |
︙ | ︙ | |||
1285 1286 1287 1288 1289 1290 1291 | {100.0 * ($::eagle_tests(skipped) / \ double($::eagle_tests(total)))}] } return 0; # no tests were run, etc. } | | | < < < < < < < < < < < < | < < < < | | | | | | < < < | | | | | | | | < > > | < < < < < < < < < < < < < < < | < < < < < < < | | | | | | | | > | | | < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | {100.0 * ($::eagle_tests(skipped) / \ double($::eagle_tests(total)))}] } return 0; # no tests were run, etc. } proc cleanupThread { thread } { if {[$thread IsAlive]} then { if {[catch {$thread Interrupt} error]} then { tputs $::test_channel [appendArgs \ "---- failed to interrupt test thread \"" \ $thread "\": " $error \n] } if {[$thread IsAlive]} then { if {[catch {$thread Abort} error]} then { tputs $::test_channel [appendArgs \ "---- failed to abort test thread \"" \ $thread "\": " $error \n] } if {![$thread IsAlive]} then { tputs $::test_channel [appendArgs \ "---- test thread \"" $thread "\" aborted\n"] return true; # aborted? } } else { tputs $::test_channel [appendArgs \ "---- test thread \"" $thread "\" interrupted\n"] return true; # interrupted? } } else { return true; # already dead? } return false; # still alive (or error). } proc calculateBogoCops { {milliseconds 2000} } { set bgerror [interp bgerror {}] interp bgerror {} "" try { set flags [after flags] after flags =Immediate try { set event [after $milliseconds [list interp cancel]] set before [info cmdcount] catch {time {nop} -1}; # internal busy loop. set after [info cmdcount] # # HACK: Mono has a bug that results in excessive trailing zeros # here (Mono bug #655780). # if {[isMono]} then { return [expr \ {double(($after - $before) / ($milliseconds / 1000.0))}] } else { return [expr {($after - $before) / ($milliseconds / 1000.0)}] } } finally { if {[info exists event]} then { catch {after cancel $event} } after flags =$flags } } finally { interp bgerror {} $bgerror } } proc getMachineForTclShell {} { try { # # NOTE: Get a temporary file name for the script we are going to # use to query the machine type for the native Tcl shell. # set fileName [file tempname] # # NOTE: Since the native Tcl shell cannot simply evaluate a string # supplied via the command line, write the script to be # evaluated to the temporary file. # writeFile $fileName {puts -nonewline stdout $tcl_platform(machine)} # # NOTE: Evaluate the script using the native Tcl shell, trim the # excess whitespace from the output, and return it to the # caller. # if {[catch {string trim \ [testExec $::test_tclsh [list] \ [appendArgs \" $fileName \"]]} result] == 0} then { # # NOTE: Success, return the result to the caller. # return $result } else { # |
︙ | ︙ | |||
1507 1508 1509 1510 1511 1512 1513 | # type for the native Tcl shell. # catch {file delete $fileName} } } } | < < < < < < < < < < < < | 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | # type for the native Tcl shell. # catch {file delete $fileName} } } } proc machineToPlatform { machine } { switch -exact -nocase -- $machine { amd64 { return x64 } intel { if {$::tcl_platform(platform) eq "windows"} then { |
︙ | ︙ | |||
1629 1630 1631 1632 1633 1634 1635 | # # NOTE: Setup the test path relative to the library path. # if {![interp issafe] && ![info exists ::test_path]} then { # # NOTE: Try the source release directory structure. # | | | | < | | | 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 | # # NOTE: Setup the test path relative to the library path. # if {![interp issafe] && ![info exists ::test_path]} then { # # NOTE: Try the source release directory structure. # set ::test_path [file join [file normalize [file dirname [file dirname \ [info library]]]] Library Tests] if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Try for the test package directory. # set ::test_path [file join [file normalize [file dirname \ [file dirname [info script]]]] Test1.0] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: This must be a binary release, no "Library" directory then. # Also, binary releases have an upper-case "Tests" directory # name that originates from the "update.bat" tool. This must # match the casing used in "update.bat". # set ::test_path [file join [file normalize [file dirname [file dirname \ [info library]]]] Tests] } } # # NOTE: Fake having the tcltest package unless we are prevented. # if {![info exists ::no(configureTcltest)]} then { |
︙ | ︙ | |||
1694 1695 1696 1697 1698 1699 1700 | return 0; # no tests were run, etc. } # # NOTE: Setup the test path relative to the path of this file. # | | | 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 | return 0; # no tests were run, etc. } # # NOTE: Setup the test path relative to the path of this file. # if {![info exists ::test_path]} then { # # NOTE: Try the source release directory structure. # set ::test_path [file join [file normalize [file dirname \ [file dirname [file dirname [info script]]]]] Library Tests] if {![file exists $::test_path] || \ |
︙ | ︙ | |||
1726 1727 1728 1729 1730 1731 1732 | [file dirname [file dirname [info script]]]]] Tests] } } # # NOTE: Load and configure the tcltest package unless we are prevented. # | | | | | | 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 | [file dirname [file dirname [info script]]]]] Tests] } } # # NOTE: Load and configure the tcltest package unless we are prevented. # if {![info exists ::no(configureTcltest)]} then { configureTcltest [list test testConstraint] false } # # NOTE: We need several of our test related commands in the global # namespace as well. # exportAndImportPackageCommands [namespace current] [list addConstraint \ calculateRelativePerformance haveConstraint haveOrAddConstraint \ processTestArguments getTemporaryPath getTestLog getTestLogId getFiles \ getConstraints getTestFiles getTestRunId execTestShell runTestPrologue \ runTestEpilogue runTest runAllTests fixConstraints sourceIfValid \ isExitOnComplete getPassPercentage getSkipPercentage testExec tlog \ tputs formatDecimal formatList configureTcltest tsource testShim] \ false false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } # # NOTE: Provide the Eagle test package to the interpreter. # package provide EagleTest \ [expr {[isEagle] ? [info engine PatchLevel] : 1.0}] } |
1 2 3 4 5 6 7 | ############################################################################### # # vendor.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Vendor Initialization File # | | < < < < < | < < < | < < < < < < | < < | | < < < < < < < < | | | < < < < < | < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 | ############################################################################### # # vendor.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Vendor Initialization File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### # # STUB: This script file is a placeholder. This file, when present, is always # evaluated when an interpreter is initialized. Vendors distributing # Eagle can place custom application-specific, interpreter-specific # initialization and/or customizations in here. Additionally, this file # may contain per-interpreter customizations required when porting to # new platforms, operating systems, etc. # # # NOTE: Use our own namespace here because even though we do not directly # support namespaces ourselves, we do not want to pollute the global # namespace if this script actually ends up being evaluated in Tcl. # namespace eval ::Eagle { if {[isEagle]} then { # # NOTE: This script library helper procedure helps to establish the link # between the System.Data.SQLite test package and Eagle. # proc addTestSuiteToAutoPath { channel quiet } { # # NOTE: Start with the directory containing this file. # set dir [file normalize [file dirname [info script]]] # # NOTE: Keep going until the directory name is empty OR is actually the # root of the associated volume. # while {[string length $dir] > 0 && \ [lsearch -exact -nocase -- [file volumes] $dir] == -1} { # # NOTE: Does this directory have the necessary sub-directory that # contains a package index file? # if {[file exists [file join $dir Tests]] && \ [file isdirectory [file join $dir Tests]] && \ [file exists [file join $dir Tests pkgIndex.eagle]] && \ [file isfile [file join $dir Tests pkgIndex.eagle]]} then { # # NOTE: Ok, show the directory we found. # set dir [file join $dir Tests] # # NOTE: We found the necessary directory to add to the auto-path; # However, we cannot simply add it to the auto-path directly # because the auto-path is dynamically constructed after this # script is evaluated; therefore, set the Eagle library path # environment variable and force the appropriate internal path # list to be refreshed. # if {![info exists ::env(EAGLELIBPATH)] || \ [lsearch -exact $::env(EAGLELIBPATH) $dir] == -1} then { # # NOTE: If we have NOT been instructed to be quiet, report now. # if {!$quiet} then { puts -nonewline $channel [appendArgs \ "Found vendor-specific test package directory \"" $dir \ "\", adding...\n"] } lappend ::env(EAGLELIBPATH) $dir object invoke Utility RefreshAutoPathList } # # NOTE: We are done, return success. # return true |
︙ | ︙ | |||
137 138 139 140 141 142 143 | } # # NOTE: Directory not found, return failure. # return false } | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < | < < < < < < | 103 104 105 106 107 108 109 110 111 112 113 | } # # NOTE: Directory not found, return failure. # return false } addTestSuiteToAutoPath stdout false } } |
1 2 3 4 5 6 7 | ############################################################################### # # constraints.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Constraints File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # constraints.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Constraints File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ | |||
118 119 120 121 122 123 124 | # # HACK: Needed by tests "socket-*.*". # if {![info exists ::no(compileNetwork)]} then { addConstraint compile.NETWORK } | < < < < < < < < < < < < < < < < < < < < < < | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | # # HACK: Needed by tests "socket-*.*". # if {![info exists ::no(compileNetwork)]} then { addConstraint compile.NETWORK } tputs $channel no\n } } proc checkForLogFile { channel } { tputs $channel "---- checking for log file... " |
︙ | ︙ | |||
553 554 555 556 557 558 559 | tputs $channel yes\n } else { tputs $channel no\n } } | | < | < < < > < < | < < < < < < < | | < | < | < < < > | | > | < < < | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | tputs $channel yes\n } else { tputs $channel no\n } } proc checkForTiming { channel threshold } { tputs $channel "---- checking for precision timing... " # # NOTE: Are we allowed to do precision timing tests? # if {![info exists ::no(timing)]} then { # # NOTE: Attempt to block for exactly one second. # set start [expr {[clock clicks -milliseconds] & 0x7fffffff}] after 1000; # wait for "exactly" one second. set stop [expr {[clock clicks -milliseconds] & 0x7fffffff}] # # NOTE: Calculate the difference between the actual and expected # number of milliseconds. # set difference [expr {abs($stop - $start - 1000)}] # # NOTE: Are we within the threshold specified by the caller? # if {$difference >= 0 && $difference <= $threshold} then { addConstraint timing tputs $channel [appendArgs "yes (0 <= " $difference " <= " \ $threshold " milliseconds)\n"] } else { tputs $channel [appendArgs "no (0 <= " $difference " > " \ $threshold " milliseconds)\n"] } } else { tputs $channel no\n } } proc checkForPerformance { channel } { tputs $channel "---- checking for performance testing... " # # NOTE: Are we allowed to do performance testing? |
︙ | ︙ | |||
767 768 769 770 771 772 773 | tputs $channel trusted\n } else { tputs $channel untrusted\n } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 | tputs $channel trusted\n } else { tputs $channel untrusted\n } } proc checkForAdministrator { channel } { tputs $channel "---- checking for administrator... " if {[isAdministrator]} then { addConstraint administrator; # running as full admin. tputs $channel yes\n |
︙ | ︙ | |||
844 845 846 847 848 849 850 | tputs $channel [appendArgs "yes (" $threadId ")\n"] } else { tputs $channel [appendArgs "no (" $threadId ")\n"] } } | < < < < < < < < < < < < < < < < < < < < | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | tputs $channel [appendArgs "yes (" $threadId ")\n"] } else { tputs $channel [appendArgs "no (" $threadId ")\n"] } } proc checkForRuntime { channel } { tputs $channel "---- checking for runtime... " # # NOTE: Are we running inside Mono (regardless of operating system)? # if {[isMono]} then { |
︙ | ︙ | |||
1111 1112 1113 1114 1115 1116 1117 | if {[string length $culture] > 0} then { # # NOTE: The culture information is present, use it and show it. # addConstraint [appendArgs culture. [string map [list - _] $culture]] | < < < < < < < < < < < < < < < < < < < < < < < < < | 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | if {[string length $culture] > 0} then { # # NOTE: The culture information is present, use it and show it. # addConstraint [appendArgs culture. [string map [list - _] $culture]] tputs $channel [appendArgs $culture \n] } else { tputs $channel [appendArgs unknown \n] } } proc checkForQuiet { channel } { |
︙ | ︙ | |||
1450 1451 1452 1453 1454 1455 1456 | tputs $channel [appendArgs "---- checking for Tcl shell... yes (" \ $result ")\n"] } else { tputs $channel "---- checking for Tcl shell... no\n" } } | < < < < < < < < < < < < < < < < < < < < < | 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | tputs $channel [appendArgs "---- checking for Tcl shell... yes (" \ $result ")\n"] } else { tputs $channel "---- checking for Tcl shell... no\n" } } proc checkForPowerShell { channel } { tputs $channel "---- checking for PowerShell... " # # NOTE: Can the PowerShell assembly be loaded? # if {[catch {object resolve System.Management.Automation} \ |
︙ | ︙ | |||
1571 1572 1573 1574 1575 1576 1577 | # NOTE: Have we not found the directory yet? # if {[string length $directory] == 0} then { # # NOTE: Registry hive where WiX install information # is stored. # | | | 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 | # NOTE: Have we not found the directory yet? # if {[string length $directory] == 0} then { # # NOTE: Registry hive where WiX install information # is stored. # set key {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML} # # NOTE: The versions of WiX that we support. # set versions [list 3.5 3.0] # |
︙ | ︙ | |||
1596 1597 1598 1599 1600 1601 1602 | [appendArgs $key \\ $version] InstallRoot \ null] \\]] # # NOTE: Does the directory name look valid and # does it actually exist? # | | > > > | | | | | | | | | | | | | | | | | | | | | | | | | | > > > > > > | 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 | [appendArgs $key \\ $version] InstallRoot \ null] \\]] # # NOTE: Does the directory name look valid and # does it actually exist? # if {[string length $directory] > 0} then { # # NOTE: Does the directory actually exist? # if {[file isdirectory $directory]} then { # # NOTE: The file name of the primary WiX assembly. # set fileName [file join $directory wix.dll] # # NOTE: We do not know the file version yet. # set version "" # # NOTE: Attempt to query the version of the file. # if {[catch {file version $fileName} version] == 0 && \ [string length $version] > 0} then { # # NOTE: Indicate where we found the file. # set where registry # # NOTE: We found it, bail out now. # break } else { # # NOTE: The file does not exist or is not properly # versioned. # set directory "" } } else { # # NOTE: The directory does not exist. # set directory "" } } } } |
︙ | ︙ | |||
1665 1666 1667 1668 1669 1670 1671 | return } } tputs $channel no\n } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 | return } } tputs $channel no\n } proc checkForManagedDebugger { channel } { tputs $channel "---- checking for managed debugger... " # # NOTE: Is the managed debugger attached? # if {[object invoke System.Diagnostics.Debugger IsAttached]} then { |
︙ | ︙ | |||
1844 1845 1846 1847 1848 1849 1850 | # NOTE: We need several of our test constraint related commands in the # global namespace. # exportAndImportPackageCommands [namespace current] [list checkForPlatform \ checkForEagle checkForGaruda checkForShell checkForDebug checkForTk \ checkForVersion checkForCommand checkForFile checkForNativeCode \ checkForTip127 checkForTip194 checkForTip241 checkForTip285 \ | | | | | | 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 | # NOTE: We need several of our test constraint related commands in the # global namespace. # exportAndImportPackageCommands [namespace current] [list checkForPlatform \ checkForEagle checkForGaruda checkForShell checkForDebug checkForTk \ checkForVersion checkForCommand checkForFile checkForNativeCode \ checkForTip127 checkForTip194 checkForTip241 checkForTip285 \ checkForPerformance checkForTiming checkForInteractive checkForLogFile \ checkForNetwork checkForCompileOption checkForUserInteraction] false \ false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } # # NOTE: Provide the Eagle test constraints package to the interpreter. # package provide EagleTestConstraints \ [expr {[isEagle] ? [info engine PatchLevel] : 1.0}] } |
1 2 3 4 5 6 7 | ############################################################################### # # epilogue.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Epilogue File # | | < < < < < < | > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 | ############################################################################### # # epilogue.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Epilogue File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### if {![info exists no([file tail [info script]])]} then { if {[info level] > 0} then { error "cannot run, current level is not global" } if {[isEagle]} then { # # NOTE: Show the current state of the memory. # catch {debug memory} memory tputs $test_channel [appendArgs "---- ending memory: " \ [formatListAsDict $memory] \n] unset memory # # NOTE: Show the current state of the native stack. # catch {debug stack true} stack tputs $test_channel [appendArgs "---- ending stack: " \ [formatListAsDict $stack] \n] unset stack } # # NOTE: Show when the tests actually ended (now). # tputs $test_channel [appendArgs "---- tests ended at " \ [clock format [clock seconds]] \n] if {[isEagle]} then { # # NOTE: Check for and display any duplicate test names that we found. In # theory, this checking may produce false positives if a test file # (or the entire test suite) is run multiple times without resetting # the test statistics and/or restarting Eagle; however, duplicate # test names must be avoided and this is considered a good trade-off. # |
︙ | ︙ | |||
64 65 66 67 68 69 70 | } unset -nocomplain name count tputs $test_channel \n; # NOTE: Blank line. if {$eagle_tests(passed) > 0} then { | | > | > | > | > | > | > > > < | > > < | | 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 | } unset -nocomplain name count tputs $test_channel \n; # NOTE: Blank line. if {$eagle_tests(passed) > 0} then { host result Ok [appendArgs "PASSED: " $eagle_tests(passed) \n] tlog [appendArgs "PASSED: " $eagle_tests(passed) \n] } if {$eagle_tests(failed) > 0} then { host result Error [appendArgs "FAILED: " $eagle_tests(failed) \n] tlog [appendArgs "FAILED: " $eagle_tests(failed) \n] if {[llength $eagle_tests(failedNames)] > 0} then { host result Error [appendArgs "FAILED: " $eagle_tests(failedNames) \n] tlog [appendArgs "FAILED: " $eagle_tests(failedNames) \n] } } if {$eagle_tests(skipped) > 0} then { host result Break [appendArgs "SKIPPED: " $eagle_tests(skipped) \n] tlog [appendArgs "SKIPPED: " $eagle_tests(skipped) \n] if {[llength $eagle_tests(skippedNames)] > 0} then { host result Break [appendArgs "SKIPPED: " $eagle_tests(skippedNames) \n] tlog [appendArgs "SKIPPED: " $eagle_tests(skippedNames) \n] } } if {$eagle_tests(total) > 0} then { host result Return [appendArgs "TOTAL: " $eagle_tests(total) \n] tlog [appendArgs "TOTAL: " $eagle_tests(total) \n] if {$eagle_tests(skipped) > 0} then { set percent [getSkipPercentage] host result Break [appendArgs "SKIP PERCENTAGE: " \ [formatDecimal $percent] %\n] tlog [appendArgs "SKIP PERCENTAGE: " [formatDecimal $percent] %\n] } set percent [getPassPercentage] host result Return [appendArgs "PASS PERCENTAGE: " \ [formatDecimal $percent] %\n] tlog [appendArgs "PASS PERCENTAGE: " [formatDecimal $percent] %\n] } else { # # NOTE: No tests. # set percent 0 } |
︙ | ︙ | |||
120 121 122 123 124 125 126 | # set passedOrSkipped [expr {$eagle_tests(passed) + \ $eagle_tests(skipped)}] if {$passedOrSkipped == $eagle_tests(total)} then { set exitCode Success | | > | > | | > > > | > > > | | | | | | | | | | < | | < | | | 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 | # set passedOrSkipped [expr {$eagle_tests(passed) + \ $eagle_tests(skipped)}] if {$passedOrSkipped == $eagle_tests(total)} then { set exitCode Success host result Ok "OVERALL RESULT: SUCCESS\n" tlog "OVERALL RESULT: SUCCESS\n" } else { set exitCode Failure host result Error "OVERALL RESULT: FAILURE\n" tlog "OVERALL RESULT: FAILURE\n" } unset passedOrSkipped } else { # # NOTE: They specified a non-default test pass threshold. Check to # make sure that we meet or exceed the requirement and then # set the exit code to success; otherwise, set it to failure. # if {$percent >= $test_threshold} then { set exitCode Success host result Ok [appendArgs "OVERALL RESULT: SUCCESS (" \ $percent "% >= " $test_threshold %)\n] tlog [appendArgs "OVERALL RESULT: SUCCESS (" \ $percent "% >= " $test_threshold %)\n] } else { set exitCode Failure host result Error [appendArgs \ "OVERALL RESULT: FAILURE (" $percent "% < " $test_threshold %)\n] tlog [appendArgs \ "OVERALL RESULT: FAILURE (" $percent "% < " $test_threshold %)\n] } } unset percent tputs $test_channel \n; # NOTE: Blank line. } else { tputs $test_channel \n; # NOTE: Blank line. if {$::tcltest::numTests(Passed) > 0} then { tputs $test_channel \ [appendArgs "PASSED: " $::tcltest::numTests(Passed) \n] } if {$::tcltest::numTests(Failed) > 0} then { tputs $test_channel \ [appendArgs "FAILED: " $::tcltest::numTests(Failed) \n] if {[llength $::tcltest::failFiles] > 0} then { tputs $test_channel \ [appendArgs "FAILED: " $::tcltest::failFiles \n] } } if {$::tcltest::numTests(Skipped) > 0} then { tputs $test_channel \ [appendArgs "SKIPPED: " $::tcltest::numTests(Skipped) \n] } if {$::tcltest::numTests(Total) > 0} then { tputs $test_channel \ [appendArgs "TOTAL: " $::tcltest::numTests(Total) \n] if {$::tcltest::numTests(Skipped) > 0} then { set percent [getSkipPercentage] tputs $test_channel [appendArgs "SKIP PERCENTAGE: " \ [formatDecimal $percent] %\n] } set percent [getPassPercentage] tputs $test_channel [appendArgs "PASS PERCENTAGE: " \ [formatDecimal $percent] %\n] } else { # # NOTE: No tests. # set percent 0 } |
︙ | ︙ | |||
228 229 230 231 232 233 234 | # NOTE: They specified a non-default test pass threshold. Check to # make sure that we meet or exceed the requirement and then # set the exit code to success; otherwise, set it to failure. # if {$percent >= $test_threshold} then { set exitCode 0; # Success. | | | | | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | # NOTE: They specified a non-default test pass threshold. Check to # make sure that we meet or exceed the requirement and then # set the exit code to success; otherwise, set it to failure. # if {$percent >= $test_threshold} then { set exitCode 0; # Success. tputs $test_channel [appendArgs "OVERALL RESULT: SUCCESS (" \ $percent "% >= " $test_threshold %)\n] } else { set exitCode 1; # Failure. tputs $test_channel [appendArgs "OVERALL RESULT: FAILURE (" \ $percent "% < " $test_threshold %)\n] } } unset percent tputs $test_channel \n; # NOTE: Blank line. |
︙ | ︙ |
1 2 3 4 5 6 7 | ############################################################################### # # pkgIndex.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # pkgIndex.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ |
1 2 3 4 5 6 7 | ############################################################################### # # pkgIndex.tcl -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # pkgIndex.tcl -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Index File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ |
1 2 3 4 5 6 7 | ############################################################################### # # prologue.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Prologue File # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############################################################################### # # prologue.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Test Prologue File # # Copyright (c) 2007-2010 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### |
︙ | ︙ | |||
46 47 48 49 50 51 52 | # sub-directory inside of the "Library" project directory # simply due to the links contained in the project file that # actually point to the "lib\Eagle1.0" sub-directory under the # solution directory. # # WARNING: The Eagle package name and version are hard-coded here. # | < < | | | | | | | | < < | 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 | # sub-directory inside of the "Library" project directory # simply due to the links contained in the project file that # actually point to the "lib\Eagle1.0" sub-directory under the # solution directory. # # WARNING: The Eagle package name and version are hard-coded here. # if {![file exists [file join $base_path lib]] || \ ![file isdirectory [file join $base_path lib]] || \ ![file exists [file join $base_path lib Eagle1.0]] || \ ![file isdirectory [file join $base_path lib Eagle1.0]] || \ ![file exists [file join $base_path lib Eagle1.0 init.eagle]] || \ ![file isfile [file join $base_path lib Eagle1.0 init.eagle]]} then { # # NOTE: We do not bother to check if the "lib" sub-directory # actually exists as a child of this one. This is the # previous (legacy) behavior (i.e. where we always went # up two levels to the base directory). # set base_path [file dirname $base_path] } } # # NOTE: Set the local root directory of the source checkout (i.e. of # Eagle or whatever project the Eagle binaries are being used by). # if {![info exists root_path]} then { |
︙ | ︙ | |||
93 94 95 96 97 98 99 | # NOTE: We extracted the local root directory of the source checkout # from Fossil. Now, make sure it is fully normalized and has no # trailing slashes. # set root_path [file normalize $directory] } | | | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | # NOTE: We extracted the local root directory of the source checkout # from Fossil. Now, make sure it is fully normalized and has no # trailing slashes. # set root_path [file normalize $directory] } unset -nocomplain directory exec pattern } # # NOTE: Set the executable file name for the process, if # necessary. # if {![info exists bin_file]} then { |
︙ | ︙ | |||
525 526 527 528 529 530 531 | # does not control or change any hacks for Mono that may # be present in the library itself. # # if {![info exists no(mono)] && [isMono]} then { # set no(mono) true # } | < < < < < < < | 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | # does not control or change any hacks for Mono that may # be present in the library itself. # # if {![info exists no(mono)] && [isMono]} then { # set no(mono) true # } # # NOTE: Has administrator detection support been disabled? We do # this check [nearly] first as it may [eventually] be used # to help determine if other constraints should be skipped. # if {![info exists no(administrator)]} then { checkForAdministrator $test_channel |
︙ | ︙ | |||
557 558 559 560 561 562 563 | # this check [nearly] first as it may [eventually] be used # to help determine if other constraints should be skipped. # if {![info exists no(primaryThread)]} then { checkForPrimaryThread $test_channel } | < < < < < < < < < < | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | # this check [nearly] first as it may [eventually] be used # to help determine if other constraints should be skipped. # if {![info exists no(primaryThread)]} then { checkForPrimaryThread $test_channel } # # NOTE: Has runtime detection support been disabled? We do this # checking [nearly] first as it may skip other constraints. # if {![info exists no(runtime)]} then { checkForRuntime $test_channel } |
︙ | ︙ | |||
606 607 608 609 610 611 612 | # # NOTE: Has culture detection support been disabled? # if {![info exists no(culture)]} then { checkForCulture $test_channel } | < < < < < < < < < < < < < < < < < < < < < | 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | # # NOTE: Has culture detection support been disabled? # if {![info exists no(culture)]} then { checkForCulture $test_channel } # # NOTE: Has software update trust detection support been disabled? # if {![info exists no(softwareUpdate)]} then { checkForSoftwareUpdateTrust $test_channel } # # NOTE: Has database testing support been disabled? # if {![info exists no(sql)]} then { # # NOTE: Set the server name, if necessary. # |
︙ | ︙ | |||
693 694 695 696 697 698 699 | Security=SSPI;}}]}] } # # NOTE: Can we access the local database? # checkForDatabase $test_channel $test_database | < < < < < < < < | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | Security=SSPI;}}]}] } # # NOTE: Can we access the local database? # checkForDatabase $test_channel $test_database unset password user timeout database server } # # NOTE: Has quiet testing support been disabled? # if {![info exists no(quiet)]} then { # # NOTE: For tests "basic-1.36", "debug-1.3", "debug-1.4", "object-10.*", # and "perf-2.2". |
︙ | ︙ | |||
818 819 820 821 822 823 824 | } # # NOTE: Has Windows support been enabled (at compile-time)? # if {![info exists no(compileWindows)]} then { # | | | | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 | } # # NOTE: Has Windows support been enabled (at compile-time)? # if {![info exists no(compileWindows)]} then { # # NOTE: For test "garuda-1.0". # checkForCompileOption $test_channel WINDOWS } # # NOTE: Has native code support been enabled (at compile-time)? # if {![info exists no(compileNative)]} then { # # NOTE: For tests "debug-3.2", "expr-3.2", and "host-1.1". # checkForCompileOption $test_channel NATIVE } # # NOTE: Has native package support been enabled (at compile-time)? # if {![info exists no(compileNativePackage)]} then { # # NOTE: For test "garuda-1.0". # checkForCompileOption $test_channel NATIVE_PACKAGE } # # NOTE: Has network support been enabled (at compile-time)? # |
︙ | ︙ | |||
878 879 880 881 882 883 884 | if {![info exists no(compileXml)]} then { # # NOTE: For tests "commands-1.4", "object-7.3" and "xml-1.1.*". # checkForCompileOption $test_channel XML } | < < < < < < < < < < | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 | if {![info exists no(compileXml)]} then { # # NOTE: For tests "commands-1.4", "object-7.3" and "xml-1.1.*". # checkForCompileOption $test_channel XML } # # NOTE: Has dedicated test support been enabled (at compile-time)? # if {![info exists no(compileTest)]} then { # # NOTE: For tests "basic-1.20", "basic-1.21", "function-1.1", # "object-2.1", "object-3.1", "object-4.1", "object-7.1", |
︙ | ︙ | |||
960 961 962 963 964 965 966 | if {![info exists no(tclReady)]} then { checkForTclReady $test_channel } if {![info exists no(tclShell)]} then { # | | < < < < < < < < < < < < < < < < < < | 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | if {![info exists no(tclReady)]} then { checkForTclReady $test_channel } if {![info exists no(tclShell)]} then { # # NOTE: For test "garuda-1.0". # checkForTclShell $test_channel } } # # NOTE: Has custom test method support been disabled? # if {![info exists no(test)]} then { # # NOTE: Has remoting testing support been disabled? # if {![info exists no(testRemoting)]} then { # # NOTE: For tests "remotingServer-1.*". # |
︙ | ︙ | |||
1072 1073 1074 1075 1076 1077 1078 1079 | # # NOTE: For test "object-2.8". # checkForObjectMember $test_channel Eagle._Tests.Default+Disposable \ *ToString* Eagle._Tests.Default.Disposable.ToString } # | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 | # # NOTE: For test "object-2.8". # checkForObjectMember $test_channel Eagle._Tests.Default+Disposable \ *ToString* Eagle._Tests.Default.Disposable.ToString } # # NOTE: Has core marshaller testing support been disabled? # if {![info exists no(testMarshaller)]} then { # # NOTE: For test "basic-1.29". # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestExecuteStaticDelegates* # |
︙ | ︙ | |||
1160 1161 1162 1163 1164 1165 1166 | # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestComplexMethod* # # NOTE: For test "object-2.3". # | | | | > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestComplexMethod* # # NOTE: For test "object-2.3". # checkForObjectMember $test_channel Eagle._Components.Private.ArrayOps \ *ToHexadecimalString* checkForObjectMember $test_channel Eagle._Tests.Default \ *TestMulti2Array* checkForObjectMember $test_channel Eagle._Tests.Default \ *TestMulti3Array* checkForObjectMember $test_channel Eagle._Tests.Default \ *TestNestedArray* # # NOTE: For test "object-3.1". # checkForObjectMember $test_channel Eagle._Tests.Default \ *get_Item* checkForObjectMember $test_channel Eagle._Tests.Default \ *set_Item* # # NOTE: For test "object-3.6.*". # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestStringIListReturnValue* checkForObjectMember $test_channel Eagle._Tests.Default \ *TestStringIListIListIListReturnValue* # # NOTE: For test "object-4.1". # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestExpr* # |
︙ | ︙ | |||
1325 1326 1327 1328 1329 1330 1331 | } # # NOTE: Are we running in an STA thread? # if {![info exists no(staThread)]} then { # | | | < < < < < < < | 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | } # # NOTE: Are we running in an STA thread? # if {![info exists no(staThread)]} then { # # NOTE: For test "xaml-1.*". # checkForStaThread $test_channel } # # NOTE: Has WPF testing support been disabled? # if {![info exists no(wpf)]} then { # # NOTE: For test "xaml-1.*". # checkForWindowsPresentationFoundation $test_channel } # # NOTE: Has PowerShell testing support been disabled? # if {![info exists no(powerShell)]} then { # # NOTE: For tests "object-4.7", "object-4.8", and "object-4.9". # checkForPowerShell $test_channel } # # NOTE: Has WiX testing support been disabled? # if {![info exists no(wix)]} then { # # NOTE: For test "object-4.10". # |
︙ | ︙ | |||
1422 1423 1424 1425 1426 1427 1428 | } # # NOTE: Has Garuda testing support been disabled? # if {![info exists no(garudaDll)]} then { # | | < < < < < < < < < < < | < < < | | < < < < < < < < < < < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < < < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 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 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 | } # # NOTE: Has Garuda testing support been disabled? # if {![info exists no(garudaDll)]} then { # # NOTE: For test "garuda-1.0". # checkForGarudaDll $test_channel } } else { # # HACK: Reset the test counts for tcltest. # set ::tcltest::numTests(Total) 0 set ::tcltest::numTests(Skipped) 0 set ::tcltest::numTests(Passed) 0 set ::tcltest::numTests(Failed) 0 # # HACK: Reset the list of failed files. # set ::tcltest::failFiles [list] # # NOTE: Has compile/runtime option testing support been disabled? # if {![info exists no(compileOptions)]} then { # # NOTE: Has dedicated test support been enabled (at compile-time)? # if {![info exists no(compileTest)]} then { # # NOTE: For test "tclLoad-1.16.1". # checkForCompileOption $test_channel TEST } } } # # NOTE: For test "package-1.0". # if {![info exists no(pkgAll.tcl)]} then { checkForFile $test_channel [file join $base_path Package Tests all.tcl] \ pkgAll.tcl } # # NOTE: For test "subst-1.*". # if {![info exists no(bad_subst.txt)]} then { checkForFile $test_channel [file join $test_path bad_subst.txt] } # # NOTE: For test "fileIO-1.*". # if {![info exists no(file.dat)]} then { checkForFile $test_channel [file join $test_path file.dat] } # # NOTE: For test "garbage-1.1". # if {![info exists no(garbage.txt)]} then { checkForFile $test_channel [file join $test_path garbage.txt] } # # NOTE: For test "xaml-1.*". # if {![info exists no(test.png)]} then { checkForFile $test_channel [file join $test_path test.png] } # # NOTE: For test "socket-1.2". # if {![info exists no(client.tcl)]} then { checkForFile $test_channel [file join $test_path client.tcl] } # # NOTE: For test "tclLoad-1.2". # if {![info exists no(tcl_unload.tcl)]} then { checkForFile $test_channel [file join $test_path tcl_unload.tcl] } # # NOTE: For test "read.eagle". # if {![info exists no(read.eagle)]} then { checkForFile $test_channel [file join $test_path read.eagle] } # # NOTE: For test "read2.eagle". # if {![info exists no(read2.eagle)]} then { checkForFile $test_channel [file join $test_path read2.eagle] } # # NOTE: For test "read3.eagle". # if {![info exists no(read3.eagle)]} then { checkForFile $test_channel [file join $test_path read3.eagle] } # # NOTE: For test "read4.eagle". # if {![info exists no(read4.eagle)]} then { checkForFile $test_channel [file join $test_path read4.eagle] } # # NOTE: For test "source.eagle". # if {![info exists no(source.eagle)]} then { checkForFile $test_channel [file join $test_path source.eagle] } # # NOTE: For test "unbalanced_brace.eagle". # if {![info exists no(unbalanced_brace.eagle)]} then { checkForFile $test_channel [file join $test_path unbalanced_brace.eagle] } # # NOTE: For test "unbalanced_brace2.eagle". # if {![info exists no(unbalanced_brace2.eagle)]} then { checkForFile $test_channel [file join $test_path unbalanced_brace2.eagle] } # # NOTE: For test "excel-2.*". # if {![info exists no(test.xls)]} then { checkForFile $test_channel [file join $test_path test.xls] } # # NOTE: For test "interp-1.10". # if {![info exists no(settings.xml)]} then { checkForFile $test_channel [file join $test_path settings.xml] } # # NOTE: For test "load-1.1.*". # if {![info exists no(Plugin.dll)]} then { checkForFile $test_channel [file join $lib_path Plugin1.0 Plugin.dll] } # # NOTE: For test "object-6.1". # if {![info exists no(Sample.exe)]} then { checkForFile $test_channel [file join $bin_path Sample.exe] } # # NOTE: For test "object-4.8". # if {![info exists no(EagleCmdlets.dll)]} then { checkForFile $test_channel [file join $bin_path EagleCmdlets.dll] } # # NOTE: For test "object-4.10". # if {![info exists no(EagleExtensions.dll)]} then { checkForFile $test_channel [file join $bin_path EagleExtensions.dll] } # # NOTE: For test "object-4.10". # if {![info exists no(test.wxs)]} then { checkForFile $test_channel [file join $base_path Installer Tests test.wxs] } # # NOTE: For test "sql-1.2". # if {![info exists no(sqlite3.dll)]} then { checkForFile $test_channel [file join $bin_path sqlite3.dll] } if {![info exists no(System.Data.SQLite.dll)]} then { checkForFile $test_channel [file join $bin_path System.Data.SQLite.dll] } if {![info exists no(test.sqlite3)]} then { checkForFile $test_channel [file join $test_path test.sqlite3] } # # NOTE: Check the core test constraints unless they have been # explicitly disabled. # if {![info exists no(platform)]} then { |
︙ | ︙ | |||
1674 1675 1676 1677 1678 1679 1680 | checkForEagle $test_channel } if {![info exists no(noLogFile)]} then { checkForLogFile $test_channel } | < < < < | 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 | checkForEagle $test_channel } if {![info exists no(noLogFile)]} then { checkForLogFile $test_channel } if {![info exists no(garuda)]} then { checkForGaruda $test_channel } if {![info exists no(shell)]} then { checkForShell $test_channel } |
︙ | ︙ | |||
1759 1760 1761 1762 1763 1764 1765 | # NOTE: Has performance testing been disabled? # if {![info exists no(performance)]} then { checkForPerformance $test_channel } # | | < < < < < < < < < < < | 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 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 | # NOTE: Has performance testing been disabled? # if {![info exists no(performance)]} then { checkForPerformance $test_channel } # # NOTE: Have precision timing tests been disabled? # if {![info exists no(timing)]} then { checkForTiming $test_channel 50; # 1/20th second. } # # NOTE: Has interactive testing been disabled? # if {![info exists no(interactive)]} then { checkForInteractive $test_channel } if {![info exists no(userInteraction)]} then { checkForUserInteraction $test_channel } # # NOTE: Check for network connectivity to our test host (i.e. # the Eagle distribution site). # if {![info exists no(network)]} then { checkForNetwork $test_channel $test_host $test_timeout } # # NOTE: For Eagle, dump the platform information, including # the compile options. # if {[isEagle]} then { # # NOTE: Figure out the approximate relative performance |
︙ | ︙ | |||
1828 1829 1830 1831 1832 1833 1834 | tputs $test_channel [appendArgs \ "---- checking for current BogoCops (commands-per-second)... "] if {![info exists test_cops]} then { set test_cops [calculateBogoCops] } | | | 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 | tputs $test_channel [appendArgs \ "---- checking for current BogoCops (commands-per-second)... "] if {![info exists test_cops]} then { set test_cops [calculateBogoCops] } tputs $test_channel [appendArgs $test_cops \n] set percent [expr {[calculateRelativePerformance iterations 1] * 100}] tputs $test_channel [appendArgs \ "---- current BogoCops (commands-per-second) is " [formatDecimal \ [expr {$percent > 100 ? $percent - 100 : $percent}] 2] "% " \ [expr {$percent > 100 ? "faster than" : "as fast as"}] \ |
︙ | ︙ | |||
1856 1857 1858 1859 1860 1861 1862 | if {[isMono]} then { # # HACK: We need something to go into the log file. # set timeStamp [lindex $timeStamp 0] } else { | | < < > > | 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 1677 1678 1679 1680 1681 1682 1683 1684 1685 | if {[isMono]} then { # # HACK: We need something to go into the log file. # set timeStamp [lindex $timeStamp 0] } else { set timeStamp [clock format [clock scan $timeStamp] -iso] } } else { set timeStamp <none> } tputs $test_channel [appendArgs "---- build: " \ [list [getPlatformInfo engine <none>]] " " \ [list [getPlatformInfo patchLevel <none>]] " " \ [list [getPlatformInfo tag <none>]] " " \ [list [getPlatformInfo release <none>]] " " \ [list [getPlatformInfo text <none>]] " " \ [list [getPlatformInfo configuration <none>]] " " \ [list [getPlatformInfo suffix <none>]] " " \ [list $timeStamp] \n] tputs $test_channel [appendArgs "---- os: " \ [getPlatformInfo os <none>] \n] tputs $test_channel [appendArgs "---- globalAssemblyCache: " \ [getPlatformInfo globalAssemblyCache <none>] \n] tputs $test_channel [appendArgs "---- moduleVersionId: " \ [getPlatformInfo moduleVersionId <none>] \n] tputs $test_channel [appendArgs "---- compileOptions: " \ [formatList [getPlatformInfo compileOptions <none>]] \n] tputs $test_channel [appendArgs "---- strongName: " \ [getPlatformInfo strongName <none>] \n] tputs $test_channel [appendArgs "---- certificate: " \ [getPlatformInfo certificate <none>] \n] unset timeStamp } # # NOTE: Show the current test file name, if any. # tputs $test_channel [appendArgs "---- test file: " \ [expr {[info exists test_file] && [string length $test_file] > 0 ? \ |
︙ | ︙ |
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
︙ | ︙ | |||
29 30 31 32 33 34 35 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: | | | | 29 30 31 32 33 34 35 36 37 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Resources; // General Information about an assembly is controlled through the following |
︙ | ︙ | |||
39 40 41 42 43 44 45 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: | | | | 32 33 34 35 36 37 38 39 40 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace SQLite.Designer { partial class ChangePasswordDialog { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
︙ | ︙ | |||
280 281 282 283 284 285 286 | } } [DefaultProperty("From")] internal class ForeignKey : IHaveConnection, ICloneable { internal Table _table; | < < < < | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | } } [DefaultProperty("From")] internal class ForeignKey : IHaveConnection, ICloneable { internal Table _table; internal ForeignKeyFromItem _from; internal ForeignKeyToItem _to; internal string _name; internal string _onUpdate; internal string _onDelete; internal string _match; private bool _dirty; private ForeignKey(ForeignKey source) { _table = source._table; _from = new ForeignKeyFromItem(this, source._from.Column); _to = new ForeignKeyToItem(this, source._to.Catalog, source._to.Table, source._to.Column); _name = source._name; _onUpdate = source._onUpdate; _onDelete = source._onDelete; _match = source._match; _dirty = source._dirty; |
︙ | ︙ | |||
325 326 327 328 329 330 331 | } internal ForeignKey(DbConnection cnn, Table table, DataRow row) { _table = table; if (row != null) { | < < < < | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | } internal ForeignKey(DbConnection cnn, Table table, DataRow row) { _table = table; if (row != null) { _from = new ForeignKeyFromItem(this, row["FKEY_FROM_COLUMN"].ToString()); _to = new ForeignKeyToItem(this, row["FKEY_TO_CATALOG"].ToString(), row["FKEY_TO_TABLE"].ToString(), row["FKEY_TO_COLUMN"].ToString()); _name = row["CONSTRAINT_NAME"].ToString(); _onUpdate = row["FKEY_ON_UPDATE"].ToString(); _onDelete = row["FKEY_ON_DELETE"].ToString(); _match = row["FKEY_MATCH"].ToString(); } else { _from = new ForeignKeyFromItem(this, ""); _to = new ForeignKeyToItem(this, _table.Catalog, "", ""); } } //internal void WriteSql(StringBuilder builder) //{ |
︙ | ︙ | |||
361 362 363 364 365 366 367 | [Description("The name of the foreign key.")] public string Name { get { if (String.IsNullOrEmpty(_name) == false) return _name; | | | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | [Description("The name of the foreign key.")] public string Name { get { if (String.IsNullOrEmpty(_name) == false) return _name; return String.Format(CultureInfo.InvariantCulture, "FK_{0}_{1}_{2}_{3}", _from.Table, _from.Column, _to.Table, _to.Column); } set { if (_name != value) { _name = value; MakeDirty(); |
︙ | ︙ | |||
388 389 390 391 392 393 394 | public DbConnection GetConnection() { return ((IHaveConnection)_table).GetConnection(); } #endregion | < < < < < < < < < < < < < < < < | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | public DbConnection GetConnection() { return ((IHaveConnection)_table).GetConnection(); } #endregion [DisplayName("From Key")] [Category("From")] [Description("The source column in the current table that refers to the foreign key.")] public ForeignKeyFromItem From { get { return _from; } } |
︙ | ︙ |
︙ | ︙ | |||
405 406 407 408 409 410 411 | break; } } builder.Append(separator); builder.AppendFormat("CONSTRAINT [CK_{0}_{1}] CHECK {2}", Name, n + 1, check); } | > > > > > > > > > > | | > > > > > | | > > > > > > > > > | 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 435 436 437 438 439 440 441 442 443 444 445 446 | break; } } builder.Append(separator); builder.AppendFormat("CONSTRAINT [CK_{0}_{1}] CHECK {2}", Name, n + 1, check); } List<ForeignKey> keys = new List<ForeignKey>(); for (int x = 0; x < ForeignKeys.Count; x++) { ForeignKey key = ForeignKeys[x]; if (String.IsNullOrEmpty(key.From.Column) == true || String.IsNullOrEmpty(key.From.Catalog) == true || String.IsNullOrEmpty(key.To.Table) == true || String.IsNullOrEmpty(key.To.Column) == true) continue; if (keys.Count > 0) { if (keys[0].Name == key.Name && keys[0].To.Catalog == key.To.Catalog && keys[0].To.Table == key.To.Table) { keys.Add(key); continue; } builder.Append(separator); WriteFKeys(keys, builder); keys.Clear(); } keys.Add(key); } if (keys.Count > 0) { builder.Append(separator); WriteFKeys(keys, builder); } builder.Append("\r\n);\r\n"); // Rebuilding an existing table if (altName != null) { |
︙ | ︙ | |||
472 473 474 475 476 477 478 | } return builder.ToString(); } private void WriteFKeys(List<ForeignKey> keys, StringBuilder builder) { | < < < < < < < | < | < < > | | | < | < < | < < < < < | > | | < < | < < | | | < | | | | | | < < < < | 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | } return builder.ToString(); } private void WriteFKeys(List<ForeignKey> keys, StringBuilder builder) { builder.AppendFormat("CONSTRAINT [{0}] FOREIGN KEY (", keys[0].Name); string separator = ""; foreach (ForeignKey key in keys) { builder.AppendFormat("{0}[{1}]", separator, key.From.Column); separator = ", "; } builder.AppendFormat(") REFERENCES [{0}] (", keys[0].To.Table); separator = ""; foreach (ForeignKey key in keys) { builder.AppendFormat("{0}[{1}]", separator, key.To.Column); separator = ", "; } builder.Append(")"); if (!String.IsNullOrEmpty(keys[0].Match)) builder.AppendFormat(" MATCH {0}", keys[0].Match); if (!String.IsNullOrEmpty(keys[0].OnUpdate)) builder.AppendFormat(" ON UPDATE {0}", keys[0].OnUpdate); if (!String.IsNullOrEmpty(keys[0].OnDelete)) builder.AppendFormat(" ON DELETE {0}", keys[0].OnDelete); } [Browsable(false)] public override ViewTableBase DesignTable { get { return this; } } |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace SQLite.Designer.Editors { partial class TableDesignerDoc { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace SQLite.Designer.Editors { partial class ViewDesignerDoc { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
︙ | ︙ | |||
44 45 46 47 48 49 50 | <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Design" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> | | | < | | < | | | | | | 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 | <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Design" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.Data.ConnectionUI, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.CommandBars, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Data.Services, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs" /> <Compile Include="ChangePasswordDialog.cs"> <SubType>Form</SubType> |
︙ | ︙ | |||
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | </ItemGroup> <ItemGroup> <VSCTCompile Include="PkgCmd.vsct"> <ResourceName>1000</ResourceName> </VSCTCompile> </ItemGroup> <ItemGroup> <EmbeddedResource Include="SQLiteDataViewSupport2008.xml" /> <EmbeddedResource Include="VSPackage.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>VSPackage.Designer.cs</LastGenOutput> <MergeWithCTO>true</MergeWithCTO> <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> | > > | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | </ItemGroup> <ItemGroup> <VSCTCompile Include="PkgCmd.vsct"> <ResourceName>1000</ResourceName> </VSCTCompile> </ItemGroup> <ItemGroup> <EmbeddedResource Include="SQLiteDataViewSupport2005.xml" /> <EmbeddedResource Include="SQLiteDataViewSupport2008.xml" /> <EmbeddedResource Include="SQLiteDataViewSupport2010.xml" /> <EmbeddedResource Include="VSPackage.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>VSPackage.Designer.cs</LastGenOutput> <MergeWithCTO>true</MergeWithCTO> <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> |
︙ | ︙ |
︙ | ︙ | |||
43 44 45 46 47 48 49 | <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Design" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> | | | < | | < | | | | | | 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 | <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Design" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.Data.ConnectionUI, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.CommandBars, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Data.Services, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs" /> <Compile Include="ChangePasswordDialog.cs"> <SubType>Form</SubType> |
︙ | ︙ | |||
149 150 151 152 153 154 155 156 157 158 159 160 161 162 | </ItemGroup> <ItemGroup> <VSCTCompile Include="PkgCmd.vsct"> <ResourceName>1000</ResourceName> </VSCTCompile> </ItemGroup> <ItemGroup> <EmbeddedResource Include="SQLiteDataViewSupport2010.xml" /> <EmbeddedResource Include="VSPackage.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>VSPackage.Designer.cs</LastGenOutput> <MergeWithCTO>true</MergeWithCTO> <SubType>Designer</SubType> </EmbeddedResource> | > > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | </ItemGroup> <ItemGroup> <VSCTCompile Include="PkgCmd.vsct"> <ResourceName>1000</ResourceName> </VSCTCompile> </ItemGroup> <ItemGroup> <EmbeddedResource Include="SQLiteDataViewSupport2005.xml" /> <EmbeddedResource Include="SQLiteDataViewSupport2008.xml" /> <EmbeddedResource Include="SQLiteDataViewSupport2010.xml" /> <EmbeddedResource Include="VSPackage.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>VSPackage.Designer.cs</LastGenOutput> <MergeWithCTO>true</MergeWithCTO> <SubType>Designer</SubType> </EmbeddedResource> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace SQLite.Designer { partial class SQLiteConnectionUIControl { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | <?xml version="1.0" encoding="utf-8"?> <!-- /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ --> <VSDataViewSupport xmlns="http://tempuri.org/VSDataViewSupport.xsd"> <DataViews> <!-- This sample defines a single data view --> <DataView name="SQLite"> <DisplayName>SQLite</DisplayName> <!-- The connection node is static, i.e. has no underlying object --> <StaticConnectionNode> <!-- We can always specify data from the root object --> <InitialDisplayName>SQLite [{Root.Server}]</InitialDisplayName> <CommandBindings> <CommandBinding name="NewTable" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13600" handler="SQLite.Designer.SQLiteCommandHandler"/> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> <CommandBinding name="Vacuum" guid="814658EE-A28E-4b97-BC33-4B1BC81EBECB" cmdid="262" handler="SQLite.Designer.SQLiteCommandHandler"/> <CommandBinding name="Rekey" guid="814658EE-A28E-4b97-BC33-4B1BC81EBECB" cmdid="263" handler="SQLite.Designer.SQLiteCommandHandler"/> </CommandBindings> <Children> <StaticNode nid="Tables"> <DisplayName>Tables</DisplayName> <CommandBindings> <CommandBinding name="NewTable" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13600" handler="SQLite.Designer.SQLiteCommandHandler"/> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> <Children> <Selection type="Table" filter="TYPE='TABLE'"> <SelectionNode nid="Table"> <Icon name="Table"/> <Children> <SubHierarchyRef name="Table children"/> </Children> </SelectionNode> </Selection> </Children> </StaticNode> <StaticNode nid="Tables"> <DisplayName>System Tables</DisplayName> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> <Children> <Selection type="Table" filter="TYPE='SYSTEM_TABLE'"> <SelectionNode nid="Table"> <Icon name="Table"/> <Children> <SubHierarchyRef name="Table children"/> </Children> </SelectionNode> </Selection> </Children> </StaticNode> <StaticNode nid="Views"> <DisplayName>Views</DisplayName> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> <CommandBinding name="NewView" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13601" handler="SQLite.Designer.SQLiteCommandHandler" /> </CommandBindings> <Children> <Selection type="View"> <SelectionNode nid="View"> <DisplayName>{View.Name}</DisplayName> <Icon name="View"/> <Children> <SubHierarchyRef name="View children"/> </Children> </SelectionNode> </Selection> </Children> </StaticNode> </Children> </StaticConnectionNode> </DataView> </DataViews> <SubHierarchies> <SubHierarchy name="table children"> <StaticNode nid="Columns"> <DisplayName>Columns</DisplayName> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> <Children> <Selection type="TableColumn" restrictions="{Table.Database},null,{Table.Name}" filter="InPrimaryKey=True"> <SelectionNode> <Icon name="PrimaryKey"/> </SelectionNode> </Selection> <Selection type="TableColumn" restrictions="{Table.Database},null,{Table.Name}" filter="InPrimaryKey=False"> <SelectionNode> <Icon name="Column"/> </SelectionNode> </Selection> </Children> </StaticNode> <StaticNode nid="Indexes"> <DisplayName>Indexes</DisplayName> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> <Children> <Selection type="Index" restrictions="{Table.Database},null,{Table.Name}"> <SelectionNode> <Icon when="{IsPrimary}=true" name="PrimaryKey"/> <Icon when="{IsUnique}=true" name="UniqueKey"/> <Icon name="Index"/> </SelectionNode> </Selection> </Children> </StaticNode> <StaticNode nid="ForeignKeys"> <DisplayName>Foreign Keys</DisplayName> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> <Children> <Selection type="ForeignKey" restrictions="{Table.Database},null,{Table.Name}"> <SelectionNode> <Icon name="ForeignKey"/> </SelectionNode> </Selection> </Children> </StaticNode> <StaticNode nid="Triggers"> <DisplayName>Triggers</DisplayName> <Children> <Selection type="Triggers" restrictions="{Table.Database},null,{Table.Name}"> <SelectionNode> <Icon name="Index" /> </SelectionNode> </Selection> </Children> </StaticNode> </SubHierarchy> <SubHierarchy name="view children"> <StaticNode nid="Columns"> <DisplayName>Columns</DisplayName> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> <Children> <Selection type="ViewColumn" restrictions="{View.Database},null,{View.Name}"> <SelectionNode> <Icon name="Column"/> </SelectionNode> </Selection> </Children> </StaticNode> <StaticNode nid="Triggers"> <DisplayName>Triggers</DisplayName> <Children> <Selection type="Triggers" restrictions="{View.Database},null,{View.Name}"> <SelectionNode> <Icon name="Index" /> </SelectionNode> </Selection> </Children> </StaticNode> </SubHierarchy> </SubHierarchies> <TypeExtensions> <TypeExtension name="Table"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> </Identifier> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> <CommandBinding name="DropTable" guid="5efc7975-14bc-11cf-9b2b-00aa00573819" cmdid="17" handler="SQLite.Designer.SQLiteCommandHandler"> <Parameter value="Table"/> </CommandBinding> <CommandBinding name="Browse_DataVS2005" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="12384" handler="Microsoft.VisualStudio.DataTools.DBPackage.VDT_OLEDB_CommandHandler_TableTools"> <Parameter value="Open"/> </CommandBinding> <CommandBinding name="Design" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="12291" handler="SQLite.Designer.SQLiteCommandHandler"> <Parameter value="Table"/> </CommandBinding> </CommandBindings> </TypeExtension> <TypeExtension name="View"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> </Identifier> <Properties> <Property name="IsUpdatable"> <DisplayName>Updatable</DisplayName> </Property> </Properties> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> <CommandBinding name="DropView" guid="5efc7975-14bc-11cf-9b2b-00aa00573819" cmdid="17" handler="SQLite.Designer.SQLiteCommandHandler"> <Parameter value="View"/> </CommandBinding> <CommandBinding name="Design" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="12291" handler="SQLite.Designer.SQLiteCommandHandler"> <Parameter value="View"/> </CommandBinding> <CommandBinding name="Browse_DataVS2005" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="12384" handler="Microsoft.VisualStudio.DataTools.DBPackage.VDT_OLEDB_CommandHandler_TableTools"> <Parameter value="Open"/> </CommandBinding> </CommandBindings> </TypeExtension> <TypeExtension name="ViewColumn"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> <Part name="View"> <Category resource="Category_Location"/> </Part> </Identifier> <Properties> <Property name="Ordinal"/> <Property name="Length"/> <Property name="DataType"> <DisplayName>Data Type</DisplayName> </Property> <Property name="Nullable"> <DisplayName>Allow Nulls</DisplayName> </Property> <Property name="Default"> <DisplayName>Default Value</DisplayName> </Property> </Properties> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> </TypeExtension> <TypeExtension name="Index"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> <Part name="Table"> <Category resource="Category_Location"/> </Part> </Identifier> <Properties> <Property name="IsUnique"> <DisplayName>Is Unique</DisplayName> </Property> <Property name="IsPrimary"> <DisplayName>Primary Key</DisplayName> </Property> </Properties> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> <CommandBinding name="DropIndex" guid="5efc7975-14bc-11cf-9b2b-00aa00573819" cmdid="17" handler="SQLite.Designer.SQLiteCommandHandler"> <Parameter value="Index"/> </CommandBinding> </CommandBindings> </TypeExtension> <TypeExtension name="Triggers"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> <Part name="Table"> <Category resource="Category_Location"/> </Part> </Identifier> </TypeExtension> <TypeExtension name="TableColumn"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> <Part name="Table"> <Category resource="Category_Location"/> </Part> </Identifier> <Properties> <Property name="Ordinal"/> <Property name="Length"/> <Property name="DataType"> <DisplayName>Data Type</DisplayName> </Property> <Property name="Nullable"> <DisplayName>Allow Nulls</DisplayName> </Property> <Property name="Default"> <DisplayName>Default Value</DisplayName> </Property> <Property name="InPrimaryKey"> <DisplayName>Primary Key</DisplayName> </Property> </Properties> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> </TypeExtension> <TypeExtension name="ForeignKey"> <Identifier> <Part name="Name"> <Category resource="Category_Identity"/> </Part> <Part name="Database"> <DisplayName>Catalog</DisplayName> <Category resource="Category_Location"/> </Part> <Part name="Table"> <Category resource="Category_Location"/> </Part> </Identifier> <Properties> <!--<Property name="ColumnName"> <DisplayName>Source Column</DisplayName> <Category resource="Category_Source"/> </Property>--> <Property name="ReferencedTableDatabase"> <DisplayName>Referenced Database</DisplayName> <Category resource="Category_Refs"/> </Property> <Property name="ReferencedTableName"> <DisplayName>Referenced Table</DisplayName> <Category resource="Category_Refs"/> </Property> <!--<Property name="ReferencedColumnName"> <DisplayName>Referenced Column</DisplayName> <Category resource="Category_Refs"/> </Property>--> </Properties> <CommandBindings> <CommandBinding name="NewQuery" guid="501822E1-B5AF-11d0-B4DC-00A0C91506EF" cmdid="13608" handler="884DD964-5327-461f-9F06-6484DD540F8F"/> </CommandBindings> </TypeExtension> </TypeExtensions> <Resources baseName="SQLite.Designer.VSPackage"> <Resource name="Category_Identity">(Identity)</Resource> <Resource name="Category_Location">(Location)</Resource> <Resource name="Category_Source">(Source)</Resource> <Resource name="Category_Refs">References</Resource> </Resources> </VSDataViewSupport> |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace SQLite.Designer { partial class TableNameDialog { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
cannot compute difference between binary files
|
| < < < < < < < | 1 2 3 4 5 6 7 | //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. |
︙ | ︙ |
1 2 3 4 5 | <?xml version="1.0" encoding="utf-8"?> <Vsix Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010"> <Identifier Id="67b5f3a9-cde1-430f-a12b-af95bb064851"> <Name>SQLite Designer</Name> <Author>Robert Simpson</Author> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <?xml version="1.0" encoding="utf-8"?> <Vsix Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010"> <Identifier Id="67b5f3a9-cde1-430f-a12b-af95bb064851"> <Name>SQLite Designer</Name> <Author>Robert Simpson</Author> <Version>1.0.38.1</Version> <Description>ADO.NET Data Designer for SQLite</Description> <Locale>1033</Locale> <InstalledByMsi>false</InstalledByMsi> <SupportedProducts> <VisualStudio Version="10.0"> <Edition>Pro</Edition> </VisualStudio> |
︙ | ︙ |
︙ | ︙ | |||
303 304 305 306 307 308 309 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "x86" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Debug\bin\" /D /E /V /I /F /H /Y" /> </Configuration> <Configuration Name="DebugNativeOnly|x64" OutputDirectory="$(ProjectDir)..\bin\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="..\obj\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="2" |
︙ | ︙ | |||
394 395 396 397 398 399 400 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "AMD64" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Debug\bin\" /D /E /V /I /F /H /Y" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="$(ProjectDir)..\bin\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="..\obj\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="2" |
︙ | ︙ | |||
683 684 685 686 687 688 689 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "x86" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Release\bin\" /D /E /V /I /F /H /Y" /> </Configuration> <Configuration Name="ReleaseNativeOnly|x64" OutputDirectory="$(ProjectDir)..\bin\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="..\obj\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="2" |
︙ | ︙ | |||
776 777 778 779 780 781 782 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "AMD64" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Release\bin\" /D /E /V /I /F /H /Y" /> </Configuration> </Configurations> <References> </References> <Files> <Filter |
︙ | ︙ |
︙ | ︙ | |||
50 51 52 53 54 55 56 | </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="props\sqlite3.props" /> <Import Project="props\SQLite.Interop.props" /> <PropertyGroup Condition="('$(Configuration)' == 'DebugNativeOnly' Or '$(Configuration)' == 'ReleaseNativeOnly') And (('$(Platform)' == 'Win32' And | | < | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="props\sqlite3.props" /> <Import Project="props\SQLite.Interop.props" /> <PropertyGroup Condition="('$(Configuration)' == 'DebugNativeOnly' Or '$(Configuration)' == 'ReleaseNativeOnly') And (('$(Platform)' == 'Win32' And '$(PROCESSOR_ARCHITECTURE)' != 'x86') Or ('$(Platform)' == 'x64' And '$(PROCESSOR_ARCHITECTURE)' != 'AMD64' And '$(PROCESSOR_ARCHITEW6432)' != 'AMD64'))" Label="PostBuildEvent"> <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <TargetName>$(INTEROP_MIXED_NAME)</TargetName> <ConfigurationType>DynamicLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> |
︙ | ︙ |
︙ | ︙ | |||
71 72 73 74 75 76 77 | Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE" AdditionalDependencies="secchk.lib" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE" AdditionalDependencies="secchk.lib" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" Version="$(SQLITE_MANIFEST_VERSION)" LinkIncremental="2" GenerateManifest="true" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).pdb" GenerateMapFile="true" SubSystem="0" |
︙ | ︙ | |||
167 168 169 170 171 172 173 | Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE" AdditionalDependencies="secchk.lib" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" | | | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE" AdditionalDependencies="secchk.lib" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" Version="$(SQLITE_MANIFEST_VERSION)" LinkIncremental="1" GenerateManifest="true" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).pdb" GenerateMapFile="true" SubSystem="0" |
︙ | ︙ | |||
263 264 265 266 267 268 269 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" | | | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" Version="$(SQLITE_MANIFEST_VERSION)" LinkIncremental="2" GenerateManifest="true" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).pdb" GenerateMapFile="true" SubSystem="0" |
︙ | ︙ | |||
356 357 358 359 360 361 362 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" | | | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" Version="$(SQLITE_MANIFEST_VERSION)" LinkIncremental="2" GenerateManifest="true" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).pdb" GenerateMapFile="true" SubSystem="0" |
︙ | ︙ | |||
449 450 451 452 453 454 455 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" | | | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" Version="$(SQLITE_MANIFEST_VERSION)" LinkIncremental="1" GenerateManifest="true" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).pdb" GenerateMapFile="true" SubSystem="0" |
︙ | ︙ | |||
544 545 546 547 548 549 550 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" | | | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalOptions=" /subsystem:windowsce,5.01" OutputFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).dll" Version="$(SQLITE_MANIFEST_VERSION)" LinkIncremental="1" GenerateManifest="true" DelayLoadDLLs="$(NOINHERIT)" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/SQLite.Interop.$(INTEROP_BUILD_NUMBER).pdb" GenerateMapFile="true" SubSystem="0" |
︙ | ︙ |
︙ | ︙ | |||
303 304 305 306 307 308 309 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "x86" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Debug\bin\" /D /E /V /I /F /H /Y" /> </Configuration> <Configuration Name="DebugNativeOnly|x64" OutputDirectory="$(ProjectDir)..\bin\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)Static" IntermediateDirectory="..\obj\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)Static" ConfigurationType="2" |
︙ | ︙ | |||
394 395 396 397 398 399 400 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "AMD64" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Debug\bin\" /D /E /V /I /F /H /Y" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="$(ProjectDir)..\bin\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)Static" IntermediateDirectory="..\obj\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)Static" ConfigurationType="2" |
︙ | ︙ | |||
683 684 685 686 687 688 689 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "x86" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Release\bin\" /D /E /V /I /F /H /Y" /> </Configuration> <Configuration Name="ReleaseNativeOnly|x64" OutputDirectory="$(ProjectDir)..\bin\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)Static" IntermediateDirectory="..\obj\$(ConfigurationYear)\$(PlatformName)\$(ConfigurationName)Static" ConfigurationType="2" |
︙ | ︙ | |||
776 777 778 779 780 781 782 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" | | | 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCPostBuildEventTool" CommandLine="IF /I "%PROCESSOR_ARCHITECTURE%" == "AMD64" XCOPY "$(TargetPath)" "$(OutDir)..\..\..\Release\bin\" /D /E /V /I /F /H /Y" /> </Configuration> </Configurations> <References> </References> <Files> <Filter |
︙ | ︙ |
︙ | ︙ | |||
50 51 52 53 54 55 56 | </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="props\sqlite3.props" /> <Import Project="props\SQLite.Interop.props" /> <PropertyGroup Condition="('$(Configuration)' == 'DebugNativeOnly' Or '$(Configuration)' == 'ReleaseNativeOnly') And (('$(Platform)' == 'Win32' And | | < | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="props\sqlite3.props" /> <Import Project="props\SQLite.Interop.props" /> <PropertyGroup Condition="('$(Configuration)' == 'DebugNativeOnly' Or '$(Configuration)' == 'ReleaseNativeOnly') And (('$(Platform)' == 'Win32' And '$(PROCESSOR_ARCHITECTURE)' != 'x86') Or ('$(Platform)' == 'x64' And '$(PROCESSOR_ARCHITECTURE)' != 'AMD64' And '$(PROCESSOR_ARCHITEW6432)' != 'AMD64'))" Label="PostBuildEvent"> <PostBuildEventUseInBuild>false</PostBuildEventUseInBuild> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <TargetName>$(INTEROP_MIXED_NAME)</TargetName> <ConfigurationType>DynamicLibrary</ConfigurationType> <CharacterSet>Unicode</CharacterSet> |
︙ | ︙ |
1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0" encoding="utf-8"?> <!-- * * SQLite.Interop.props - * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! * --> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <ConfigurationYear>2010</ConfigurationYear> | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <?xml version="1.0" encoding="utf-8"?> <!-- * * SQLite.Interop.props - * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! * --> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <ConfigurationYear>2010</ConfigurationYear> <INTEROP_BUILD_NUMBER>076</INTEROP_BUILD_NUMBER> <INTEROP_MANIFEST_VERSION>1.0.76.0</INTEROP_MANIFEST_VERSION> <INTEROP_RC_VERSION>1,0,76,0</INTEROP_RC_VERSION> <INTEROP_ASSEMBLY_RESOURCES>/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp</INTEROP_ASSEMBLY_RESOURCES> <INTEROP_KEY_FILE>$(ProjectDir)..\System.Data.SQLite\System.Data.SQLite.snk</INTEROP_KEY_FILE> <INTEROP_NATIVE_NAME>SQLite.Interop</INTEROP_NATIVE_NAME> <INTEROP_MIXED_NAME>System.Data.SQLite</INTEROP_MIXED_NAME> </PropertyGroup> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
︙ | ︙ |
︙ | ︙ | |||
15 16 17 18 19 20 21 | <UserMacro Name="ConfigurationYear" Value="2008" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_BUILD_NUMBER" | | | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <UserMacro Name="ConfigurationYear" Value="2008" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_BUILD_NUMBER" Value="076" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_MANIFEST_VERSION" Value="1.0.76.0" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_RC_VERSION" Value="1,0,76,0" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_ASSEMBLY_RESOURCES" Value="/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp" PerformEnvironmentSet="true" /> |
︙ | ︙ |
1 2 3 4 5 6 7 8 9 10 11 | <?xml version="1.0" encoding="utf-8"?> <!-- * * sqlite3.props - * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! * --> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <?xml version="1.0" encoding="utf-8"?> <!-- * * sqlite3.props - * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! * --> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <SQLITE_MANIFEST_VERSION>3.7.8</SQLITE_MANIFEST_VERSION> <SQLITE_RC_VERSION>3,7,8</SQLITE_RC_VERSION> <SQLITE_COMMON_DEFINES>SQLITE_THREADSAFE=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT2=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1</SQLITE_COMMON_DEFINES> <SQLITE_EXTRA_DEFINES>SQLITE_HAS_CODEC=1</SQLITE_EXTRA_DEFINES> <SQLITE_WINCE_DEFINES>SQLITE_OMIT_WAL=1</SQLITE_WINCE_DEFINES> <SQLITE_DEBUG_DEFINES>SQLITE_DEBUG=1;SQLITE_MEMDEBUG=1</SQLITE_DEBUG_DEFINES> <SQLITE_RELEASE_DEFINES>SQLITE_WIN32_MALLOC=1</SQLITE_RELEASE_DEFINES> <SQLITE_DISABLE_WARNINGS>4018;4055;4057;4090;4100;4127;4132;4146;4152;4210;4244;4245;4389;4701;4706;4996</SQLITE_DISABLE_WARNINGS> <SQLITE_DISABLE_X64_WARNINGS>4267;4306</SQLITE_DISABLE_X64_WARNINGS> </PropertyGroup> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> </PropertyGroup> <ItemGroup> <BuildMacro Include="SQLITE_MANIFEST_VERSION"> <Value>$(SQLITE_MANIFEST_VERSION)</Value> |
︙ | ︙ |
︙ | ︙ | |||
10 11 12 13 14 15 16 | <VisualStudioPropertySheet ProjectType="Visual C++" Version="8.00" Name="sqlite3" > <UserMacro Name="SQLITE_MANIFEST_VERSION" | | | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <VisualStudioPropertySheet ProjectType="Visual C++" Version="8.00" Name="sqlite3" > <UserMacro Name="SQLITE_MANIFEST_VERSION" Value="3.7.8" PerformEnvironmentSet="true" /> <UserMacro Name="SQLITE_RC_VERSION" Value="3,7,8" PerformEnvironmentSet="true" /> <UserMacro Name="SQLITE_COMMON_DEFINES" Value="SQLITE_THREADSAFE=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT2=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1" PerformEnvironmentSet="true" /> <UserMacro Name="SQLITE_EXTRA_DEFINES" Value="SQLITE_HAS_CODEC=1" PerformEnvironmentSet="true" /> |
︙ | ︙ | |||
45 46 47 48 49 50 51 | <UserMacro Name="SQLITE_RELEASE_DEFINES" Value="SQLITE_WIN32_MALLOC=1" PerformEnvironmentSet="true" /> <UserMacro Name="SQLITE_DISABLE_WARNINGS" | | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <UserMacro Name="SQLITE_RELEASE_DEFINES" Value="SQLITE_WIN32_MALLOC=1" PerformEnvironmentSet="true" /> <UserMacro Name="SQLITE_DISABLE_WARNINGS" Value="4018;4055;4057;4090;4100;4127;4132;4146;4152;4210;4244;4245;4389;4701;4706;4996" PerformEnvironmentSet="true" /> <UserMacro Name="SQLITE_DISABLE_X64_WARNINGS" Value="4267;4306" PerformEnvironmentSet="true" /> </VisualStudioPropertySheet> |
more than 10,000 changes
︙ | ︙ | |||
103 104 105 106 107 108 109 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ | | | | | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.7.8" #define SQLITE_VERSION_NUMBER 3007008 #define SQLITE_SOURCE_ID "2011-09-19 14:49:19 3e0da808d2f5b4d12046e05980ca04578f581177" /* ** CAPI3REF: Run-Time Library Version Numbers ** KEYWORDS: sqlite3_version, sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
︙ | ︙ | |||
173 174 175 176 177 178 179 | SQLITE_API const char *sqlite3_compileoption_get(int N); #endif /* ** CAPI3REF: Test To See If The Library Is Threadsafe ** ** ^The sqlite3_threadsafe() function returns zero if and only if | | | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | SQLITE_API const char *sqlite3_compileoption_get(int N); #endif /* ** CAPI3REF: Test To See If The Library Is Threadsafe ** ** ^The sqlite3_threadsafe() function returns zero if and only if ** SQLite was compiled mutexing code omitted due to the ** [SQLITE_THREADSAFE] compile-time option being set to 0. ** ** SQLite can be compiled with or without mutexes. When ** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes ** are enabled and SQLite is threadsafe. When the ** [SQLITE_THREADSAFE] macro is 0, ** the mutexes are omitted. Without the mutexes, it is not safe |
︙ | ︙ | |||
367 368 369 370 371 372 373 | /* ** CAPI3REF: Result Codes ** KEYWORDS: SQLITE_OK {error code} {error codes} ** KEYWORDS: {result code} {result codes} ** ** Many SQLite functions return an integer result code from the set shown | | | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | /* ** CAPI3REF: Result Codes ** KEYWORDS: SQLITE_OK {error code} {error codes} ** KEYWORDS: {result code} {result codes} ** ** Many SQLite functions return an integer result code from the set shown ** here in order to indicates success or failure. ** ** New error codes may be added in future versions of SQLite. ** ** See also: [SQLITE_IOERR_READ | extended result codes], ** [sqlite3_vtab_on_conflict()] [SQLITE_ROLLBACK | result codes]. */ #define SQLITE_OK 0 /* Successful result */ |
︙ | ︙ | |||
505 506 507 508 509 510 511 | ** mean that writes of blocks that are nnn bytes in size and ** are aligned to an address which is an integer multiple of ** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means ** that when data is appended to a file, the data is appended ** first then the size of the file is extended, never the other ** way around. The SQLITE_IOCAP_SEQUENTIAL property means that ** information is written to disk in the same order as calls | | < < < < < | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | ** mean that writes of blocks that are nnn bytes in size and ** are aligned to an address which is an integer multiple of ** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means ** that when data is appended to a file, the data is appended ** first then the size of the file is extended, never the other ** way around. The SQLITE_IOCAP_SEQUENTIAL property means that ** information is written to disk in the same order as calls ** to xWrite(). */ #define SQLITE_IOCAP_ATOMIC 0x00000001 #define SQLITE_IOCAP_ATOMIC512 0x00000002 #define SQLITE_IOCAP_ATOMIC1K 0x00000004 #define SQLITE_IOCAP_ATOMIC2K 0x00000008 #define SQLITE_IOCAP_ATOMIC4K 0x00000010 #define SQLITE_IOCAP_ATOMIC8K 0x00000020 #define SQLITE_IOCAP_ATOMIC16K 0x00000040 #define SQLITE_IOCAP_ATOMIC32K 0x00000080 #define SQLITE_IOCAP_ATOMIC64K 0x00000100 #define SQLITE_IOCAP_SAFE_APPEND 0x00000200 #define SQLITE_IOCAP_SEQUENTIAL 0x00000400 #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800 /* ** CAPI3REF: File Locking Levels ** ** SQLite uses one of these integer values as the second ** argument to calls it makes to the xLock() and xUnlock() methods ** of an [sqlite3_io_methods] object. |
︙ | ︙ | |||
745 746 747 748 749 750 751 | ** VFSes do not need this signal and should silently ignore this opcode. ** Applications should not call [sqlite3_file_control()] with this ** opcode as doing so may disrupt the operation of the specialized VFSes ** that do require it. ** ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic ** retry counts and intervals for certain disk I/O operations for the | | | | | 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | ** VFSes do not need this signal and should silently ignore this opcode. ** Applications should not call [sqlite3_file_control()] with this ** opcode as doing so may disrupt the operation of the specialized VFSes ** that do require it. ** ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic ** retry counts and intervals for certain disk I/O operations for the ** windows [VFS] in order to work to provide robustness against ** anti-virus programs. By default, the windows VFS will retry file read, ** file write, and file delete opertions up to 10 times, with a delay ** of 25 milliseconds before the first retry and with the delay increasing ** by an additional 25 milliseconds with each subsequent retry. This ** opcode allows those to values (10 retries and 25 milliseconds of delay) ** to be adjusted. The values are changed for all database connections ** within the same process. The argument is a pointer to an array of two ** integers where the first integer i the new retry count and the second ** integer is the delay. If either integer is negative, then the setting ** is not changed but instead the prior value of that setting is written ** into the array entry, allowing the current retry settings to be ** interrogated. The zDbName parameter is ignored. |
︙ | ︙ | |||
772 773 774 775 776 777 778 | ** have write permission on the directory containing the database file want ** to read the database file, as the WAL and shared memory files must exist ** in order for the database to be readable. The fourth parameter to ** [sqlite3_file_control()] for this opcode should be a pointer to an integer. ** That integer is 0 to disable persistent WAL mode or 1 to enable persistent ** WAL mode. If the integer is -1, then it is overwritten with the current ** WAL persistence setting. | | < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | | < < < | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | ** have write permission on the directory containing the database file want ** to read the database file, as the WAL and shared memory files must exist ** in order for the database to be readable. The fourth parameter to ** [sqlite3_file_control()] for this opcode should be a pointer to an integer. ** That integer is 0 to disable persistent WAL mode or 1 to enable persistent ** WAL mode. If the integer is -1, then it is overwritten with the current ** WAL persistence setting. ** */ #define SQLITE_FCNTL_LOCKSTATE 1 #define SQLITE_GET_LOCKPROXYFILE 2 #define SQLITE_SET_LOCKPROXYFILE 3 #define SQLITE_LAST_ERRNO 4 #define SQLITE_FCNTL_SIZE_HINT 5 #define SQLITE_FCNTL_CHUNK_SIZE 6 #define SQLITE_FCNTL_FILE_POINTER 7 #define SQLITE_FCNTL_SYNC_OMITTED 8 #define SQLITE_FCNTL_WIN32_AV_RETRY 9 #define SQLITE_FCNTL_PERSIST_WAL 10 /* ** CAPI3REF: Mutex Handle ** ** The mutex module within SQLite defines [sqlite3_mutex] to be an ** abstract type for a mutex object. The SQLite core never looks ** at the internal representation of an [sqlite3_mutex]. It only |
︙ | ︙ | |||
865 866 867 868 869 870 871 | ** ** [[sqlite3_vfs.xOpen]] ** ^SQLite guarantees that the zFilename parameter to xOpen ** is either a NULL pointer or string obtained ** from xFullPathname() with an optional suffix added. ** ^If a suffix is added to the zFilename parameter, it will ** consist of a single "-" character followed by no more than | | | 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | ** ** [[sqlite3_vfs.xOpen]] ** ^SQLite guarantees that the zFilename parameter to xOpen ** is either a NULL pointer or string obtained ** from xFullPathname() with an optional suffix added. ** ^If a suffix is added to the zFilename parameter, it will ** consist of a single "-" character followed by no more than ** 10 alphanumeric and/or "-" characters. ** ^SQLite further guarantees that ** the string will be valid and unchanged until xClose() is ** called. Because of the previous sentence, ** the [sqlite3_file] can safely store a pointer to the ** filename if it needs to remember the filename for some reason. ** If the zFilename parameter to xOpen is a NULL pointer then xOpen ** must invent its own temporary name for the file. ^Whenever the |
︙ | ︙ | |||
1396 1397 1398 1399 1400 1401 1402 | ** scratch memory beyond what is provided by this configuration option, then ** [sqlite3_malloc()] will be used to obtain the memory needed.</dd> ** ** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt> ** <dd> ^This option specifies a static memory buffer that SQLite can use for ** the database page cache with the default page cache implementation. ** This configuration should not be used if an application-define page | | | 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 | ** scratch memory beyond what is provided by this configuration option, then ** [sqlite3_malloc()] will be used to obtain the memory needed.</dd> ** ** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt> ** <dd> ^This option specifies a static memory buffer that SQLite can use for ** the database page cache with the default page cache implementation. ** This configuration should not be used if an application-define page ** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option. ** There are three arguments to this option: A pointer to 8-byte aligned ** memory, the size of each page buffer (sz), and the number of pages (N). ** The sz argument should be the size of the largest database page ** (a power of two between 512 and 32768) plus a little extra for each ** page header. ^The page header size is 20 to 40 bytes depending on ** the host architecture. ^It is harmless, apart from the wasted memory, ** to make sz a little too large. The first |
︙ | ︙ | |||
1427 1428 1429 1430 1431 1432 1433 | ** to using its default memory allocator (the system malloc() implementation), ** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the ** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or ** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory ** allocator is engaged to handle all of SQLites memory allocation needs. ** The first pointer (the memory pointer) must be aligned to an 8-byte ** boundary or subsequent behavior of SQLite will be undefined. | | | | 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 | ** to using its default memory allocator (the system malloc() implementation), ** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the ** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or ** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory ** allocator is engaged to handle all of SQLites memory allocation needs. ** The first pointer (the memory pointer) must be aligned to an 8-byte ** boundary or subsequent behavior of SQLite will be undefined. ** The minimum allocation size is capped at 2^12. Reasonable values ** for the minimum allocation size are 2^5 through 2^8.</dd> ** ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> ** <dd> ^(This option takes a single argument which is a pointer to an ** instance of the [sqlite3_mutex_methods] structure. The argument specifies ** alternative low-level mutex routines to be used in place ** the mutex routines built into SQLite.)^ ^SQLite makes a copy of the ** content of the [sqlite3_mutex_methods] structure before the call to |
︙ | ︙ | |||
1465 1466 1467 1468 1469 1470 1471 | ** [database connection]. The first argument is the ** size of each lookaside buffer slot and the second is the number of ** slots allocated to each database connection.)^ ^(This option sets the ** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] ** verb to [sqlite3_db_config()] can be used to change the lookaside ** configuration on individual connections.)^ </dd> ** | | | | | | 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 | ** [database connection]. The first argument is the ** size of each lookaside buffer slot and the second is the number of ** slots allocated to each database connection.)^ ^(This option sets the ** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] ** verb to [sqlite3_db_config()] can be used to change the lookaside ** configuration on individual connections.)^ </dd> ** ** [[SQLITE_CONFIG_PCACHE]] <dt>SQLITE_CONFIG_PCACHE</dt> ** <dd> ^(This option takes a single argument which is a pointer to ** an [sqlite3_pcache_methods] object. This object specifies the interface ** to a custom page cache implementation.)^ ^SQLite makes a copy of the ** object and uses it for page cache memory allocations.</dd> ** ** [[SQLITE_CONFIG_GETPCACHE]] <dt>SQLITE_CONFIG_GETPCACHE</dt> ** <dd> ^(This option takes a single argument which is a pointer to an ** [sqlite3_pcache_methods] object. SQLite copies of the current ** page cache implementation into that object.)^ </dd> ** ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> ** <dd> ^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a ** function with a call signature of void(*)(void*,int,const char*), ** and a pointer to void. ^If the function pointer is not NULL, it is ** invoked by [sqlite3_log()] to process each logging event. ^If the |
︙ | ︙ | |||
1506 1507 1508 1509 1510 1511 1512 | ** specified as part of [ATTACH] commands are interpreted as URIs, regardless ** of whether or not the [SQLITE_OPEN_URI] flag is set when the database ** connection is opened. If it is globally disabled, filenames are ** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the ** database connection is opened. By default, URI handling is globally ** disabled. The default value may be changed by compiling with the ** [SQLITE_USE_URI] symbol defined. | < < < < < | | < < | 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 | ** specified as part of [ATTACH] commands are interpreted as URIs, regardless ** of whether or not the [SQLITE_OPEN_URI] flag is set when the database ** connection is opened. If it is globally disabled, filenames are ** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the ** database connection is opened. By default, URI handling is globally ** disabled. The default value may be changed by compiling with the ** [SQLITE_USE_URI] symbol defined. ** </dl> */ #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ #define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ #define SQLITE_CONFIG_SERIALIZED 3 /* nil */ #define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ #define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ #define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */ #define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ #define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ #define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ #define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ /* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ #define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */ #define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */ #define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ #define SQLITE_CONFIG_URI 17 /* int */ /* ** CAPI3REF: Database Connection Configuration Options ** ** These constants are the available integer configuration options that ** can be passed as the second argument to the [sqlite3_db_config()] interface. ** |
︙ | ︙ | |||
2016 2017 2018 2019 2020 2021 2022 | ** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). ** ** These routines all implement some additional formatting ** options that are useful for constructing SQL statements. ** All of the usual printf() formatting options apply. In addition, there ** is are "%q", "%Q", and "%z" options. ** | | | 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 | ** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). ** ** These routines all implement some additional formatting ** options that are useful for constructing SQL statements. ** All of the usual printf() formatting options apply. In addition, there ** is are "%q", "%Q", and "%z" options. ** ** ^(The %q option works like %s in that it substitutes a null-terminated ** string from the argument list. But %q also doubles every '\'' character. ** %q is designed for use inside a string literal.)^ By doubling each '\'' ** character it escapes that character and allows it to be inserted into ** the string. ** ** For example, assume the string variable zText contains text as follows: ** |
︙ | ︙ | |||
2624 2625 2626 2627 2628 2629 2630 | int flags, /* Flags */ const char *zVfs /* Name of VFS module to use */ ); /* ** CAPI3REF: Obtain Values For URI Parameters ** | | | | | < | < | < < < < < < < < < < < < < | | < < | | | < < | 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 | int flags, /* Flags */ const char *zVfs /* Name of VFS module to use */ ); /* ** CAPI3REF: Obtain Values For URI Parameters ** ** This is a utility routine, useful to VFS implementations, that checks ** to see if a database file was a URI that contained a specific query ** parameter, and if so obtains the value of the query parameter. ** ** The zFilename argument is the filename pointer passed into the xOpen() ** method of a VFS implementation. The zParam argument is the name of the ** query parameter we seek. This routine returns the value of the zParam ** parameter if it exists. If the parameter does not exist, this routine ** returns a NULL pointer. ** ** If the zFilename argument to this function is not a pointer that SQLite ** passed into the xOpen VFS method, then the behavior of this routine ** is undefined and probably undesirable. */ SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); /* ** CAPI3REF: Error Codes And Messages ** ** ^The sqlite3_errcode() interface returns the numeric [result code] or ** [extended result code] for the most recent failed sqlite3_* API call |
︙ | ︙ | |||
2853 2854 2855 2856 2857 2858 2859 | ** first zero terminator. ^If nByte is non-negative, then it is the maximum ** number of bytes read from zSql. ^When nByte is non-negative, the ** zSql string ends at either the first '\000' or '\u0000' character or ** the nByte-th byte, whichever comes first. If the caller knows ** that the supplied string is nul-terminated, then there is a small ** performance advantage to be gained by passing an nByte parameter that ** is equal to the number of bytes in the input string <i>including</i> | | < | 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 | ** first zero terminator. ^If nByte is non-negative, then it is the maximum ** number of bytes read from zSql. ^When nByte is non-negative, the ** zSql string ends at either the first '\000' or '\u0000' character or ** the nByte-th byte, whichever comes first. If the caller knows ** that the supplied string is nul-terminated, then there is a small ** performance advantage to be gained by passing an nByte parameter that ** is equal to the number of bytes in the input string <i>including</i> ** the nul-terminator bytes. ** ** ^If pzTail is not NULL then *pzTail is made to point to the first byte ** past the end of the first SQL statement in zSql. These routines only ** compile the first statement in zSql, so *pzTail is left pointing to ** what remains uncompiled. ** ** ^*ppStmt is left pointing to a compiled [prepared statement] that can be |
︙ | ︙ | |||
2905 2906 2907 2908 2909 2910 2911 | ** WHERE clause might influence the choice of query plan for a statement, ** then the statement will be automatically recompiled, as if there had been ** a schema change, on the first [sqlite3_step()] call following any change ** to the [sqlite3_bind_text | bindings] of that [parameter]. ** ^The specific value of WHERE-clause [parameter] might influence the ** choice of query plan if the parameter is the left-hand side of a [LIKE] ** or [GLOB] operator or if the parameter is compared to an indexed column | | | 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 | ** WHERE clause might influence the choice of query plan for a statement, ** then the statement will be automatically recompiled, as if there had been ** a schema change, on the first [sqlite3_step()] call following any change ** to the [sqlite3_bind_text | bindings] of that [parameter]. ** ^The specific value of WHERE-clause [parameter] might influence the ** choice of query plan if the parameter is the left-hand side of a [LIKE] ** or [GLOB] operator or if the parameter is compared to an indexed column ** and the [SQLITE_ENABLE_STAT2] compile-time option is enabled. ** the ** </li> ** </ol> */ SQLITE_API int sqlite3_prepare( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ |
︙ | ︙ | |||
2979 2980 2981 2982 2983 2984 2985 | ** database. ^The [ATTACH] and [DETACH] statements also cause ** sqlite3_stmt_readonly() to return true since, while those statements ** change the configuration of a database connection, they do not make ** changes to the content of the database files on disk. */ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); | < < < < < < < < < < < < < < < < < < < | 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 | ** database. ^The [ATTACH] and [DETACH] statements also cause ** sqlite3_stmt_readonly() to return true since, while those statements ** change the configuration of a database connection, they do not make ** changes to the content of the database files on disk. */ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); /* ** CAPI3REF: Dynamically Typed Value Object ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} ** ** SQLite uses the sqlite3_value object to represent all values ** that can be stored in a database table. SQLite uses dynamic typing ** for the values it stores. ^Values stored in sqlite3_value objects |
︙ | ︙ | |||
3094 3095 3096 3097 3098 3099 3100 | ** ^The third argument is the value to bind to the parameter. ** ** ^(In those routines that have a fourth argument, its value is the ** number of bytes in the parameter. To be clear: the value is the ** number of <u>bytes</u> in the value, not the number of characters.)^ ** ^If the fourth parameter is negative, the length of the string is ** the number of bytes up to the first zero terminator. | < < < < < < < | 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 | ** ^The third argument is the value to bind to the parameter. ** ** ^(In those routines that have a fourth argument, its value is the ** number of bytes in the parameter. To be clear: the value is the ** number of <u>bytes</u> in the value, not the number of characters.)^ ** ^If the fourth parameter is negative, the length of the string is ** the number of bytes up to the first zero terminator. ** ** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and ** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or ** string after SQLite has finished with it. ^The destructor is called ** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(), ** sqlite3_bind_text(), or sqlite3_bind_text16() fails. ** ^If the fifth argument is |
︙ | ︙ | |||
3434 3435 3436 3437 3438 3439 3440 | ** ** ^The sqlite3_data_count(P) interface returns the number of columns in the ** current row of the result set of [prepared statement] P. ** ^If prepared statement P does not have results ready to return ** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of ** interfaces) then sqlite3_data_count(P) returns 0. ** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. | < < < < < < | 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 | ** ** ^The sqlite3_data_count(P) interface returns the number of columns in the ** current row of the result set of [prepared statement] P. ** ^If prepared statement P does not have results ready to return ** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of ** interfaces) then sqlite3_data_count(P) returns 0. ** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. ** ** See also: [sqlite3_column_count()] */ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); /* ** CAPI3REF: Fundamental Datatypes |
︙ | ︙ | |||
3539 3540 3541 3542 3543 3544 3545 | ** ^The values returned by [sqlite3_column_bytes()] and ** [sqlite3_column_bytes16()] do not include the zero terminators at the end ** of the string. ^For clarity: the values returned by ** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of ** bytes in the string, not the number of characters. ** ** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), | | | 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 | ** ^The values returned by [sqlite3_column_bytes()] and ** [sqlite3_column_bytes16()] do not include the zero terminators at the end ** of the string. ^For clarity: the values returned by ** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of ** bytes in the string, not the number of characters. ** ** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), ** even empty strings, are always zero terminated. ^The return ** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. ** ** ^The object returned by [sqlite3_column_value()] is an ** [unprotected sqlite3_value] object. An unprotected sqlite3_value object ** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()]. ** If the [unprotected sqlite3_value] object returned by ** [sqlite3_column_value()] is used in any other way, including calls |
︙ | ︙ | |||
4119 4120 4121 4122 4123 4124 4125 | ** the 2nd parameter of the sqlite3_result_text* interfaces. ** ^If the 3rd parameter to the sqlite3_result_text* interfaces ** is negative, then SQLite takes result text from the 2nd parameter ** through the first zero character. ** ^If the 3rd parameter to the sqlite3_result_text* interfaces ** is non-negative, then as many bytes (not characters) of the text ** pointed to by the 2nd parameter are taken as the application-defined | | < < < < < | 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 | ** the 2nd parameter of the sqlite3_result_text* interfaces. ** ^If the 3rd parameter to the sqlite3_result_text* interfaces ** is negative, then SQLite takes result text from the 2nd parameter ** through the first zero character. ** ^If the 3rd parameter to the sqlite3_result_text* interfaces ** is non-negative, then as many bytes (not characters) of the text ** pointed to by the 2nd parameter are taken as the application-defined ** function result. ** ^If the 4th parameter to the sqlite3_result_text* interfaces ** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that ** function as the destructor on the text or BLOB result when it has ** finished using that result. ** ^If the 4th parameter to the sqlite3_result_text* interfaces or to ** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite ** assumes that the text or BLOB result is in constant space and does not |
︙ | ︙ | |||
4439 4440 4441 4442 4443 4444 4445 | ** returned by sqlite3_db_handle is the same [database connection] ** that was the first argument ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to ** create the statement in the first place. */ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); | < < < < < < < < < < < < < < < < | 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 | ** returned by sqlite3_db_handle is the same [database connection] ** that was the first argument ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to ** create the statement in the first place. */ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); /* ** CAPI3REF: Find the next prepared statement ** ** ^This interface returns a pointer to the next [prepared statement] after ** pStmt associated with the [database connection] pDb. ^If pStmt is NULL ** then this interface returns a pointer to the first prepared statement ** associated with the database connection pDb. ^If no prepared statement |
︙ | ︙ | |||
4490 4491 4492 4493 4494 4495 4496 | ** then the commit is converted into a rollback. ** ** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions ** return the P argument from the previous call of the same function ** on the same [database connection] D, or NULL for ** the first call for each function on D. ** | < < | | | 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 | ** then the commit is converted into a rollback. ** ** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions ** return the P argument from the previous call of the same function ** on the same [database connection] D, or NULL for ** the first call for each function on D. ** ** The callback implementation must not do anything that will modify ** the database connection that invoked the callback. Any actions ** to modify the database connection must be deferred until after the ** completion of the [sqlite3_step()] call that triggered the commit ** or rollback hook in the first place. ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their ** database connections for the meaning of "modify" in this paragraph. ** ** ^Registering a NULL function disables the callback. ** ** ^When the commit hook callback routine returns zero, the [COMMIT] ** operation is allowed to continue normally. ^If the commit hook ** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. ** ^The rollback hook is invoked on a rollback that results from a commit |
︙ | ︙ | |||
4611 4612 4613 4614 4615 4616 4617 | ** of heap memory by deallocating non-essential memory allocations ** held by the database library. Memory used to cache database ** pages to improve performance is an example of non-essential memory. ** ^sqlite3_release_memory() returns the number of bytes actually freed, ** which might be more or less than the amount requested. ** ^The sqlite3_release_memory() routine is a no-op returning zero ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. | < < < < < < < < < < < < < < < | < | | 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 | ** of heap memory by deallocating non-essential memory allocations ** held by the database library. Memory used to cache database ** pages to improve performance is an example of non-essential memory. ** ^sqlite3_release_memory() returns the number of bytes actually freed, ** which might be more or less than the amount requested. ** ^The sqlite3_release_memory() routine is a no-op returning zero ** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. */ SQLITE_API int sqlite3_release_memory(int); /* ** CAPI3REF: Impose A Limit On Heap Size ** ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the ** soft limit on the amount of heap memory that may be allocated by SQLite. ** ^SQLite strives to keep heap memory utilization below the soft heap ** limit by reducing the number of pages held in the page cache ** as heap memory usages approaches the limit. ** ^The soft heap limit is "soft" because even though SQLite strives to stay ** below the limit, it will exceed the limit rather than generate ** an [SQLITE_NOMEM] error. In other words, the soft heap limit ** is advisory only. ** ** ^The return value from sqlite3_soft_heap_limit64() is the size of ** the soft heap limit prior to the call. ^If the argument N is negative ** then no change is made to the soft heap limit. Hence, the current ** size of the soft heap limit can be determined by invoking ** sqlite3_soft_heap_limit64() with a negative argument. ** ** ^If the argument N is zero then the soft heap limit is disabled. ** ** ^(The soft heap limit is not enforced in the current implementation ** if one or more of following conditions are true: ** ** <ul> ** <li> The soft heap limit is set to zero. ** <li> Memory accounting is disabled using a combination of the ** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and ** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option. ** <li> An alternative page cache implementation is specified using ** [sqlite3_config]([SQLITE_CONFIG_PCACHE],...). ** <li> The page cache allocates from its own memory pool supplied ** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than ** from the heap. ** </ul>)^ ** ** Beginning with SQLite version 3.7.3, the soft heap limit is enforced ** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT] |
︙ | ︙ | |||
5402 5403 5404 5405 5406 5407 5408 | ** The SQLite source code contains multiple implementations ** of these mutex routines. An appropriate implementation ** is selected automatically at compile-time. ^(The following ** implementations are available in the SQLite core: ** ** <ul> ** <li> SQLITE_MUTEX_OS2 | | | | 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 | ** The SQLite source code contains multiple implementations ** of these mutex routines. An appropriate implementation ** is selected automatically at compile-time. ^(The following ** implementations are available in the SQLite core: ** ** <ul> ** <li> SQLITE_MUTEX_OS2 ** <li> SQLITE_MUTEX_PTHREAD ** <li> SQLITE_MUTEX_W32 ** <li> SQLITE_MUTEX_NOOP ** </ul>)^ ** ** ^The SQLITE_MUTEX_NOOP implementation is a set of routines ** that does no real locking and is appropriate for use in ** a single-threaded application. ^The SQLITE_MUTEX_OS2, ** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations ** are appropriate for use on OS/2, Unix, and Windows. ** ** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor ** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex ** implementation is included with the library. In this case the ** application must supply a custom mutex implementation using the ** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function |
︙ | ︙ | |||
5600 5601 5602 5603 5604 5605 5606 | ** with the SQLITE_DEBUG flag. ^External mutex implementations ** are only required to provide these routines if SQLITE_DEBUG is ** defined and if NDEBUG is not defined. ** ** ^These routines should return true if the mutex in their argument ** is held or not held, respectively, by the calling thread. ** | | | 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 | ** with the SQLITE_DEBUG flag. ^External mutex implementations ** are only required to provide these routines if SQLITE_DEBUG is ** defined and if NDEBUG is not defined. ** ** ^These routines should return true if the mutex in their argument ** is held or not held, respectively, by the calling thread. ** ** ^The implementation is not required to provided versions of these ** routines that actually work. If the implementation does not provide working ** versions of these routines, it should at least provide stubs that always ** return true so that one does not get spurious assertion failures. ** ** ^If the argument to sqlite3_mutex_held() is a NULL pointer then ** the routine should return 1. This seems counter-intuitive since ** clearly the mutex cannot be held if it does not exist. But |
︙ | ︙ | |||
5728 5729 5730 5731 5732 5733 5734 | #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 #define SQLITE_TESTCTRL_PENDING_BYTE 11 #define SQLITE_TESTCTRL_ASSERT 12 #define SQLITE_TESTCTRL_ALWAYS 13 #define SQLITE_TESTCTRL_RESERVE 14 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15 #define SQLITE_TESTCTRL_ISKEYWORD 16 | > | | < | 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 | #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 #define SQLITE_TESTCTRL_PENDING_BYTE 11 #define SQLITE_TESTCTRL_ASSERT 12 #define SQLITE_TESTCTRL_ALWAYS 13 #define SQLITE_TESTCTRL_RESERVE 14 #define SQLITE_TESTCTRL_OPTIMIZATIONS 15 #define SQLITE_TESTCTRL_ISKEYWORD 16 #define SQLITE_TESTCTRL_PGHDRSZ 17 #define SQLITE_TESTCTRL_SCRATCHMALLOC 18 #define SQLITE_TESTCTRL_LOCALTIME_FAULT 19 #define SQLITE_TESTCTRL_LAST 19 /* ** CAPI3REF: SQLite Runtime Status ** ** ^This interface is used to retrieve runtime status information ** about the performance of SQLite, and optionally to reset various |
︙ | ︙ | |||
5941 5942 5943 5944 5945 5946 5947 | ** ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt> ** <dd>This parameter returns the approximate number of of bytes of heap ** and lookaside memory used by all prepared statements associated with ** the database connection.)^ ** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0. ** </dd> | < < < < < < < < < < < < < < | | 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 | ** ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt> ** <dd>This parameter returns the approximate number of of bytes of heap ** and lookaside memory used by all prepared statements associated with ** the database connection.)^ ** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0. ** </dd> ** </dl> */ #define SQLITE_DBSTATUS_LOOKASIDE_USED 0 #define SQLITE_DBSTATUS_CACHE_USED 1 #define SQLITE_DBSTATUS_SCHEMA_USED 2 #define SQLITE_DBSTATUS_STMT_USED 3 #define SQLITE_DBSTATUS_LOOKASIDE_HIT 4 #define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5 #define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6 #define SQLITE_DBSTATUS_MAX 6 /* Largest defined DBSTATUS */ /* ** CAPI3REF: Prepared Statement Status ** ** ^(Each prepared statement maintains various ** [SQLITE_STMTSTATUS counters] that measure the number |
︙ | ︙ | |||
6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 | ** ** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt> ** <dd>^This is the number of rows inserted into transient indices that ** were created automatically in order to help joins run faster. ** A non-zero value in this counter may indicate an opportunity to ** improvement performance by adding permanent indices that do not ** need to be reinitialized each time the statement is run.</dd> ** </dl> */ #define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 #define SQLITE_STMTSTATUS_SORT 2 #define SQLITE_STMTSTATUS_AUTOINDEX 3 /* ** CAPI3REF: Custom Page Cache Object ** ** The sqlite3_pcache type is opaque. It is implemented by ** the pluggable module. The SQLite core has no knowledge of ** its size or internal structure and never deals with the ** sqlite3_pcache object except by holding and passing pointers ** to the object. ** | > | < < < < < < < < < < < < < < < < | | | | | 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 | ** ** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt> ** <dd>^This is the number of rows inserted into transient indices that ** were created automatically in order to help joins run faster. ** A non-zero value in this counter may indicate an opportunity to ** improvement performance by adding permanent indices that do not ** need to be reinitialized each time the statement is run.</dd> ** ** </dl> */ #define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 #define SQLITE_STMTSTATUS_SORT 2 #define SQLITE_STMTSTATUS_AUTOINDEX 3 /* ** CAPI3REF: Custom Page Cache Object ** ** The sqlite3_pcache type is opaque. It is implemented by ** the pluggable module. The SQLite core has no knowledge of ** its size or internal structure and never deals with the ** sqlite3_pcache object except by holding and passing pointers ** to the object. ** ** See [sqlite3_pcache_methods] for additional information. */ typedef struct sqlite3_pcache sqlite3_pcache; /* ** CAPI3REF: Application Defined Page Cache. ** KEYWORDS: {page cache} ** ** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can ** register an alternative page cache implementation by passing in an ** instance of the sqlite3_pcache_methods structure.)^ ** In many applications, most of the heap memory allocated by ** SQLite is used for the page cache. ** By implementing a ** custom page cache using this API, an application can better control ** the amount of memory consumed by SQLite, the way in which ** that memory is allocated and released, and the policies used to ** determine exactly which parts of a database file are cached and for ** how long. ** ** The alternative page cache mechanism is an ** extreme measure that is only needed by the most demanding applications. ** The built-in page cache is recommended for most uses. ** ** ^(The contents of the sqlite3_pcache_methods structure are copied to an ** internal buffer by SQLite within the call to [sqlite3_config]. Hence ** the application may discard the parameter after the call to ** [sqlite3_config()] returns.)^ ** ** [[the xInit() page cache method]] ** ^(The xInit() method is called once for each effective ** call to [sqlite3_initialize()])^ ** (usually only once during the lifetime of the process). ^(The xInit() ** method is passed a copy of the sqlite3_pcache_methods.pArg value.)^ ** The intent of the xInit() method is to set up global data structures ** required by the custom page cache implementation. ** ^(If the xInit() method is NULL, then the ** built-in default page cache is used instead of the application defined ** page cache.)^ ** ** [[the xShutdown() page cache method]] |
︙ | ︙ | |||
6109 6110 6111 6112 6113 6114 6115 | ** call to xShutdown(). ** ** [[the xCreate() page cache methods]] ** ^SQLite invokes the xCreate() method to construct a new cache instance. ** SQLite will typically create one cache instance for each open database file, ** though this is not guaranteed. ^The ** first parameter, szPage, is the size in bytes of the pages that must | | | < | | | > > > | | | 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 | ** call to xShutdown(). ** ** [[the xCreate() page cache methods]] ** ^SQLite invokes the xCreate() method to construct a new cache instance. ** SQLite will typically create one cache instance for each open database file, ** though this is not guaranteed. ^The ** first parameter, szPage, is the size in bytes of the pages that must ** be allocated by the cache. ^szPage will not be a power of two. ^szPage ** will the page size of the database file that is to be cached plus an ** increment (here called "R") of less than 250. SQLite will use the ** extra R bytes on each page to store metadata about the underlying ** database page on disk. The value of R depends ** on the SQLite version, the target platform, and how SQLite was compiled. ** ^(R is constant for a particular build of SQLite. Except, there are two ** distinct values of R when SQLite is compiled with the proprietary ** ZIPVFS extension.)^ ^The second argument to ** xCreate(), bPurgeable, is true if the cache being created will ** be used to cache database pages of a file stored on disk, or ** false if it is used for an in-memory database. The cache implementation ** does not have to do anything special based with the value of bPurgeable; ** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will ** never invoke xUnpin() except to deliberately delete a page. ** ^In other words, calls to xUnpin() on a cache with bPurgeable set to ** false will always have the "discard" flag set to true. ** ^Hence, a cache created with bPurgeable false will |
︙ | ︙ | |||
6141 6142 6143 6144 6145 6146 6147 | ** ** [[the xPagecount() page cache methods]] ** The xPagecount() method must return the number of pages currently ** stored in the cache, both pinned and unpinned. ** ** [[the xFetch() page cache methods]] ** The xFetch() method locates a page in the cache and returns a pointer to | | < | < < < < | | | | 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 | ** ** [[the xPagecount() page cache methods]] ** The xPagecount() method must return the number of pages currently ** stored in the cache, both pinned and unpinned. ** ** [[the xFetch() page cache methods]] ** The xFetch() method locates a page in the cache and returns a pointer to ** the page, or a NULL pointer. ** A "page", in this context, means a buffer of szPage bytes aligned at an ** 8-byte boundary. The page to be fetched is determined by the key. ^The ** minimum key value is 1. After it has been retrieved using xFetch, the page ** is considered to be "pinned". ** ** If the requested page is already in the page cache, then the page cache ** implementation must return a pointer to the page buffer with its content ** intact. If the requested page is not already in the cache, then the ** cache implementation should use the value of the createFlag ** parameter to help it determined what action to take: ** |
︙ | ︙ | |||
6203 6204 6205 6206 6207 6208 6209 | ** of these pages are pinned, they are implicitly unpinned, meaning that ** they can be safely discarded. ** ** [[the xDestroy() page cache method]] ** ^The xDestroy() method is used to delete a cache allocated by xCreate(). ** All resources associated with the specified cache should be freed. ^After ** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 | ** of these pages are pinned, they are implicitly unpinned, meaning that ** they can be safely discarded. ** ** [[the xDestroy() page cache method]] ** ^The xDestroy() method is used to delete a cache allocated by xCreate(). ** All resources associated with the specified cache should be freed. ^After ** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] ** handle invalid, and will not use it with any other sqlite3_pcache_methods ** functions. */ typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; struct sqlite3_pcache_methods { void *pArg; int (*xInit)(void*); void (*xShutdown)(void*); sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); void (*xCachesize)(sqlite3_pcache*, int nCachesize); int (*xPagecount)(sqlite3_pcache*); void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); void (*xUnpin)(sqlite3_pcache*, void*, int discard); void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); void (*xDestroy)(sqlite3_pcache*); }; /* ** CAPI3REF: Online Backup Object ** ** The sqlite3_backup object records state information about an ongoing ** online backup operation. ^The sqlite3_backup object is created by ** a call to [sqlite3_backup_init()] and is destroyed by a call to |
︙ | ︙ |
︙ | ︙ | |||
45 46 47 48 49 50 51 | int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*)); int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*)); int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*); int (*busy_handler)(sqlite3*,int(*)(void*,int),void*); int (*busy_timeout)(sqlite3*,int ms); int (*changes)(sqlite3*); int (*close)(sqlite3*); | | < | < | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*)); int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*)); int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*); int (*busy_handler)(sqlite3*,int(*)(void*,int),void*); int (*busy_timeout)(sqlite3*,int ms); int (*changes)(sqlite3*); int (*close)(sqlite3*); int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*)); int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*)); const void * (*column_blob)(sqlite3_stmt*,int iCol); int (*column_bytes)(sqlite3_stmt*,int iCol); int (*column_bytes16)(sqlite3_stmt*,int iCol); int (*column_count)(sqlite3_stmt*pStmt); const char * (*column_database_name)(sqlite3_stmt*,int); const void * (*column_database_name16)(sqlite3_stmt*,int); const char * (*column_decltype)(sqlite3_stmt*,int i); |
︙ | ︙ | |||
73 74 75 76 77 78 79 | const unsigned char * (*column_text)(sqlite3_stmt*,int iCol); const void * (*column_text16)(sqlite3_stmt*,int iCol); int (*column_type)(sqlite3_stmt*,int iCol); sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol); void * (*commit_hook)(sqlite3*,int(*)(void*),void*); int (*complete)(const char*sql); int (*complete16)(const void*sql); | | < | < | < < < | < < < | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | const unsigned char * (*column_text)(sqlite3_stmt*,int iCol); const void * (*column_text16)(sqlite3_stmt*,int iCol); int (*column_type)(sqlite3_stmt*,int iCol); sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol); void * (*commit_hook)(sqlite3*,int(*)(void*),void*); int (*complete)(const char*sql); int (*complete16)(const void*sql); int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*)); int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*)); int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*)); int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*)); int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*); int (*data_count)(sqlite3_stmt*pStmt); sqlite3 * (*db_handle)(sqlite3_stmt*); int (*declare_vtab)(sqlite3*,const char*); int (*enable_shared_cache)(int); int (*errcode)(sqlite3*db); const char * (*errmsg)(sqlite3*); |
︙ | ︙ | |||
129 130 131 132 133 134 135 | void (*result_null)(sqlite3_context*); void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*)); void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*)); void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*)); void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*)); void (*result_value)(sqlite3_context*,sqlite3_value*); void * (*rollback_hook)(sqlite3*,void(*)(void*),void*); | | < | < | < | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | void (*result_null)(sqlite3_context*); void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*)); void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*)); void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*)); void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*)); void (*result_value)(sqlite3_context*,sqlite3_value*); void * (*rollback_hook)(sqlite3*,void(*)(void*),void*); int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*); void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*)); char * (*snprintf)(int,char*,const char*,...); int (*step)(sqlite3_stmt*); int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*); void (*thread_cleanup)(void); int (*total_changes)(sqlite3*); void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*); int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*); void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*); void * (*user_data)(sqlite3_context*); const void * (*value_blob)(sqlite3_value*); int (*value_bytes)(sqlite3_value*); int (*value_bytes16)(sqlite3_value*); double (*value_double)(sqlite3_value*); int (*value_int)(sqlite3_value*); sqlite_int64 (*value_int64)(sqlite3_value*); |
︙ | ︙ | |||
163 164 165 166 167 168 169 | /* Added ??? */ int (*overload_function)(sqlite3*, const char *zFuncName, int nArg); /* Added by 3.3.13 */ int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**); int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**); int (*clear_bindings)(sqlite3_stmt*); /* Added by 3.4.1 */ | | < | < | < < | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | /* Added ??? */ int (*overload_function)(sqlite3*, const char *zFuncName, int nArg); /* Added by 3.3.13 */ int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**); int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**); int (*clear_bindings)(sqlite3_stmt*); /* Added by 3.4.1 */ int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *)); /* Added by 3.5.0 */ int (*bind_zeroblob)(sqlite3_stmt*,int,int); int (*blob_bytes)(sqlite3_blob*); int (*blob_close)(sqlite3_blob*); int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**); int (*blob_read)(sqlite3_blob*,void*,int,int); int (*blob_write)(sqlite3_blob*,const void*,int,int); int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*)); int (*file_control)(sqlite3*,const char*,int,void*); sqlite3_int64 (*memory_highwater)(int); sqlite3_int64 (*memory_used)(void); sqlite3_mutex *(*mutex_alloc)(int); void (*mutex_enter)(sqlite3_mutex*); void (*mutex_free)(sqlite3_mutex*); void (*mutex_leave)(sqlite3_mutex*); |
︙ | ︙ | |||
211 212 213 214 215 216 217 | int (*backup_finish)(sqlite3_backup*); sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*); int (*backup_pagecount)(sqlite3_backup*); int (*backup_remaining)(sqlite3_backup*); int (*backup_step)(sqlite3_backup*,int); const char *(*compileoption_get)(int); int (*compileoption_used)(const char*); | | < < < < | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | int (*backup_finish)(sqlite3_backup*); sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*); int (*backup_pagecount)(sqlite3_backup*); int (*backup_remaining)(sqlite3_backup*); int (*backup_step)(sqlite3_backup*,int); const char *(*compileoption_get)(int); int (*compileoption_used)(const char*); int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*)); int (*db_config)(sqlite3*,int,...); sqlite3_mutex *(*db_mutex)(sqlite3*); int (*db_status)(sqlite3*,int,int*,int*,int); int (*extended_errcode)(sqlite3*); void (*log)(int,const char*,...); sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64); const char *(*sourceid)(void); |
︙ | ︙ |
︙ | ︙ | |||
79 80 81 82 83 84 85 | db->pVdbe = p; ret = sqlite3_finalize((sqlite3_stmt *)p); // This will also free the copy's memory if (ret) { // finalize failed -- so we must put back anything we munged CopyMemory(po, p, sizeof(Vdbe)); db->pVdbe = po; | < < < < < < | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | db->pVdbe = p; ret = sqlite3_finalize((sqlite3_stmt *)p); // This will also free the copy's memory if (ret) { // finalize failed -- so we must put back anything we munged CopyMemory(po, p, sizeof(Vdbe)); db->pVdbe = po; break; } else { ZeroMemory(po, sizeof(Vdbe)); po->magic = VDBE_MAGIC_DEAD; } |
︙ | ︙ | |||
328 329 330 331 332 333 334 | *enc = 0; if ((ctx->pFunc->flags & SQLITE_FUNC_NEEDCOLL) == 0) return NULL; if (pColl) { *enc = pColl->enc; | < < | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | *enc = 0; if ((ctx->pFunc->flags & SQLITE_FUNC_NEEDCOLL) == 0) return NULL; if (pColl) { *enc = pColl->enc; *ptype = pColl->type; *plen = (pColl->zName != 0) ? strlen(pColl->zName) : 0; return pColl->zName; } return NULL; } |
︙ | ︙ |
1 2 3 4 5 6 7 8 9 10 | /* * * interop.h - * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! * */ #ifndef INTEROP_VERSION | | | 1 2 3 4 5 6 7 8 9 10 11 12 | /* * * interop.h - * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! * */ #ifndef INTEROP_VERSION #define INTEROP_VERSION "1.0.76.0" #endif |
1 2 3 4 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite.MSIL</id> | | | 1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite.MSIL</id> <version>1.0.76.0</version> <authors>SQLite Development Team</authors> <description>An ADO.NET provider for SQLite (managed-only).</description> <language>en-US</language> <projectUrl>http://system.data.sqlite.org/</projectUrl> <iconUrl>http://system.data.sqlite.org/images/sqlite32.png</iconUrl> <licenseUrl>http://www.sqlite.org/copyright.html</licenseUrl> <tags>sqlite database ado.net provider interop</tags> |
︙ | ︙ |
︙ | ︙ | |||
18 19 20 21 22 23 24 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop.2008", "SQLite.Interop\SQLite.Interop.2008.vcproj", "{53784BC1-A8BC-4AC8-8A3E-158D6807345A}" ProjectSection(ProjectDependencies) = postProject {AC139952-261A-4463-B6FA-AEBC25284A66} = {AC139952-261A-4463-B6FA-AEBC25284A66} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SQLite.Linq.2008", "System.Data.SQLite.Linq\System.Data.SQLite.Linq.2008.csproj", "{E6BF9F74-58E2-413B-A7CE-EA653ECB728D}" EndProject | < < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop.2008", "SQLite.Interop\SQLite.Interop.2008.vcproj", "{53784BC1-A8BC-4AC8-8A3E-158D6807345A}" ProjectSection(ProjectDependencies) = postProject {AC139952-261A-4463-B6FA-AEBC25284A66} = {AC139952-261A-4463-B6FA-AEBC25284A66} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SQLite.Linq.2008", "System.Data.SQLite.Linq\System.Data.SQLite.Linq.2008.csproj", "{E6BF9F74-58E2-413B-A7CE-EA653ECB728D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testlinq.2008", "testlinq\testlinq.2008.csproj", "{9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}" ProjectSection(ProjectDependencies) = postProject {AC139952-261A-4463-B6FA-AEBC25283A66} = {AC139952-261A-4463-B6FA-AEBC25283A66} {E6BF9F74-58E2-413B-A7CE-EA653ECB728D} = {E6BF9F74-58E2-413B-A7CE-EA653ECB728D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SQLite.Compact.2008", "System.Data.SQLite\System.Data.SQLite.Compact.2008.csproj", "{AC139951-261A-4463-B6FA-AEBC25283A66}" |
︙ | ︙ | |||
303 304 305 306 307 308 309 | {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.Build.0 = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Any CPU.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Mixed Platforms.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Win32.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|x64.ActiveCfg = Release|Any CPU | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.Build.0 = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Any CPU.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Mixed Platforms.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Win32.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|x64.ActiveCfg = Release|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Any CPU.Build.0 = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Win32.ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Win32.Build.0 = Debug|Any CPU |
︙ | ︙ |
︙ | ︙ | |||
18 19 20 21 22 23 24 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop.2010", "SQLite.Interop\SQLite.Interop.2010.vcxproj", "{53784BC1-A8BC-4AC8-8A3E-158D6807345A}" ProjectSection(ProjectDependencies) = postProject {AC139952-261A-4463-B6FA-AEBC25284A66} = {AC139952-261A-4463-B6FA-AEBC25284A66} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SQLite.Linq.2010", "System.Data.SQLite.Linq\System.Data.SQLite.Linq.2010.csproj", "{E6BF9F74-58E2-413B-A7CE-EA653ECB728D}" EndProject | < < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop.2010", "SQLite.Interop\SQLite.Interop.2010.vcxproj", "{53784BC1-A8BC-4AC8-8A3E-158D6807345A}" ProjectSection(ProjectDependencies) = postProject {AC139952-261A-4463-B6FA-AEBC25284A66} = {AC139952-261A-4463-B6FA-AEBC25284A66} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SQLite.Linq.2010", "System.Data.SQLite.Linq\System.Data.SQLite.Linq.2010.csproj", "{E6BF9F74-58E2-413B-A7CE-EA653ECB728D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testlinq.2010", "testlinq\testlinq.2010.csproj", "{9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}" ProjectSection(ProjectDependencies) = postProject {AC139952-261A-4463-B6FA-AEBC25283A66} = {AC139952-261A-4463-B6FA-AEBC25283A66} {E6BF9F74-58E2-413B-A7CE-EA653ECB728D} = {E6BF9F74-58E2-413B-A7CE-EA653ECB728D} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQLite.Interop.Static.2010", "SQLite.Interop\SQLite.Interop.Static.2010.vcxproj", "{490CBC51-A3B2-4397-89F9-16E858DCB4F8}" |
︙ | ︙ | |||
261 262 263 264 265 266 267 | {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|Win32.Build.0 = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.Build.0 = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Any CPU.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Mixed Platforms.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Win32.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|x64.ActiveCfg = Release|Any CPU | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|Win32.Build.0 = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseManagedOnly|x64.Build.0 = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Any CPU.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Mixed Platforms.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|Win32.ActiveCfg = Release|Any CPU {E6BF9F74-58E2-413B-A7CE-EA653ECB728D}.ReleaseNativeOnly|x64.ActiveCfg = Release|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Any CPU.Build.0 = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Win32.ActiveCfg = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|Win32.Build.0 = Debug|Any CPU {9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}.Debug|x64.ActiveCfg = Debug|Any CPU |
︙ | ︙ |
︙ | ︙ | |||
102 103 104 105 106 107 108 | <IsCompactFramework Condition="'$(IsCompactFramework)' == ''">false</IsCompactFramework> <!-- NOTE: Emit an AssemblyFlags attribute that includes the Retargetable flag from the AssemblyNameFlags enumeration? --> <IsRetargetable Condition="'$(IsRetargetable)' == ''">false</IsRetargetable> | < < < < < < < < | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | <IsCompactFramework Condition="'$(IsCompactFramework)' == ''">false</IsCompactFramework> <!-- NOTE: Emit an AssemblyFlags attribute that includes the Retargetable flag from the AssemblyNameFlags enumeration? --> <IsRetargetable Condition="'$(IsRetargetable)' == ''">false</IsRetargetable> </PropertyGroup> <!-- ****************************************************************************** ** Warning Properties ** ****************************************************************************** --> |
︙ | ︙ | |||
176 177 178 179 180 181 182 | ****************************************************************************** ** Strong Name Signing Properties ** ****************************************************************************** --> <PropertyGroup Condition="'$(SQLiteNetDir)' != '' And !HasTrailingSlash('$(SQLiteNetDir)') And | | < | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | ****************************************************************************** ** Strong Name Signing Properties ** ****************************************************************************** --> <PropertyGroup Condition="'$(SQLiteNetDir)' != '' And !HasTrailingSlash('$(SQLiteNetDir)') And Exists('$(SQLiteNetDir)\System.Data.SQLite\System.Data.SQLite.snk')"> <!-- NOTE: Sign the assembly? By default, this is enabled. --> <SignAssembly Condition="'$(SignAssembly)' == ''">true</SignAssembly> <!-- NOTE: Use delay signing? By default, this is disabled because the |
︙ | ︙ |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
1 2 3 4 5 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite</id> <title>System.Data.SQLite (x86)</title> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite</id> <title>System.Data.SQLite (x86)</title> <version>1.0.76.0</version> <authors>SQLite Development Team</authors> <description>The official SQLite database engine combined with a complete ADO.NET provider all rolled into a single mixed-mode assembly for x86.</description> <language>en-US</language> <projectUrl>http://system.data.sqlite.org/</projectUrl> <iconUrl>http://system.data.sqlite.org/images/sqlite32.png</iconUrl> <licenseUrl>http://www.sqlite.org/copyright.html</licenseUrl> <tags>sqlite database ado.net provider interop</tags> |
︙ | ︙ |
1 2 3 4 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite.x64</id> | | | 1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite.x64</id> <version>1.0.76.0</version> <authors>SQLite Development Team</authors> <description>The official SQLite database engine combined with a complete ADO.NET provider all rolled into a single mixed-mode assembly for x64.</description> <language>en-US</language> <projectUrl>http://system.data.sqlite.org/</projectUrl> <iconUrl>http://system.data.sqlite.org/images/sqlite32.png</iconUrl> <licenseUrl>http://www.sqlite.org/copyright.html</licenseUrl> <tags>sqlite database ado.net provider interop</tags> |
︙ | ︙ |
1 2 3 4 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite.x86</id> | | | 1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>System.Data.SQLite.x86</id> <version>1.0.76.0</version> <authors>SQLite Development Team</authors> <description>The official SQLite database engine combined with a complete ADO.NET provider all rolled into a single mixed-mode assembly for x86.</description> <language>en-US</language> <projectUrl>http://system.data.sqlite.org/</projectUrl> <iconUrl>http://system.data.sqlite.org/images/sqlite32.png</iconUrl> <licenseUrl>http://www.sqlite.org/copyright.html</licenseUrl> <tags>sqlite database ado.net provider interop</tags> |
︙ | ︙ |
1 2 3 4 5 6 7 8 9 10 11 | ; ; SQLite.iss -- ; ; Written by Joe Mistachkin. ; Released to the public domain, use at your own risk! ; #define BaseConfiguration StringChange(AppConfiguration, "NativeOnly", "") #define GacProcessor StringChange(AppProcessor, "x64", "amd64") #if Pos("NativeOnly", AppConfiguration) == 0 | < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ; ; SQLite.iss -- ; ; Written by Joe Mistachkin. ; Released to the public domain, use at your own risk! ; #define BaseConfiguration StringChange(AppConfiguration, "NativeOnly", "") #define GacProcessor StringChange(AppProcessor, "x64", "amd64") #if Pos("NativeOnly", AppConfiguration) == 0 #define AppVersion GetStringFileInfo("..\bin\" + Year + "\" + AppPlatform + "\" + AppConfiguration + "\System.Data.SQLite.dll", PRODUCT_VERSION) #define OutputConfiguration StringChange(StringChange(AppConfiguration, "Debug", "setup"), "Release", "setup") + "-bundle" #else #define AppVersion GetStringFileInfo("..\bin\" + Year + "\" + BaseConfiguration + "\bin\System.Data.SQLite.dll", PRODUCT_VERSION) #define OutputConfiguration StringChange(StringChange(BaseConfiguration, "Debug", "setup"), "Release", "setup") #endif [Setup] AllowNoIcons=true |
︙ | ︙ | |||
54 55 56 57 58 59 60 | [Components] Name: Application; Description: System.Data.SQLite components.; Types: custom compact full Name: Application\Core; Description: Core components.; Types: custom compact full Name: Application\Core\MSIL; Description: Core managed components.; Types: custom compact full Name: Application\Core\{#AppProcessor}; Description: Core native components.; Types: custom compact full Name: Application\LINQ; Description: LINQ support components.; Types: custom compact full | < < < < < < < < | 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 | [Components] Name: Application; Description: System.Data.SQLite components.; Types: custom compact full Name: Application\Core; Description: Core components.; Types: custom compact full Name: Application\Core\MSIL; Description: Core managed components.; Types: custom compact full Name: Application\Core\{#AppProcessor}; Description: Core native components.; Types: custom compact full Name: Application\LINQ; Description: LINQ support components.; Types: custom compact full Name: Application\Symbols; Description: Debugging symbol components.; Types: custom compact full Name: Application\Documentation; Description: Documentation components.; Types: custom compact full Name: Application\Test; Description: Test components.; Types: custom compact full [Tasks] Components: Application\Core\MSIL Or Application\LINQ; Name: ngen; Description: Generate native images for the assemblies and install the images in the native image cache.; Check: CheckIsNetFx2Setup() or CheckIsNetFx4Setup() #if Pos("NativeOnly", AppConfiguration) == 0 Components: Application\Core\MSIL Or Application\LINQ; Name: gac; Description: Install the assemblies into the global assembly cache.; Flags: unchecked; Check: CheckIsNetFx2Setup() or CheckIsNetFx4Setup() #endif [Run] Components: Application\Core\MSIL; Tasks: ngen; Filename: {code:GetNetFx2InstallRoot|Ngen.exe}; Parameters: "install ""{app}\bin\System.Data.SQLite.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx2Setup() Components: Application\Core\MSIL; Tasks: ngen; Filename: {code:GetNetFx4InstallRoot|Ngen.exe}; Parameters: "install ""{app}\bin\System.Data.SQLite.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx4Setup() Components: Application\LINQ; Tasks: ngen; Filename: {code:GetNetFx2InstallRoot|Ngen.exe}; Parameters: "install ""{app}\bin\System.Data.SQLite.Linq.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx2Setup() and CheckForNetFx35(1) Components: Application\LINQ; Tasks: ngen; Filename: {code:GetNetFx4InstallRoot|Ngen.exe}; Parameters: "install ""{app}\bin\System.Data.SQLite.Linq.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx4Setup() [UninstallRun] Components: Application\LINQ; Tasks: ngen; Filename: {code:GetNetFx4InstallRoot|Ngen.exe}; Parameters: "uninstall ""{app}\bin\System.Data.SQLite.Linq.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx4Setup() Components: Application\LINQ; Tasks: ngen; Filename: {code:GetNetFx2InstallRoot|Ngen.exe}; Parameters: "uninstall ""{app}\bin\System.Data.SQLite.Linq.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx2Setup() and CheckForNetFx35(1) Components: Application\Core\MSIL; Tasks: ngen; Filename: {code:GetNetFx4InstallRoot|Ngen.exe}; Parameters: "uninstall ""{app}\bin\System.Data.SQLite.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx4Setup() Components: Application\Core\MSIL; Tasks: ngen; Filename: {code:GetNetFx2InstallRoot|Ngen.exe}; Parameters: "uninstall ""{app}\bin\System.Data.SQLite.dll"" /nologo"; Flags: skipifdoesntexist; Check: CheckIsNetFx2Setup() [Dirs] Name: {app}\bin |
︙ | ︙ | |||
119 120 121 122 123 124 125 | #if Pos("NativeOnly", AppConfiguration) != 0 Components: Application\Core\{#AppProcessor}; Source: ..\bin\{#Year}\{#AppPlatform}\{#AppConfiguration}\SQLite.Interop.dll; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Core\{#AppProcessor} and Application\Symbols; Source: ..\bin\{#Year}\{#AppPlatform}\{#AppConfiguration}\SQLite.Interop.pdb; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete #endif Components: Application\Documentation; Source: ..\doc\SQLite.NET.chm; DestDir: {app}\doc; Flags: restartreplace uninsrestartdelete | < < < < | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | #if Pos("NativeOnly", AppConfiguration) != 0 Components: Application\Core\{#AppProcessor}; Source: ..\bin\{#Year}\{#AppPlatform}\{#AppConfiguration}\SQLite.Interop.dll; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Core\{#AppProcessor} and Application\Symbols; Source: ..\bin\{#Year}\{#AppPlatform}\{#AppConfiguration}\SQLite.Interop.pdb; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete #endif Components: Application\Documentation; Source: ..\doc\SQLite.NET.chm; DestDir: {app}\doc; Flags: restartreplace uninsrestartdelete Components: Application\Test; Source: ..\bin\{#Year}\{#BaseConfiguration}\bin\test.exe; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Test and Application\Symbols; Source: ..\bin\{#Year}\{#BaseConfiguration}\bin\test.pdb; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Test; Source: ..\bin\{#Year}\{#BaseConfiguration}\bin\test.exe.config; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Test and Application\LINQ; Source: ..\bin\{#Year}\{#BaseConfiguration}\bin\testlinq.exe; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Test and Application\LINQ and Application\Symbols; Source: ..\bin\{#Year}\{#BaseConfiguration}\bin\testlinq.pdb; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Test and Application\LINQ; Source: ..\bin\{#Year}\{#BaseConfiguration}\bin\testlinq.exe.config; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete Components: Application\Test and Application\LINQ; Source: ..\testlinq\northwindEF.db; DestDir: {app}\bin; Flags: restartreplace uninsrestartdelete [Icons] Name: {group}\Test Application; Filename: {app}\bin\test.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\test.exe; Comment: Launch Test Application; IconIndex: 0; Flags: createonlyiffileexists Name: {group}\Class Library Documentation; Filename: {app}\doc\SQLite.NET.chm; WorkingDir: {app}\doc; Comment: Launch Class Library Documentation; Flags: createonlyiffileexists Name: {group}\README File; Filename: {app}\readme.htm; WorkingDir: {app}; Comment: View README File; Flags: createonlyiffileexists |
︙ | ︙ | |||
62 63 64 65 66 67 68 | :skip_mungeVersion %_VECHO% Version = '%VERSION%' CALL :fn_ResetErrorLevel | | < | | | < | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | :skip_mungeVersion %_VECHO% Version = '%VERSION%' CALL :fn_ResetErrorLevel %_ECHO% IF NOT EXIST Setup\Output MKDIR Setup\Output IF ERRORLEVEL 1 ( ECHO Could not create directory "Setup\Output". GOTO errors ) %_ECHO% zip.exe -v -r Setup\Output\sqlite-netFx-source-%VERSION%.zip * -x @exclude_src.txt IF ERRORLEVEL 1 ( ECHO Failed to archive source files. GOTO errors |
︙ | ︙ |
︙ | ︙ | |||
143 144 145 146 147 148 149 | :skip_mungeVersion %_VECHO% Version = '%VERSION%' CALL :fn_ResetErrorLevel | | < | | | < | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | :skip_mungeVersion %_VECHO% Version = '%VERSION%' CALL :fn_ResetErrorLevel %_ECHO% IF NOT EXIST Setup\Output MKDIR Setup\Output IF ERRORLEVEL 1 ( ECHO Could not create directory "Setup\Output". GOTO errors ) IF DEFINED BASE_CONFIGURATIONSUFFIX ( %_ECHO% zip.exe -v -j -r "Setup\Output\sqlite-%FRAMEWORK%-%TYPE%-%BASE_PLATFORM%-%YEAR%-%VERSION%.zip" "bin\%YEAR%\%BASE_CONFIGURATION%%BASE_CONFIGURATIONSUFFIX%\bin" -x @exclude_bin.txt ) ELSE ( %_ECHO% zip.exe -v -j -r "Setup\Output\sqlite-%FRAMEWORK%-%TYPE%-%BASE_PLATFORM%-%YEAR%-%VERSION%.zip" "bin\%YEAR%\%BASE_CONFIGURATION%\bin" -x @exclude_bin.txt ) |
︙ | ︙ |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
1 2 3 4 5 6 7 8 9 | @ECHO OFF :: :: set_x64_2010.bat -- :: :: Written by Joe Mistachkin. :: Released to the public domain, use at your own risk! :: | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | @ECHO OFF :: :: set_x64_2010.bat -- :: :: Written by Joe Mistachkin. :: Released to the public domain, use at your own risk! :: SET ISNETFX2=True SET VCRUNTIME=2010_SP1 SET PLATFORM=x64 SET PROCESSOR=x64 SET YEAR=2010 |
1 2 3 4 5 6 7 8 9 | @ECHO OFF :: :: set_x86_2010.bat -- :: :: Written by Joe Mistachkin. :: Released to the public domain, use at your own risk! :: | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | @ECHO OFF :: :: set_x86_2010.bat -- :: :: Written by Joe Mistachkin. :: Released to the public domain, use at your own risk! :: SET ISNETFX2=True SET VCRUNTIME=2010_SP1 SET PLATFORM=Win32 SET PROCESSOR=x86 SET YEAR=2010 |
︙ | ︙ | |||
60 61 62 63 64 65 66 | IF NOT DEFINED YEARS ( SET YEARS=2008 ) %_VECHO% Years = '%YEARS%' | | | < | | | | | | < < < | | | | | | | | | | | | | | | | | | | | < < < < < < < < < < < < < < < | | | | < | 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 | IF NOT DEFINED YEARS ( SET YEARS=2008 ) %_VECHO% Years = '%YEARS%' IF "%PROCESSOR_ARCHITECTURE%" == "x86" ( SET PLATFORM=Win32 ) IF "%PROCESSOR_ARCHITECTURE%" == "amd64" ( SET PLATFORM=x64 ) IF NOT DEFINED PLATFORM ( ECHO Unsupported platform. GOTO errors ) %_VECHO% Platform = '%PLATFORM%' %_ECHO% PUSHD "%ROOT%" IF ERRORLEVEL 1 ( ECHO Could not change directory to "%ROOT%". GOTO errors ) FOR %%Y IN (%YEARS%) DO ( %_ECHO% Externals\Eagle\bin\EagleShell.exe -preInitialize "set test_year {%%Y}" -file Tests\all.eagle IF ERRORLEVEL 1 ( ECHO Testing of "%%Y" managed-only assembly failed. GOTO errors ) %_ECHO% XCOPY "bin\%%Y\Release\bin\test.*" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS% IF ERRORLEVEL 1 ( ECHO Failed to copy "bin\%%Y\Release\bin\test.*" to "bin\%%Y\%PLATFORM%\Release". GOTO errors ) %_ECHO% XCOPY "bin\%%Y\Release\bin\System.Data.SQLite.Linq.*" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS% IF ERRORLEVEL 1 ( ECHO Failed to copy "bin\%%Y\Release\bin\System.Data.SQLite.Linq.*" to "bin\%%Y\%PLATFORM%\Release". GOTO errors ) %_ECHO% XCOPY "bin\%%Y\Release\bin\testlinq.*" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS% IF ERRORLEVEL 1 ( ECHO Failed to copy "bin\%%Y\Release\bin\testlinq.*" to "bin\%%Y\%PLATFORM%\Release". GOTO errors ) %_ECHO% XCOPY "bin\%%Y\Release\bin\northwindEF.db" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS% IF ERRORLEVEL 1 ( ECHO Failed to copy "bin\%%Y\Release\bin\northwindEF.db" to "bin\%%Y\%PLATFORM%\Release". GOTO errors ) %_ECHO% Externals\Eagle\bin\EagleShell.exe -preInitialize "set test_year {%%Y}" -initialize -runtimeOption native -file Tests\all.eagle IF ERRORLEVEL 1 ( ECHO Testing of "%%Y" mixed-mode assembly failed. GOTO errors ) ) %_ECHO% POPD IF ERRORLEVEL 1 ( ECHO Could not restore directory. |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Reflection; using System.Runtime.InteropServices; using System.Security; using System.Runtime.ConstrainedExecution; // General Information about an assembly is controlled through the following |
︙ | ︙ | |||
40 41 42 43 44 45 46 | // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] | | | | 33 34 35 36 37 38 39 40 41 | // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
|
| < < < < < < < | 1 2 3 4 5 6 7 | //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. |
︙ | ︙ |
1 | <?xml version="1.0" encoding="utf-8"?> | < < < < < < < < < < | 1 2 3 4 5 6 7 8 | <?xml version="1.0" encoding="utf-8"?> <!-- #################################################################################################################### BE AWARE THAT THE ORDER IN WHICH TYPES ARE DESCRIBED IN THE PROVIDER MANIFEST IS RELEVANT AND HAVE IMPACT IN LOOKUP PROCESS #################################################################################################################### |
︙ | ︙ |
︙ | ︙ | |||
15 16 17 18 19 20 21 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{E6BF9F74-58E2-413B-A7CE-EA653ECB728D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>System.Data.SQLite.Linq</RootNamespace> <AssemblyName>System.Data.SQLite.Linq</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{E6BF9F74-58E2-413B-A7CE-EA653ECB728D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>System.Data.SQLite.Linq</RootNamespace> <AssemblyName>System.Data.SQLite.Linq</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> <SQLiteNetDir>$(MSBuildProjectDirectory)\..</SQLiteNetDir> <ConfigurationYear>2010</ConfigurationYear> </PropertyGroup> <Import Project="$(SQLiteNetDir)\SQLite.NET.Settings.targets" /> <PropertyGroup Condition="'$(BinaryOutputPath)' != ''"> <OutputPath>$(BinaryOutputPath)</OutputPath> <DocumentationFile>$(BinaryOutputPath)System.Data.SQLite.Linq.xml</DocumentationFile> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Resources; #if !PLATFORM_COMPACTFRAMEWORK |
︙ | ︙ | |||
36 37 38 39 40 41 42 | #endif // Setting ComVisible to false makes the types in this assembly not visible // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] [assembly: CLSCompliant(true)] | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #endif // Setting ComVisible to false makes the types in this assembly not visible // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] [assembly: CLSCompliant(true)] [assembly: InternalsVisibleTo("System.Data.SQLite.Linq, PublicKey=002400000480000094000000060200000024000052534131000400000100010005a288de5687c4e1b621ddff5d844727418956997f475eb829429e411aff3e93f97b70de698b972640925bdd44280df0a25a843266973704137cbb0e7441c1fe7cae4e2440ae91ab8cde3933febcb1ac48dd33b40e13c421d8215c18a4349a436dd499e3c385cc683015f886f6c10bd90115eb2bd61b67750839e3a19941dc9c")] [assembly: NeutralResourcesLanguage("en")] #if !PLATFORM_COMPACTFRAMEWORK [assembly: AllowPartiallyTrustedCallers] [assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #if !NET_20 |
︙ | ︙ | |||
60 61 62 63 64 65 66 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: | | | | 53 54 55 56 57 58 59 60 61 62 63 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.76.0")] #if !PLATFORM_COMPACTFRAMEWORK [assembly: AssemblyFileVersion("1.0.76.0")] #endif |
1 | <?xml version="1.0" standalone="yes"?> | < < < < < < < < < < | 1 2 3 4 5 6 7 8 | <?xml version="1.0" standalone="yes"?> <DocumentElement> <DataTypes> <TypeName>smallint</TypeName> <ProviderDbType>10</ProviderDbType> <ColumnSize>5</ColumnSize> <DataType>System.Int16</DataType> <CreateFormat>smallint</CreateFormat> |
︙ | ︙ |
1 | <?xml version="1.0" encoding="utf-8" ?> | < < < < < < < < < < | 1 2 3 4 5 6 7 8 | <?xml version="1.0" encoding="utf-8" ?> <DocumentElement> <MetaDataCollections> <CollectionName>MetaDataCollections</CollectionName> <NumberOfRestrictions>0</NumberOfRestrictions> <NumberOfIdentifierParts>0</NumberOfIdentifierParts> </MetaDataCollections> <MetaDataCollections> |
︙ | ︙ |
1 2 3 4 5 6 7 8 9 10 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; | < < < < < < < < < < < < < | | | < < < < < < < < < < < < < < | < < < < | < < < < < < < < < < | | < < < < < < < < < < < | | | | | | < | | > | | < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Runtime.InteropServices; #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif internal delegate void SQLiteLogCallback(IntPtr puser, int err_code, IntPtr message); /// <summary> /// This class implements SQLiteBase completely, and is the guts of the code that interop's SQLite with .NET /// </summary> internal class SQLite3 : SQLiteBase { #if !PLATFORM_COMPACTFRAMEWORK internal const string DesignerVersion = "1.0.76.0"; #endif /// <summary> /// The opaque pointer returned to us by the sqlite provider /// </summary> protected SQLiteConnectionHandle _sql; protected string _fileName; protected bool _usePool; protected int _poolVersion; #if !PLATFORM_COMPACTFRAMEWORK private bool _buildingSchema; #endif /// <summary> /// The user-defined functions registered on this connection /// </summary> protected SQLiteFunction[] _functionsArray; internal SQLite3(SQLiteDateFormats fmt) : base(fmt) { } protected override void Dispose(bool bDisposing) { if (bDisposing) Close(); } // It isn't necessary to cleanup any functions we've registered. If the connection // goes to the pool and is resurrected later, re-registered functions will overwrite the // previous functions. The SQLiteFunctionCookieHandle will take care of freeing unmanaged // resources belonging to the previously-registered functions. internal override void Close() { if (_sql != null) { if (_usePool) { SQLiteBase.ResetConnection(_sql); SQLiteConnectionPool.Add(_fileName, _sql, _poolVersion); } else _sql.Dispose(); } _sql = null; } internal override void Cancel() { UnsafeNativeMethods.sqlite3_interrupt(_sql); } internal override string Version |
︙ | ︙ | |||
143 144 145 146 147 148 149 | { get { return UTF8ToString(UnsafeNativeMethods.sqlite3_libversion(), -1); } } | < < < < < < < < | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | { get { return UTF8ToString(UnsafeNativeMethods.sqlite3_libversion(), -1); } } internal override bool AutoCommit { get { return IsAutocommit(_sql); } } |
︙ | ︙ | |||
175 176 177 178 179 180 181 | { get { return UnsafeNativeMethods.sqlite3_changes(_sql); } } | < < < < < < < < < < < < < < < < | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | { get { return UnsafeNativeMethods.sqlite3_changes(_sql); } } /// <summary> /// Shutdown the SQLite engine so that it can be restarted with different config options. /// We depend on auto initialization to recover. /// </summary> /// <returns>Returns a result code</returns> internal override int Shutdown() { |
︙ | ︙ | |||
227 228 229 230 231 232 233 | IntPtr db; #if !SQLITE_STANDARD int n = UnsafeNativeMethods.sqlite3_open_interop(ToUTF8(strFilename), (int)flags, out db); #else int n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), out db, (int)flags, IntPtr.Zero); #endif | < < < < < | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | IntPtr db; #if !SQLITE_STANDARD int n = UnsafeNativeMethods.sqlite3_open_interop(ToUTF8(strFilename), (int)flags, out db); #else int n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), out db, (int)flags, IntPtr.Zero); #endif if (n > 0) throw new SQLiteException(n, null); _sql = db; } // Bind functions to this connection. If any previous functions of the same name // were already bound, then the new bindings replace the old. _functionsArray = SQLiteFunction.BindFunctions(this); |
︙ | ︙ | |||
344 345 346 347 348 349 350 | internal override string SQLiteLastError() { return SQLiteBase.SQLiteLastError(_sql); } internal override SQLiteStatement Prepare(SQLiteConnection cnn, string strSql, SQLiteStatement previous, uint timeoutMS, out string strRemain) { | < < < < < < < < < < < < < < < < < < < < < < < < < < | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | internal override string SQLiteLastError() { return SQLiteBase.SQLiteLastError(_sql); } internal override SQLiteStatement Prepare(SQLiteConnection cnn, string strSql, SQLiteStatement previous, uint timeoutMS, out string strRemain) { IntPtr stmt = IntPtr.Zero; IntPtr ptr = IntPtr.Zero; int len = 0; int n = 17; int retries = 0; byte[] b = ToUTF8(strSql); string typedefs = null; |
︙ | ︙ | |||
394 395 396 397 398 399 400 | #if !SQLITE_STANDARD n = UnsafeNativeMethods.sqlite3_prepare_interop(_sql, psql, b.Length - 1, out stmt, out ptr, out len); #else n = UnsafeNativeMethods.sqlite3_prepare(_sql, psql, b.Length - 1, out stmt, out ptr); len = -1; #endif | < < < < | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | #if !SQLITE_STANDARD n = UnsafeNativeMethods.sqlite3_prepare_interop(_sql, psql, b.Length - 1, out stmt, out ptr, out len); #else n = UnsafeNativeMethods.sqlite3_prepare(_sql, psql, b.Length - 1, out stmt, out ptr); len = -1; #endif if (n == 17) retries++; else if (n == 1) { if (String.Compare(SQLiteLastError(), "near \"TYPES\": syntax error", StringComparison.OrdinalIgnoreCase) == 0) { int pos = strSql.IndexOf(';'); |
︙ | ︙ | |||
499 500 501 502 503 504 505 | internal override void Bind_Int32(SQLiteStatement stmt, int index, int value) { int n = UnsafeNativeMethods.sqlite3_bind_int(stmt._sqlite_stmt, index, value); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | < < < | 385 386 387 388 389 390 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 | internal override void Bind_Int32(SQLiteStatement stmt, int index, int value) { int n = UnsafeNativeMethods.sqlite3_bind_int(stmt._sqlite_stmt, index, value); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } internal override void Bind_Int64(SQLiteStatement stmt, int index, long value) { #if !PLATFORM_COMPACTFRAMEWORK int n = UnsafeNativeMethods.sqlite3_bind_int64(stmt._sqlite_stmt, index, value); #else int n = UnsafeNativeMethods.sqlite3_bind_int64_interop(stmt._sqlite_stmt, index, ref value); #endif if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } internal override void Bind_Text(SQLiteStatement stmt, int index, string value) { byte[] b = ToUTF8(value); int n = UnsafeNativeMethods.sqlite3_bind_text(stmt._sqlite_stmt, index, b, b.Length - 1, (IntPtr)(-1)); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } internal override void Bind_DateTime(SQLiteStatement stmt, int index, DateTime dt) { byte[] b = ToUTF8(dt); int n = UnsafeNativeMethods.sqlite3_bind_text(stmt._sqlite_stmt, index, b, b.Length - 1, (IntPtr)(-1)); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } internal override void Bind_Blob(SQLiteStatement stmt, int index, byte[] blobData) { int n = UnsafeNativeMethods.sqlite3_bind_blob(stmt._sqlite_stmt, index, blobData, blobData.Length, (IntPtr)(-1)); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } |
︙ | ︙ | |||
1123 1124 1125 1126 1127 1128 1129 | /// log event occurs. Only one callback may be set. If NULL is passed, /// the logging callback is unregistered. /// </summary> /// <param name="func">The callback function to invoke.</param> /// <returns>Returns a result code</returns> internal override int SetLogCallback(SQLiteLogCallback func) { | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | /// log event occurs. Only one callback may be set. If NULL is passed, /// the logging callback is unregistered. /// </summary> /// <param name="func">The callback function to invoke.</param> /// <returns>Returns a result code</returns> internal override int SetLogCallback(SQLiteLogCallback func) { int rc = UnsafeNativeMethods.sqlite3_config((int)SQLiteConfigOpsEnum.SQLITE_CONFIG_LOG, func, (IntPtr)0); return rc; } /// <summary> /// Helper function to retrieve a column of data from an active statement. /// </summary> /// <param name="stmt">The statement being step()'d through</param> /// <param name="index">The column index to retrieve</param> /// <param name="typ">The type of data contained in the column. If Uninitialized, this function will retrieve the datatype information.</param> /// <returns>Returns the data in the column</returns> |
︙ | ︙ |
1 2 3 4 5 6 7 8 9 10 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; | < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Runtime.InteropServices; /// <summary> /// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode) /// </summary> internal class SQLite3_UTF16 : SQLite3 { internal SQLite3_UTF16(SQLiteDateFormats fmt) : base(fmt) { } /// <summary> /// Overrides SQLiteConvert.ToString() to marshal UTF-16 strings instead of UTF-8 /// </summary> /// <param name="b">A pointer to a UTF-16 string</param> /// <param name="nbytelen">The length (IN BYTES) of the string</param> /// <returns>A .NET string</returns> public override string ToString(IntPtr b, int nbytelen) { return UTF16ToString(b, nbytelen); } public static string UTF16ToString(IntPtr b, int nbytelen) { if (nbytelen == 0 || b == IntPtr.Zero) return ""; |
︙ | ︙ | |||
107 108 109 110 111 112 113 | int n = UnsafeNativeMethods.sqlite3_open16_interop(ToUTF8(strFilename), (int)flags, out db); #else if ((flags & SQLiteOpenFlagsEnum.Create) == 0 && System.IO.File.Exists(strFilename) == false) throw new SQLiteException((int)SQLiteErrorCode.CantOpen, strFilename); int n = UnsafeNativeMethods.sqlite3_open16(strFilename, out db); #endif | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | int n = UnsafeNativeMethods.sqlite3_open16_interop(ToUTF8(strFilename), (int)flags, out db); #else if ((flags & SQLiteOpenFlagsEnum.Create) == 0 && System.IO.File.Exists(strFilename) == false) throw new SQLiteException((int)SQLiteErrorCode.CantOpen, strFilename); int n = UnsafeNativeMethods.sqlite3_open16(strFilename, out db); #endif if (n > 0) throw new SQLiteException(n, null); _sql = db; } _functionsArray = SQLiteFunction.BindFunctions(this); } internal override void Bind_DateTime(SQLiteStatement stmt, int index, DateTime dt) { Bind_Text(stmt, index, ToString(dt)); } internal override void Bind_Text(SQLiteStatement stmt, int index, string value) { int n = UnsafeNativeMethods.sqlite3_bind_text16(stmt._sqlite_stmt, index, value, value.Length * 2, (IntPtr)(-1)); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } |
︙ | ︙ |
︙ | ︙ | |||
11 12 13 14 15 16 17 | /// <summary> /// This internal class provides the foundation of SQLite support. It defines all the abstract members needed to implement /// a SQLite data provider, and inherits from SQLiteConvert which allows for simple translations of string to and from SQLite. /// </summary> internal abstract class SQLiteBase : SQLiteConvert, IDisposable { | | | < < < < < < < < | 11 12 13 14 15 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 | /// <summary> /// This internal class provides the foundation of SQLite support. It defines all the abstract members needed to implement /// a SQLite data provider, and inherits from SQLiteConvert which allows for simple translations of string to and from SQLite. /// </summary> internal abstract class SQLiteBase : SQLiteConvert, IDisposable { internal SQLiteBase(SQLiteDateFormats fmt) : base(fmt) { } static internal object _lock = new object(); /// <summary> /// Returns a string representing the active version of SQLite /// </summary> internal abstract string Version { get; } /// <summary> /// Returns the rowid of the most recent successful INSERT into the database from this connection. /// </summary> internal abstract long LastInsertRowId { get; } /// <summary> /// Returns the number of changes the last executing insert/update caused. /// </summary> internal abstract int Changes { get; } /// <summary> /// Shutdown the SQLite engine so that it can be restarted with different config options. /// We depend on auto initialization to recover. /// </summary> internal abstract int Shutdown(); /// <summary> /// Returns non-zero if a database connection is open. /// </summary> |
︙ | ︙ | |||
111 112 113 114 115 116 117 | /// <param name="stmt">The statement to reset</param> /// <returns>Returns -1 if the schema changed while resetting, 0 if the reset was sucessful or 6 (SQLITE_LOCKED) if the reset failed due to a lock</returns> internal abstract int Reset(SQLiteStatement stmt); internal abstract void Cancel(); internal abstract void Bind_Double(SQLiteStatement stmt, int index, double value); internal abstract void Bind_Int32(SQLiteStatement stmt, int index, Int32 value); | < < | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | /// <param name="stmt">The statement to reset</param> /// <returns>Returns -1 if the schema changed while resetting, 0 if the reset was sucessful or 6 (SQLITE_LOCKED) if the reset failed due to a lock</returns> internal abstract int Reset(SQLiteStatement stmt); internal abstract void Cancel(); internal abstract void Bind_Double(SQLiteStatement stmt, int index, double value); internal abstract void Bind_Int32(SQLiteStatement stmt, int index, Int32 value); internal abstract void Bind_Int64(SQLiteStatement stmt, int index, Int64 value); internal abstract void Bind_Text(SQLiteStatement stmt, int index, string value); internal abstract void Bind_Blob(SQLiteStatement stmt, int index, byte[] blobData); internal abstract void Bind_DateTime(SQLiteStatement stmt, int index, DateTime dt); internal abstract void Bind_Null(SQLiteStatement stmt, int index); internal abstract int Bind_ParamCount(SQLiteStatement stmt); internal abstract string Bind_ParamName(SQLiteStatement stmt, int index); |
︙ | ︙ | |||
204 205 206 207 208 209 210 | internal abstract void ChangePassword(byte[] newPasswordBytes); internal abstract void SetUpdateHook(SQLiteUpdateCallback func); internal abstract void SetCommitHook(SQLiteCommitCallback func); internal abstract void SetTraceCallback(SQLiteTraceCallback func); internal abstract void SetRollbackHook(SQLiteRollbackCallback func); internal abstract int SetLogCallback(SQLiteLogCallback func); | < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < | < < < | < < < | < < < < < | < | | < | 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 225 226 227 228 229 | internal abstract void ChangePassword(byte[] newPasswordBytes); internal abstract void SetUpdateHook(SQLiteUpdateCallback func); internal abstract void SetCommitHook(SQLiteCommitCallback func); internal abstract void SetTraceCallback(SQLiteTraceCallback func); internal abstract void SetRollbackHook(SQLiteRollbackCallback func); internal abstract int SetLogCallback(SQLiteLogCallback func); internal abstract int GetCursorForTable(SQLiteStatement stmt, int database, int rootPage); internal abstract long GetRowIdForCursor(SQLiteStatement stmt, int cursor); internal abstract object GetValue(SQLiteStatement stmt, int index, SQLiteType typ); internal abstract bool AutoCommit { get; } internal abstract int FileControl(string zDbName, int op, IntPtr pArg); protected virtual void Dispose(bool bDisposing) { } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } // These statics are here for lack of a better place to put them. // They exist here because they are called during the finalization of // a SQLiteStatementHandle, SQLiteConnectionHandle, and SQLiteFunctionCookieHandle. // Therefore these functions have to be static, and have to be low-level. internal static string SQLiteLastError(SQLiteConnectionHandle db) |
︙ | ︙ | |||
365 366 367 368 369 370 371 | ReadOnly = 0x01, ReadWrite = 0x02, Create = 0x04, SharedCache = 0x01000000, Default = 0x06, } | < < < < < < < < < < < < < < < < < < < < < < < | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | ReadOnly = 0x01, ReadWrite = 0x02, Create = 0x04, SharedCache = 0x01000000, Default = 0x06, } // These are the options to the internal sqlite3_config call. internal enum SQLiteConfigOpsEnum { SQLITE_CONFIG_SINGLETHREAD = 1, // nil SQLITE_CONFIG_MULTITHREAD = 2, // nil SQLITE_CONFIG_SERIALIZED = 3, // nil SQLITE_CONFIG_MALLOC = 4, // sqlite3_mem_methods* SQLITE_CONFIG_GETMALLOC = 5, // sqlite3_mem_methods* SQLITE_CONFIG_SCRATCH = 6, // void*, int sz, int N SQLITE_CONFIG_PAGECACHE = 7, // void*, int sz, int N |
︙ | ︙ |
︙ | ︙ | |||
139 140 141 142 143 144 145 | _commandTimeout = connection.DefaultTimeout; } if (transaction != null) Transaction = transaction; } | < < < < < < < < < < < < < < < < | | | | < < < < | | | | | | | | | | | | | | | | | | | | | | | < < < < < < < < < < < < < < < | 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 | _commandTimeout = connection.DefaultTimeout; } if (transaction != null) Transaction = transaction; } /// <summary> /// Disposes of the command and clears all member variables /// </summary> /// <param name="disposing">Whether or not the class is being explicitly or implicitly disposed</param> protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { // If a reader is active on this command, don't destroy the command, instead let the reader do it SQLiteDataReader reader = null; if (_activeReader != null) { try { reader = _activeReader.Target as SQLiteDataReader; } catch(InvalidOperationException) { } } if (reader != null) { reader._disposeCommand = true; _activeReader = null; return; } Connection = null; _parameterCollection.Clear(); _commandText = null; } } /// <summary> /// Clears and destroys all statements currently prepared /// </summary> internal void ClearCommands() { if (_activeReader != null) |
︙ | ︙ | |||
252 253 254 255 256 257 258 | /// </summary> internal SQLiteStatement BuildNextCommand() { SQLiteStatement stmt = null; try { | < < | | | < | | | < | | | | | | < | | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | /// </summary> internal SQLiteStatement BuildNextCommand() { SQLiteStatement stmt = null; try { if (_statementList == null) _remainingText = _commandText; stmt = _cnn._sql.Prepare(_cnn, _remainingText, (_statementList == null) ? null : _statementList[_statementList.Count - 1], (uint)(_commandTimeout * 1000), out _remainingText); if (stmt != null) { stmt._command = this; if (_statementList == null) _statementList = new List<SQLiteStatement>(); _statementList.Add(stmt); _parameterCollection.MapParameters(stmt); stmt.BindParameters(); } return stmt; } catch (Exception) { if (stmt != null) { if (_statementList.Contains(stmt)) _statementList.Remove(stmt); stmt.Dispose(); } // If we threw an error compiling the statement, we cannot continue on so set the remaining text to null. _remainingText = null; |
︙ | ︙ | |||
314 315 316 317 318 319 320 | } /// <summary> /// Not implemented /// </summary> public override void Cancel() { | < < < < < | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | } /// <summary> /// Not implemented /// </summary> public override void Cancel() { if (_activeReader != null) { SQLiteDataReader reader = _activeReader.Target as SQLiteDataReader; if (reader != null) reader.Cancel(); } } /// <summary> /// The SQL command text associated with the command /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue(""), RefreshProperties(RefreshProperties.All), Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCommandTextEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public override string CommandText { get { return _commandText; } set { if (_commandText == value) return; if (_activeReader != null && _activeReader.IsAlive) { throw new InvalidOperationException("Cannot set CommandText while a DataReader is active"); } |
︙ | ︙ | |||
365 366 367 368 369 370 371 | #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((int)30)] #endif public override int CommandTimeout { get { | < < < < < | 320 321 322 323 324 325 326 327 328 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 | #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((int)30)] #endif public override int CommandTimeout { get { return _commandTimeout; } set { _commandTimeout = value; } } /// <summary> /// The type of the command. SQLite only supports CommandType.Text /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [RefreshProperties(RefreshProperties.All), DefaultValue(CommandType.Text)] #endif public override CommandType CommandType { get { return CommandType.Text; } set { if (value != CommandType.Text) { throw new NotSupportedException(); } } } |
︙ | ︙ | |||
414 415 416 417 418 419 420 | /// <summary> /// Create a new parameter /// </summary> /// <returns></returns> public new SQLiteParameter CreateParameter() { | < | < < | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | /// <summary> /// Create a new parameter /// </summary> /// <returns></returns> public new SQLiteParameter CreateParameter() { return new SQLiteParameter(); } /// <summary> /// The connection associated with this command /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((string)null), Editor("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public new SQLiteConnection Connection { get { return _cnn; } set { if (_activeReader != null && _activeReader.IsAlive) throw new InvalidOperationException("Cannot set Connection while a DataReader is active"); if (_cnn != null) { ClearCommands(); //_cnn.RemoveCommand(this); |
︙ | ︙ | |||
472 473 474 475 476 477 478 | /// Returns the SQLiteParameterCollection for the given command /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] #endif public new SQLiteParameterCollection Parameters { | | | 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | /// Returns the SQLiteParameterCollection for the given command /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] #endif public new SQLiteParameterCollection Parameters { get { return _parameterCollection; } } /// <summary> /// Forwards to the local Parameters property /// </summary> protected override DbParameterCollection DbParameterCollection { |
︙ | ︙ | |||
495 496 497 498 499 500 501 | /// command's underlying connection. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif public new SQLiteTransaction Transaction { | | < < | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | /// command's underlying connection. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif public new SQLiteTransaction Transaction { get { return _transaction; } set { if (_cnn != null) { if (_activeReader != null && _activeReader.IsAlive) throw new InvalidOperationException("Cannot set Transaction while a DataReader is active"); if (value != null) { |
︙ | ︙ | |||
582 583 584 585 586 587 588 | /// <summary> /// Overrides the default behavior to return a SQLiteDataReader specialization class /// </summary> /// <param name="behavior">The flags to be associated with the reader</param> /// <returns>A SQLiteDataReader</returns> public new SQLiteDataReader ExecuteReader(CommandBehavior behavior) { | < < < < < < < < < < < < < | 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | /// <summary> /// Overrides the default behavior to return a SQLiteDataReader specialization class /// </summary> /// <param name="behavior">The flags to be associated with the reader</param> /// <returns>A SQLiteDataReader</returns> public new SQLiteDataReader ExecuteReader(CommandBehavior behavior) { InitializeForReader(); SQLiteDataReader rd = new SQLiteDataReader(this, behavior); _activeReader = new WeakReference(rd, false); return rd; } /// <summary> /// Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class /// </summary> /// <returns>A SQLiteDataReader</returns> public new SQLiteDataReader ExecuteReader() { return ExecuteReader(CommandBehavior.Default); } /// <summary> /// Called by the SQLiteDataReader when the data reader is closed. /// </summary> internal void ClearDataReader() { _activeReader = null; } /// <summary> /// Execute the command and return the number of rows inserted/updated affected by it. /// </summary> /// <returns></returns> public override int ExecuteNonQuery() { using (SQLiteDataReader reader = ExecuteReader(CommandBehavior.SingleRow | CommandBehavior.SingleResult)) { while (reader.NextResult()) ; return reader.RecordsAffected; } } /// <summary> /// Execute the command and return the first column of the first row of the resultset /// (if present), or null if no resultset was returned. /// </summary> /// <returns>The first column of the first row of the first resultset from the query</returns> public override object ExecuteScalar() { using (SQLiteDataReader reader = ExecuteReader(CommandBehavior.SingleRow | CommandBehavior.SingleResult)) { if (reader.Read()) return reader[0]; } return null; } /// <summary> /// Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards. /// </summary> public override void Prepare() { } /// <summary> /// Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable. /// </summary> [DefaultValue(UpdateRowSource.None)] public override UpdateRowSource UpdatedRowSource { get { return _updateRowSource; } set { _updateRowSource = value; } } /// <summary> /// Determines if the command is visible at design time. Defaults to True. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DesignOnly(true), Browsable(false), DefaultValue(true), EditorBrowsable(EditorBrowsableState.Never)] #endif public override bool DesignTimeVisible { get { return _designTimeVisible; } set { _designTimeVisible = value; #if !PLATFORM_COMPACTFRAMEWORK TypeDescriptor.Refresh(this); #endif } } /// <summary> /// Clones a command, including all its parameters /// </summary> /// <returns>A new SQLiteCommand with the same commandtext, connection and parameters</returns> public object Clone() { return new SQLiteCommand(this); } } } |
︙ | ︙ | |||
32 33 34 35 36 37 38 | public SQLiteCommandBuilder(SQLiteDataAdapter adp) { QuotePrefix = "["; QuoteSuffix = "]"; DataAdapter = adp; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | public SQLiteCommandBuilder(SQLiteDataAdapter adp) { QuotePrefix = "["; QuoteSuffix = "]"; DataAdapter = adp; } /// <summary> /// Minimal amount of parameter processing. Primarily sets the DbType for the parameter equal to the provider type in the schema /// </summary> /// <param name="parameter">The parameter to use in applying custom behaviors to a row</param> /// <param name="row">The row to apply the parameter to</param> /// <param name="statementType">The type of statement</param> /// <param name="whereClause">Whether the application of the parameter is part of a WHERE clause</param> |
︙ | ︙ | |||
145 146 147 148 149 150 151 | } /// <summary> /// Gets/sets the DataAdapter for this CommandBuilder /// </summary> public new SQLiteDataAdapter DataAdapter { | | | < < < < < < < < < < < < < < < < < < | 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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | } /// <summary> /// Gets/sets the DataAdapter for this CommandBuilder /// </summary> public new SQLiteDataAdapter DataAdapter { get { return (SQLiteDataAdapter)base.DataAdapter; } set { base.DataAdapter = value; } } /// <summary> /// Returns the automatically-generated SQLite command to delete rows from the database /// </summary> /// <returns></returns> public new SQLiteCommand GetDeleteCommand() { return (SQLiteCommand)base.GetDeleteCommand(); } /// <summary> /// Returns the automatically-generated SQLite command to delete rows from the database /// </summary> /// <param name="useColumnsForParameterNames"></param> /// <returns></returns> public new SQLiteCommand GetDeleteCommand(bool useColumnsForParameterNames) { return (SQLiteCommand)base.GetDeleteCommand(useColumnsForParameterNames); } /// <summary> /// Returns the automatically-generated SQLite command to update rows in the database /// </summary> /// <returns></returns> public new SQLiteCommand GetUpdateCommand() { return (SQLiteCommand)base.GetUpdateCommand(); } /// <summary> /// Returns the automatically-generated SQLite command to update rows in the database /// </summary> /// <param name="useColumnsForParameterNames"></param> /// <returns></returns> public new SQLiteCommand GetUpdateCommand(bool useColumnsForParameterNames) { return (SQLiteCommand)base.GetUpdateCommand(useColumnsForParameterNames); } /// <summary> /// Returns the automatically-generated SQLite command to insert rows into the database /// </summary> /// <returns></returns> public new SQLiteCommand GetInsertCommand() { return (SQLiteCommand)base.GetInsertCommand(); } /// <summary> /// Returns the automatically-generated SQLite command to insert rows into the database /// </summary> /// <param name="useColumnsForParameterNames"></param> /// <returns></returns> public new SQLiteCommand GetInsertCommand(bool useColumnsForParameterNames) { return (SQLiteCommand)base.GetInsertCommand(useColumnsForParameterNames); } /// <summary> /// Overridden to hide its property from the designer /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false)] #endif public override CatalogLocation CatalogLocation { get { return base.CatalogLocation; } set { base.CatalogLocation = value; } } /// <summary> /// Overridden to hide its property from the designer /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false)] #endif public override string CatalogSeparator { get { return base.CatalogSeparator; } set { base.CatalogSeparator = value; } } /// <summary> /// Overridden to hide its property from the designer /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false)] #endif [DefaultValue("[")] public override string QuotePrefix { get { return base.QuotePrefix; } set { base.QuotePrefix = value; } } /// <summary> /// Overridden to hide its property from the designer /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false)] #endif public override string QuoteSuffix { get { return base.QuoteSuffix; } set { base.QuoteSuffix = value; } } /// <summary> /// Places brackets around an identifier /// </summary> /// <param name="unquotedIdentifier">The identifier to quote</param> /// <returns>The bracketed identifier</returns> public override string QuoteIdentifier(string unquotedIdentifier) { if (String.IsNullOrEmpty(QuotePrefix) || String.IsNullOrEmpty(QuoteSuffix) || String.IsNullOrEmpty(unquotedIdentifier)) return unquotedIdentifier; return QuotePrefix + unquotedIdentifier.Replace(QuoteSuffix, QuoteSuffix + QuoteSuffix) + QuoteSuffix; } /// <summary> /// Removes brackets around an identifier /// </summary> /// <param name="quotedIdentifier">The quoted (bracketed) identifier</param> /// <returns>The undecorated identifier</returns> public override string UnquoteIdentifier(string quotedIdentifier) { if (String.IsNullOrEmpty(QuotePrefix) || String.IsNullOrEmpty(QuoteSuffix) || String.IsNullOrEmpty(quotedIdentifier)) return quotedIdentifier; if (quotedIdentifier.StartsWith(QuotePrefix, StringComparison.OrdinalIgnoreCase) == false || quotedIdentifier.EndsWith(QuoteSuffix, StringComparison.OrdinalIgnoreCase) == false) |
︙ | ︙ | |||
341 342 343 344 345 346 347 | #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false)] #endif public override string SchemaSeparator { get { | < < | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false)] #endif public override string SchemaSeparator { get { return base.SchemaSeparator; } set { base.SchemaSeparator = value; } } /// <summary> /// Override helper, which can help the base command builder choose the right keys for the given query /// </summary> |
︙ | ︙ |
︙ | ︙ | |||
49 50 51 52 53 54 55 | /// <item> /// <description>DateTimeFormat</description> /// <description><b>Ticks</b> - Use DateTime.Ticks<br/><b>ISO8601</b> - Use ISO8601 DateTime format</description> /// <description>N</description> /// <description>ISO8601</description> /// </item> /// <item> | < < < < < < < < < < < < < < < | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /// <item> /// <description>DateTimeFormat</description> /// <description><b>Ticks</b> - Use DateTime.Ticks<br/><b>ISO8601</b> - Use ISO8601 DateTime format</description> /// <description>N</description> /// <description>ISO8601</description> /// </item> /// <item> /// <description>BinaryGUID</description> /// <description><b>True</b> - Store GUID columns in binary form<br/><b>False</b> - Store GUID columns as text</description> /// <description>N</description> /// <description>True</description> /// </item> /// <item> /// <description>Cache Size</description> |
︙ | ︙ | |||
159 160 161 162 163 164 165 | /// </item> /// <item> /// <description>Foreign Keys</description> /// <description>Enable foreign key constraints</description> /// <description>N</description> /// <description>False</description> /// </item> | < < < < < < < < < < < < < < < | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /// </item> /// <item> /// <description>Foreign Keys</description> /// <description>Enable foreign key constraints</description> /// <description>N</description> /// <description>False</description> /// </item> /// </list> /// </remarks> public sealed partial class SQLiteConnection : DbConnection, ICloneable { private const int SQLITE_FCNTL_WIN32_AV_RETRY = 9; private const string _dataDirectory = "|DataDirectory|"; private const string _masterdb = "sqlite_master"; private const string _tempmasterdb = "sqlite_temp_master"; /// <summary> |
︙ | ︙ | |||
221 222 223 224 225 226 227 | /// </summary> private string _dataSource; /// <summary> /// Temporary password storage, emptied after the database has been opened /// </summary> private byte[] _password; | < < < < < < < < < < < < | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | /// </summary> private string _dataSource; /// <summary> /// Temporary password storage, emptied after the database has been opened /// </summary> private byte[] _password; /// <summary> /// Default command timeout /// </summary> private int _defaultTimeout = 30; internal bool _binaryGuid; |
︙ | ︙ | |||
278 279 280 281 282 283 284 | /// <param name="connectionString">The connection string to use on the connection</param> public SQLiteConnection(string connectionString) { #if !PLATFORM_COMPACTFRAMEWORK SQLiteLog.Initialize(); #endif | < | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | /// <param name="connectionString">The connection string to use on the connection</param> public SQLiteConnection(string connectionString) { #if !PLATFORM_COMPACTFRAMEWORK SQLiteLog.Initialize(); #endif _connectionState = ConnectionState.Closed; _connectionString = ""; //_commandList = new List<WeakReference>(); if (connectionString != null) ConnectionString = connectionString; } |
︙ | ︙ | |||
322 323 324 325 326 327 328 | } } } } } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | } } } } } } #if PLATFORM_COMPACTFRAMEWORK /// <summary> /// Obsolete /// </summary> public override int ConnectionTimeout { get |
︙ | ︙ | |||
389 390 391 392 393 394 395 396 397 398 399 400 401 402 | /// will also be opened. /// </summary> /// <returns></returns> public object Clone() { return new SQLiteConnection(this); } /// <summary> /// Creates a database file. This just creates a zero-byte file which SQLite /// will turn into a database when the file is opened properly. /// </summary> /// <param name="databaseFileName">The file to create</param> static public void CreateFile(string databaseFileName) | > > > > > > > > > > > > | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | /// will also be opened. /// </summary> /// <returns></returns> public object Clone() { return new SQLiteConnection(this); } /// <summary> /// Disposes of the SQLiteConnection, closing it if it is active. /// </summary> /// <param name="disposing">True if the connection is being explicitly closed.</param> protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) Close(); } /// <summary> /// Creates a database file. This just creates a zero-byte file which SQLite /// will turn into a database when the file is opened properly. /// </summary> /// <param name="databaseFileName">The file to create</param> static public void CreateFile(string databaseFileName) |
︙ | ︙ | |||
529 530 531 532 533 534 535 | _sql = null; _enlistment = null; } #endif if (_sql != null) { _sql.Close(); | < > | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | _sql = null; _enlistment = null; } #endif if (_sql != null) { _sql.Close(); } _sql = null; _transactionLevel = 0; } OnStateChange(ConnectionState.Closed); } /// <summary> /// Clears the connection pool associated with the connection. Any other active connections using the same database file |
︙ | ︙ | |||
840 841 842 843 844 845 846 | { if (_connectionState != ConnectionState.Closed) throw new InvalidOperationException(); Close(); SortedList<string, string> opts = ParseConnectionString(_connectionString); | < < < | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 | { if (_connectionState != ConnectionState.Closed) throw new InvalidOperationException(); Close(); SortedList<string, string> opts = ParseConnectionString(_connectionString); string fileName; if (Convert.ToInt32(FindKey(opts, "Version", "3"), CultureInfo.InvariantCulture) != 3) throw new NotSupportedException("Only SQLite Version 3 is supported at this time"); fileName = FindKey(opts, "Data Source", ""); |
︙ | ︙ | |||
864 865 866 867 868 869 870 | } if (String.Compare(fileName, ":MEMORY:", StringComparison.OrdinalIgnoreCase) == 0) fileName = ":memory:"; else { #if PLATFORM_COMPACTFRAMEWORK | | < < < < < | | | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 | } if (String.Compare(fileName, ":MEMORY:", StringComparison.OrdinalIgnoreCase) == 0) fileName = ":memory:"; else { #if PLATFORM_COMPACTFRAMEWORK if (fileName.StartsWith(".\\")) fileName = Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().GetName().CodeBase) + fileName.Substring(1); #endif fileName = ExpandFileName(fileName); } try { bool usePooling = (SQLiteConvert.ToBoolean(FindKey(opts, "Pooling", Boolean.FalseString)) == true); int maxPoolSize = Convert.ToInt32(FindKey(opts, "Max Pool Size", "100"), CultureInfo.InvariantCulture); _defaultTimeout = Convert.ToInt32(FindKey(opts, "Default Timeout", "30"), CultureInfo.CurrentCulture); _defaultIsolation = (IsolationLevel)Enum.Parse(typeof(IsolationLevel), FindKey(opts, "Default IsolationLevel", "Serializable"), true); if (_defaultIsolation != IsolationLevel.Serializable && _defaultIsolation != IsolationLevel.ReadCommitted) throw new NotSupportedException("Invalid Default IsolationLevel specified"); //string temp = FindKey(opts, "DateTimeFormat", "ISO8601"); //if (String.Compare(temp, "ticks", StringComparison.OrdinalIgnoreCase) == 0) dateFormat = SQLiteDateFormats.Ticks; //else if (String.Compare(temp, "julianday", StringComparison.OrdinalIgnoreCase) == 0) dateFormat = SQLiteDateFormats.JulianDay; if (_sql == null) { bool bUTF16 = (SQLiteConvert.ToBoolean(FindKey(opts, "UseUTF16Encoding", Boolean.FalseString)) == true); SQLiteDateFormats dateFormat = (SQLiteDateFormats)Enum.Parse(typeof(SQLiteDateFormats), FindKey(opts, "DateTimeFormat", "ISO8601"), true); if (bUTF16) // SQLite automatically sets the encoding of the database to UTF16 if called from sqlite3_open16() _sql = new SQLite3_UTF16(dateFormat); else _sql = new SQLite3(dateFormat); } SQLiteOpenFlagsEnum flags = SQLiteOpenFlagsEnum.None; if (SQLiteConvert.ToBoolean(FindKey(opts, "FailIfMissing", Boolean.FalseString)) == false) flags |= SQLiteOpenFlagsEnum.Create; |
︙ | ︙ | |||
1030 1031 1032 1033 1034 1035 1036 | /// </summary> public int DefaultTimeout { get { return _defaultTimeout; } set { _defaultTimeout = value; } } | < < < < < < < < < < | 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | /// </summary> public int DefaultTimeout { get { return _defaultTimeout; } set { _defaultTimeout = value; } } /// <summary> /// Returns the version of the underlying SQLite database engine /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif public override string ServerVersion |
︙ | ︙ | |||
1093 1094 1095 1096 1097 1098 1099 | if (_sql == null) throw new InvalidOperationException("Database connection not valid for getting number of changes."); return _sql.Changes; } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 | if (_sql == null) throw new InvalidOperationException("Database connection not valid for getting number of changes."); return _sql.Changes; } } /// <summary> /// Returns the version of the underlying SQLite database engine /// </summary> public static string SQLiteVersion { get { return SQLite3.SQLiteVersion; } } /// <summary> /// Returns the state of the connection. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif public override ConnectionState State |
︙ | ︙ | |||
1172 1173 1174 1175 1176 1177 1178 | SortedList<string, string> opts = ParseConnectionString(_connectionString); bool bUTF16 = (SQLiteConvert.ToBoolean(FindKey(opts, "UseUTF16Encoding", Boolean.FalseString)) == true); SQLiteDateFormats dateFormat = (SQLiteDateFormats)Enum.Parse(typeof(SQLiteDateFormats), FindKey(opts, "DateTimeFormat", "ISO8601"), true); | < < < | | | 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | SortedList<string, string> opts = ParseConnectionString(_connectionString); bool bUTF16 = (SQLiteConvert.ToBoolean(FindKey(opts, "UseUTF16Encoding", Boolean.FalseString)) == true); SQLiteDateFormats dateFormat = (SQLiteDateFormats)Enum.Parse(typeof(SQLiteDateFormats), FindKey(opts, "DateTimeFormat", "ISO8601"), true); if (bUTF16) // SQLite automatically sets the encoding of the database to UTF16 if called from sqlite3_open16() _sql = new SQLite3_UTF16(dateFormat); else _sql = new SQLite3(dateFormat); } if (_sql != null) return _sql.Shutdown(); throw new InvalidOperationException("Database connection not active."); } /// Enables or disabled extended result codes returned by SQLite public void SetExtendedResultCodes(bool bOnOff) |
︙ | ︙ | |||
2372 2373 2374 2375 2376 2377 2378 | tbl.Columns.Add("CONSTRAINT_NAME", typeof(string)); tbl.Columns.Add("TABLE_CATALOG", typeof(string)); tbl.Columns.Add("TABLE_SCHEMA", typeof(string)); tbl.Columns.Add("TABLE_NAME", typeof(string)); tbl.Columns.Add("CONSTRAINT_TYPE", typeof(string)); tbl.Columns.Add("IS_DEFERRABLE", typeof(bool)); tbl.Columns.Add("INITIALLY_DEFERRED", typeof(bool)); | < | 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 | tbl.Columns.Add("CONSTRAINT_NAME", typeof(string)); tbl.Columns.Add("TABLE_CATALOG", typeof(string)); tbl.Columns.Add("TABLE_SCHEMA", typeof(string)); tbl.Columns.Add("TABLE_NAME", typeof(string)); tbl.Columns.Add("CONSTRAINT_TYPE", typeof(string)); tbl.Columns.Add("IS_DEFERRABLE", typeof(bool)); tbl.Columns.Add("INITIALLY_DEFERRED", typeof(bool)); tbl.Columns.Add("FKEY_FROM_COLUMN", typeof(string)); tbl.Columns.Add("FKEY_FROM_ORDINAL_POSITION", typeof(int)); tbl.Columns.Add("FKEY_TO_CATALOG", typeof(string)); tbl.Columns.Add("FKEY_TO_SCHEMA", typeof(string)); tbl.Columns.Add("FKEY_TO_TABLE", typeof(string)); tbl.Columns.Add("FKEY_TO_COLUMN", typeof(string)); tbl.Columns.Add("FKEY_ON_UPDATE", typeof(string)); |
︙ | ︙ | |||
2408 2409 2410 2411 2412 2413 2414 | using (SQLiteCommand cmdKey = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].foreign_key_list([{1}])", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rdKey = cmdKey.ExecuteReader()) { while (rdKey.Read()) { row = tbl.NewRow(); row["CONSTRAINT_CATALOG"] = strCatalog; | | < | 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 | using (SQLiteCommand cmdKey = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].foreign_key_list([{1}])", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rdKey = cmdKey.ExecuteReader()) { while (rdKey.Read()) { row = tbl.NewRow(); row["CONSTRAINT_CATALOG"] = strCatalog; row["CONSTRAINT_NAME"] = String.Format(CultureInfo.InvariantCulture, "FK_{0}_{1}", rdTables[2], rdKey.GetInt32(0)); row["TABLE_CATALOG"] = strCatalog; row["TABLE_NAME"] = builder.UnquoteIdentifier(rdTables.GetString(2)); row["CONSTRAINT_TYPE"] = "FOREIGN KEY"; row["IS_DEFERRABLE"] = false; row["INITIALLY_DEFERRED"] = false; row["FKEY_FROM_COLUMN"] = builder.UnquoteIdentifier(rdKey[3].ToString()); row["FKEY_TO_CATALOG"] = strCatalog; row["FKEY_TO_TABLE"] = builder.UnquoteIdentifier(rdKey[2].ToString()); row["FKEY_TO_COLUMN"] = builder.UnquoteIdentifier(rdKey[4].ToString()); row["FKEY_FROM_ORDINAL_POSITION"] = rdKey[1]; row["FKEY_ON_UPDATE"] = (rdKey.FieldCount > 5) ? rdKey[5] : String.Empty; row["FKEY_ON_DELETE"] = (rdKey.FieldCount > 6) ? rdKey[6] : String.Empty; |
︙ | ︙ |
︙ | ︙ | |||
386 387 388 389 390 391 392 | set { this["cache size"] = value; } } /// <summary> | | | | | < | < | < < | < < < | | | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 386 387 388 389 390 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 | set { this["cache size"] = value; } } /// <summary> /// Gets/Sets the datetime format for the connection. /// </summary> [Browsable(true)] [DefaultValue(SQLiteDateFormats.Default)] public SQLiteDateFormats DateTimeFormat { get { object value; TryGetValue("datetimeformat", out value); if (value is string) return (SQLiteDateFormats)TypeDescriptor.GetConverter(typeof(SQLiteDateFormats)).ConvertFrom(value); else return (SQLiteDateFormats)value; } set { this["datetimeformat"] = value; } } /// <summary> /// Determines how SQLite handles the transaction journal file. /// </summary> [Browsable(true)] [DefaultValue(SQLiteJournalModeEnum.Delete)] |
︙ | ︙ | |||
535 536 537 538 539 540 541 | } set { this["foreign keys"] = value; } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | } set { this["foreign keys"] = value; } } /// <summary> /// Helper function for retrieving values from the connectionstring /// </summary> /// <param name="keyword">The keyword to retrieve settings for</param> /// <param name="value">The resulting parameter value</param> /// <returns>Returns true if the value was found and returned</returns> public override bool TryGetValue(string keyword, out object value) |
︙ | ︙ |
︙ | ︙ | |||
17 18 19 20 21 22 23 | /// This base class provides datatype conversion services for the SQLite provider. /// </summary> public abstract class SQLiteConvert { /// <summary> /// The value for the Unix epoch (e.g. January 1, 1970 at midnight, in UTC). /// </summary> | | < < < < < | | | | | < < | < < | < < < < < < < < | | < | < < < < < < | < | 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 | /// This base class provides datatype conversion services for the SQLite provider. /// </summary> public abstract class SQLiteConvert { /// <summary> /// The value for the Unix epoch (e.g. January 1, 1970 at midnight, in UTC). /// </summary> private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); /// <summary> /// The format string for DateTime values when using the InvariantCulture or CurrentCulture formats. /// </summary> private const string FullFormat = "yyyy-MM-ddTHH:mm:ss.fffffffK"; /// <summary> /// An array of ISO8601 datetime formats we support conversion from /// </summary> private static string[] _datetimeFormats = new string[] { "THHmmss", "THHmm", "HH:mm:ss", "HH:mm", "HH:mm:ss.FFFFFFF", "yy-MM-dd", "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss.FFFFFFF", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-ddTHH:mm:ss.FFFFFFF", "yyyy-MM-ddTHH:mm", "yyyy-MM-ddTHH:mm:ss", "yyyyMMddHHmmss", "yyyyMMddHHmm", "yyyyMMddTHHmmssFFFFFFF", "yyyyMMdd" }; /// <summary> /// An UTF-8 Encoding instance, so we can convert strings to and from UTF-8 /// </summary> private static Encoding _utf8 = new UTF8Encoding(); /// <summary> /// The default DateTime format for this instance /// </summary> internal SQLiteDateFormats _datetimeFormat; /// <summary> /// Initializes the conversion class /// </summary> /// <param name="fmt">The default date/time format to use for this instance</param> internal SQLiteConvert(SQLiteDateFormats fmt) { _datetimeFormat = fmt; } #region UTF-8 Conversion Functions /// <summary> /// Converts a string to a UTF-8 encoded byte array sized to include a null-terminating character. /// </summary> /// <param name="sourceText">The string to convert to UTF-8</param> |
︙ | ︙ | |||
166 167 168 169 170 171 172 | #region DateTime Conversion Functions /// <summary> /// Converts a string into a DateTime, using the current DateTimeFormat specified for the connection when it was opened. /// </summary> /// <remarks> /// Acceptable ISO8601 DateTime formats are: | < < < < < < < | < < < < | < | < < < < < < | < < < < < < < | | | | < | < | < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < | < < | < < | < < | < < | < < < < < | < < | < < < < < | < < < | < < < < | < < < < < < < < < < < < | < | | | 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 | #region DateTime Conversion Functions /// <summary> /// Converts a string into a DateTime, using the current DateTimeFormat specified for the connection when it was opened. /// </summary> /// <remarks> /// Acceptable ISO8601 DateTime formats are: /// yyyy-MM-dd HH:mm:ss /// yyyyMMddHHmmss /// yyyyMMddTHHmmssfffffff /// yyyy-MM-dd /// yy-MM-dd /// yyyyMMdd /// HH:mm:ss /// THHmmss /// </remarks> /// <param name="dateText">The string containing either a long integer number of 100-nanosecond units since /// System.DateTime.MinValue, a Julian day double, an integer number of seconds since the Unix epoch, a /// culture-independent formatted date and time string, a formatted date and time string in the current /// culture, or an ISO8601-format string.</param> /// <returns>A DateTime value</returns> public DateTime ToDateTime(string dateText) { switch (_datetimeFormat) { case SQLiteDateFormats.Ticks: return new DateTime(Convert.ToInt64(dateText, CultureInfo.InvariantCulture)); case SQLiteDateFormats.JulianDay: return ToDateTime(Convert.ToDouble(dateText, CultureInfo.InvariantCulture)); case SQLiteDateFormats.UnixEpoch: return UnixEpoch.AddSeconds(Convert.ToInt32(dateText, CultureInfo.InvariantCulture)); case SQLiteDateFormats.InvariantCulture: return DateTime.Parse(dateText, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None); case SQLiteDateFormats.CurrentCulture: return DateTime.Parse(dateText, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None); default: return DateTime.ParseExact(dateText, _datetimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None); } } /// <summary> /// Converts a julianday value into a DateTime /// </summary> /// <param name="julianDay">The value to convert</param> /// <returns>A .NET DateTime</returns> public DateTime ToDateTime(double julianDay) { return DateTime.FromOADate(julianDay - 2415018.5); } /// <summary> /// Converts a DateTime struct to a JulianDay double /// </summary> /// <param name="value">The DateTime to convert</param> /// <returns>The JulianDay value the Datetime represents</returns> public double ToJulianDay(DateTime value) { return value.ToOADate() + 2415018.5; } /// <summary> /// Converts a DateTime to a string value, using the current DateTimeFormat specified for the connection when it was opened. /// </summary> /// <param name="dateValue">The DateTime value to convert</param> /// <returns>Either a string containing the long integer number of 100-nanosecond units since System.DateTime.MinValue, a |
︙ | ︙ | |||
363 364 365 366 367 368 369 | case SQLiteDateFormats.UnixEpoch: return ((long)(dateValue.Subtract(UnixEpoch).Ticks / TimeSpan.TicksPerSecond)).ToString(); case SQLiteDateFormats.InvariantCulture: return dateValue.ToString(FullFormat, CultureInfo.InvariantCulture); case SQLiteDateFormats.CurrentCulture: return dateValue.ToString(FullFormat, CultureInfo.CurrentCulture); default: | < < | | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | case SQLiteDateFormats.UnixEpoch: return ((long)(dateValue.Subtract(UnixEpoch).Ticks / TimeSpan.TicksPerSecond)).ToString(); case SQLiteDateFormats.InvariantCulture: return dateValue.ToString(FullFormat, CultureInfo.InvariantCulture); case SQLiteDateFormats.CurrentCulture: return dateValue.ToString(FullFormat, CultureInfo.CurrentCulture); default: return dateValue.ToString(_datetimeFormats[7], CultureInfo.InvariantCulture); } } /// <summary> /// Internal function to convert a UTF-8 encoded IntPtr of the specified length to a DateTime. /// </summary> /// <remarks> |
︙ | ︙ | |||
798 799 800 801 802 803 804 | /// </summary> /// <param name="Name">The name of the type to match</param> /// <returns>The .NET DBType the text evaluates to.</returns> internal static DbType TypeNameToDbType(string Name) { if (String.IsNullOrEmpty(Name)) return DbType.Object; | < < | | | < | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | | | | | < | | | | | | | | | | | | | < | 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 | /// </summary> /// <param name="Name">The name of the type to match</param> /// <returns>The .NET DBType the text evaluates to.</returns> internal static DbType TypeNameToDbType(string Name) { if (String.IsNullOrEmpty(Name)) return DbType.Object; if (_typeNames == null) { _typeNames = new Dictionary<string, SQLiteTypeNames>(new TypeNameStringComparer()); foreach (SQLiteTypeNames typeName in new SQLiteTypeNames[] { new SQLiteTypeNames("COUNTER", DbType.Int64), new SQLiteTypeNames("AUTOINCREMENT", DbType.Int64), new SQLiteTypeNames("IDENTITY", DbType.Int64), new SQLiteTypeNames("LONGTEXT", DbType.String), new SQLiteTypeNames("LONGCHAR", DbType.String), new SQLiteTypeNames("LONGVARCHAR", DbType.String), new SQLiteTypeNames("LONG", DbType.Int64), new SQLiteTypeNames("TINYINT", DbType.Byte), new SQLiteTypeNames("INTEGER", DbType.Int64), new SQLiteTypeNames("INT", DbType.Int32), new SQLiteTypeNames("VARCHAR", DbType.String), new SQLiteTypeNames("NVARCHAR", DbType.String), new SQLiteTypeNames("CHAR", DbType.String), new SQLiteTypeNames("NCHAR", DbType.String), new SQLiteTypeNames("TEXT", DbType.String), new SQLiteTypeNames("NTEXT", DbType.String), new SQLiteTypeNames("STRING", DbType.String), new SQLiteTypeNames("DOUBLE", DbType.Double), new SQLiteTypeNames("FLOAT", DbType.Double), new SQLiteTypeNames("REAL", DbType.Double), new SQLiteTypeNames("BIT", DbType.Boolean), new SQLiteTypeNames("YESNO", DbType.Boolean), new SQLiteTypeNames("LOGICAL", DbType.Boolean), new SQLiteTypeNames("BOOL", DbType.Boolean), new SQLiteTypeNames("NUMERIC", DbType.Decimal), new SQLiteTypeNames("DECIMAL", DbType.Decimal), new SQLiteTypeNames("MONEY", DbType.Decimal), new SQLiteTypeNames("CURRENCY", DbType.Decimal), new SQLiteTypeNames("TIME", DbType.DateTime), new SQLiteTypeNames("DATE", DbType.DateTime), new SQLiteTypeNames("DATETIME", DbType.DateTime), new SQLiteTypeNames("SMALLDATE", DbType.DateTime), new SQLiteTypeNames("BLOB", DbType.Binary), new SQLiteTypeNames("BINARY", DbType.Binary), new SQLiteTypeNames("VARBINARY", DbType.Binary), new SQLiteTypeNames("IMAGE", DbType.Binary), new SQLiteTypeNames("GENERAL", DbType.Binary), new SQLiteTypeNames("OLEOBJECT", DbType.Binary), new SQLiteTypeNames("GUID", DbType.Guid), new SQLiteTypeNames("UNIQUEIDENTIFIER", DbType.Guid), new SQLiteTypeNames("MEMO", DbType.String), new SQLiteTypeNames("NOTE", DbType.String), new SQLiteTypeNames("SMALLINT", DbType.Int16), new SQLiteTypeNames("BIGINT", DbType.Int64) }) { _typeNames.Add(typeName.typeName, typeName); } } SQLiteTypeNames value; if (_typeNames.TryGetValue(Name, out value)) { return value.dataType; |
︙ | ︙ | |||
880 881 882 883 884 885 886 | } } return DbType.Object; } #endregion | < | 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | } } return DbType.Object; } #endregion private static Dictionary<string, SQLiteTypeNames> _typeNames = null; } /// <summary> /// SQLite has very limited types, and is inherently text-based. The first 5 types below represent the sum of all types SQLite /// understands. The DateTime extension to the spec is for internal use only. /// </summary> |
︙ | ︙ |
︙ | ︙ | |||
60 61 62 63 64 65 66 | /// <param name="connectionString">A connection string suitable for passing to a new SQLiteConnection, which is associated with the select command.</param> public SQLiteDataAdapter(string commandText, string connectionString) { SQLiteConnection cnn = new SQLiteConnection(connectionString); SelectCommand = new SQLiteCommand(commandText, cnn); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 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 | /// <param name="connectionString">A connection string suitable for passing to a new SQLiteConnection, which is associated with the select command.</param> public SQLiteDataAdapter(string commandText, string connectionString) { SQLiteConnection cnn = new SQLiteConnection(connectionString); SelectCommand = new SQLiteCommand(commandText, cnn); } /// <summary> /// Row updating event handler /// </summary> public event EventHandler<RowUpdatingEventArgs> RowUpdating { add { #if !PLATFORM_COMPACTFRAMEWORK EventHandler<RowUpdatingEventArgs> previous = (EventHandler<RowUpdatingEventArgs>)base.Events[_updatingEventPH]; if ((previous != null) && (value.Target is DbCommandBuilder)) { EventHandler<RowUpdatingEventArgs> handler = (EventHandler<RowUpdatingEventArgs>)FindBuilder(previous); if (handler != null) { base.Events.RemoveHandler(_updatingEventPH, handler); } } #endif base.Events.AddHandler(_updatingEventPH, value); } remove { base.Events.RemoveHandler(_updatingEventPH, value); } } #if !PLATFORM_COMPACTFRAMEWORK internal static Delegate FindBuilder(MulticastDelegate mcd) { if (mcd != null) { |
︙ | ︙ | |||
151 152 153 154 155 156 157 | #endif /// <summary> /// Row updated event handler /// </summary> public event EventHandler<RowUpdatedEventArgs> RowUpdated { | | | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | #endif /// <summary> /// Row updated event handler /// </summary> public event EventHandler<RowUpdatedEventArgs> RowUpdated { add { base.Events.AddHandler(_updatedEventPH, value); } remove { base.Events.RemoveHandler(_updatedEventPH, value); } } /// <summary> /// Raised by the underlying DbDataAdapter when a row is being updated /// </summary> /// <param name="value">The event's specifics</param> protected override void OnRowUpdating(RowUpdatingEventArgs value) |
︙ | ︙ | |||
187 188 189 190 191 192 193 | /// Gets/sets the select command for this DataAdapter /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((string)null), Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public new SQLiteCommand SelectCommand { | | | | | | | | | | 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 | /// Gets/sets the select command for this DataAdapter /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((string)null), Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public new SQLiteCommand SelectCommand { get { return (SQLiteCommand)base.SelectCommand; } set { base.SelectCommand = value; } } /// <summary> /// Gets/sets the insert command for this DataAdapter /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((string)null), Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public new SQLiteCommand InsertCommand { get { return (SQLiteCommand)base.InsertCommand; } set { base.InsertCommand = value; } } /// <summary> /// Gets/sets the update command for this DataAdapter /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((string)null), Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public new SQLiteCommand UpdateCommand { get { return (SQLiteCommand)base.UpdateCommand; } set { base.UpdateCommand = value; } } /// <summary> /// Gets/sets the delete command for this DataAdapter /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [DefaultValue((string)null), Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #endif public new SQLiteCommand DeleteCommand { get { return (SQLiteCommand)base.DeleteCommand; } set { base.DeleteCommand = value; } } } } |
1 2 3 4 5 6 7 8 9 10 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data; using System.Data.Common; using System.Globalization; /// <summary> /// SQLite implementation of DbDataReader. /// </summary> |
︙ | ︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 | internal bool _disposeCommand; /// <summary> /// If set, then raise an exception when the object is accessed after being disposed. /// </summary> internal bool _throwOnDisposed; /// <summary> /// An array of rowid's for the active statement if CommandBehavior.KeyInfo is specified /// </summary> private SQLiteKeyReader _keyInfo; | > > > > > < < < | < < < < < < < < < | < < < < < < | < < < < < < < < < < < < < < < < < | | | | > | < | < < < | < < < < < < < < < < < | 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 | internal bool _disposeCommand; /// <summary> /// If set, then raise an exception when the object is accessed after being disposed. /// </summary> internal bool _throwOnDisposed; /// <summary> /// If set, then the object is currently being disposed. /// </summary> internal bool _disposing; /// <summary> /// An array of rowid's for the active statement if CommandBehavior.KeyInfo is specified /// </summary> private SQLiteKeyReader _keyInfo; internal long _version; // Matches the version of the connection /// <summary> /// Internal constructor, initializes the datareader and sets up to begin executing statements /// </summary> /// <param name="cmd">The SQLiteCommand this data reader is for</param> /// <param name="behave">The expected behavior of the data reader</param> internal SQLiteDataReader(SQLiteCommand cmd, CommandBehavior behave) { _throwOnDisposed = true; _command = cmd; _version = _command.Connection._version; _commandBehavior = behave; _activeStatementIndex = -1; _rowsAffected = -1; if (_command != null) NextResult(); } internal void Cancel() { _version = 0; } /// <summary> /// Dispose of all resources used by this datareader. /// </summary> /// <param name="disposing"></param> protected override void Dispose(bool disposing) { // // NOTE: Fix for ticket [e1b2e0f769], do NOT throw exceptions while we // are being disposed. // _disposing = true; _throwOnDisposed = false; base.Dispose(disposing); } /// <summary> /// Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified. /// </summary> public override void Close() { try { if (_command != null) { try { try |
︙ | ︙ | |||
247 248 249 250 251 252 253 | /// <summary> /// Enumerator support /// </summary> /// <returns>Returns a DbEnumerator object.</returns> public override Collections.IEnumerator GetEnumerator() { | < < < < < | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | /// <summary> /// Enumerator support /// </summary> /// <returns>Returns a DbEnumerator object.</returns> public override Collections.IEnumerator GetEnumerator() { return new DbEnumerator(this, ((_commandBehavior & CommandBehavior.CloseConnection) == CommandBehavior.CloseConnection)); } /// <summary> /// Not implemented. Returns 0 /// </summary> public override int Depth { get { CheckClosed(); return 0; } } /// <summary> /// Returns the number of columns in the current resultset /// </summary> public override int FieldCount { get { CheckClosed(); if (_keyInfo == null) return _fieldCount; return _fieldCount + _keyInfo.Count; } } /// <summary> /// Returns the number of visible fielsd in the current resultset /// </summary> public override int VisibleFieldCount { get { CheckClosed(); return _fieldCount; } } /// <summary> /// SQLite is inherently un-typed. All datatypes in SQLite are natively strings. The definition of the columns of a table |
︙ | ︙ | |||
311 312 313 314 315 316 317 | /// </returns> /// <param name="i">The index of the column to type-check</param> /// <param name="typ">The type we want to get out of the column</param> private TypeAffinity VerifyType(int i, DbType typ) { CheckClosed(); CheckValidRow(); | < | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | /// </returns> /// <param name="i">The index of the column to type-check</param> /// <param name="typ">The type we want to get out of the column</param> private TypeAffinity VerifyType(int i, DbType typ) { CheckClosed(); CheckValidRow(); TypeAffinity affinity = GetSQLiteType(i).Affinity; switch (affinity) { case TypeAffinity.Int64: if (typ == DbType.Int16) return affinity; if (typ == DbType.Int32) return affinity; |
︙ | ︙ | |||
358 359 360 361 362 363 364 | /// <summary> /// Retrieves the column as a boolean value /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>bool</returns> public override bool GetBoolean(int i) { | < < < < | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | /// <summary> /// Retrieves the column as a boolean value /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>bool</returns> public override bool GetBoolean(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetBoolean(i - VisibleFieldCount); VerifyType(i, DbType.Boolean); return Convert.ToBoolean(GetValue(i), CultureInfo.CurrentCulture); } /// <summary> /// Retrieves the column as a single byte value /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>byte</returns> public override byte GetByte(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetByte(i - VisibleFieldCount); VerifyType(i, DbType.Byte); return Convert.ToByte(_activeStatement._sql.GetInt32(_activeStatement, i)); } |
︙ | ︙ | |||
397 398 399 400 401 402 403 | /// <param name="length">The number of bytes to retrieve</param> /// <returns>The actual number of bytes written into the array</returns> /// <remarks> /// To determine the number of bytes in the column, pass a null value for the buffer. The total length will be returned. /// </remarks> public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) { | < < < < | 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 367 368 369 | /// <param name="length">The number of bytes to retrieve</param> /// <returns>The actual number of bytes written into the array</returns> /// <remarks> /// To determine the number of bytes in the column, pass a null value for the buffer. The total length will be returned. /// </remarks> public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetBytes(i - VisibleFieldCount, fieldOffset, buffer, bufferoffset, length); VerifyType(i, DbType.Binary); return _activeStatement._sql.GetBytes(_activeStatement, i, (int)fieldOffset, buffer, bufferoffset, length); } /// <summary> /// Returns the column as a single character /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>char</returns> public override char GetChar(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetChar(i - VisibleFieldCount); VerifyType(i, DbType.SByte); return Convert.ToChar(_activeStatement._sql.GetInt32(_activeStatement, i)); } |
︙ | ︙ | |||
436 437 438 439 440 441 442 | /// <param name="length">The number of bytes to retrieve</param> /// <returns>The actual number of characters written into the array</returns> /// <remarks> /// To determine the number of characters in the column, pass a null value for the buffer. The total length will be returned. /// </remarks> public override long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { | < < < < < < < < < < < < < < < < | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 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 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | /// <param name="length">The number of bytes to retrieve</param> /// <returns>The actual number of characters written into the array</returns> /// <remarks> /// To determine the number of characters in the column, pass a null value for the buffer. The total length will be returned. /// </remarks> public override long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetChars(i - VisibleFieldCount, fieldoffset, buffer, bufferoffset, length); VerifyType(i, DbType.String); return _activeStatement._sql.GetChars(_activeStatement, i, (int)fieldoffset, buffer, bufferoffset, length); } /// <summary> /// Retrieves the name of the back-end datatype of the column /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>string</returns> public override string GetDataTypeName(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetDataTypeName(i - VisibleFieldCount); SQLiteType typ = GetSQLiteType(i); if (typ.Type == DbType.Object) return SQLiteConvert.SQLiteTypeToType(typ).Name; return _activeStatement._sql.ColumnType(_activeStatement, i, out typ.Affinity); } /// <summary> /// Retrieve the column as a date/time value /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>DateTime</returns> public override DateTime GetDateTime(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetDateTime(i - VisibleFieldCount); VerifyType(i, DbType.DateTime); return _activeStatement._sql.GetDateTime(_activeStatement, i); } /// <summary> /// Retrieve the column as a decimal value /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>decimal</returns> public override decimal GetDecimal(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetDecimal(i - VisibleFieldCount); VerifyType(i, DbType.Decimal); return Decimal.Parse(_activeStatement._sql.GetText(_activeStatement, i), NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture); } /// <summary> /// Returns the column as a double /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>double</returns> public override double GetDouble(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetDouble(i - VisibleFieldCount); VerifyType(i, DbType.Double); return _activeStatement._sql.GetDouble(_activeStatement, i); } /// <summary> /// Returns the .NET type of a given column /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Type</returns> public override Type GetFieldType(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetFieldType(i - VisibleFieldCount); return SQLiteConvert.SQLiteTypeToType(GetSQLiteType(i)); } /// <summary> /// Returns a column as a float value /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>float</returns> public override float GetFloat(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetFloat(i - VisibleFieldCount); VerifyType(i, DbType.Single); return Convert.ToSingle(_activeStatement._sql.GetDouble(_activeStatement, i)); } /// <summary> /// Returns the column as a Guid /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Guid</returns> public override Guid GetGuid(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetGuid(i - VisibleFieldCount); TypeAffinity affinity = VerifyType(i, DbType.Guid); if (affinity == TypeAffinity.Blob) { byte[] buffer = new byte[16]; |
︙ | ︙ | |||
571 572 573 574 575 576 577 | /// <summary> /// Returns the column as a short /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Int16</returns> public override Int16 GetInt16(int i) { | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | /// <summary> /// Returns the column as a short /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Int16</returns> public override Int16 GetInt16(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetInt16(i - VisibleFieldCount); VerifyType(i, DbType.Int16); return Convert.ToInt16(_activeStatement._sql.GetInt32(_activeStatement, i)); } /// <summary> /// Retrieves the column as an int /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Int32</returns> public override Int32 GetInt32(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetInt32(i - VisibleFieldCount); VerifyType(i, DbType.Int32); return _activeStatement._sql.GetInt32(_activeStatement, i); } /// <summary> /// Retrieves the column as a long /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Int64</returns> public override Int64 GetInt64(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetInt64(i - VisibleFieldCount); VerifyType(i, DbType.Int64); return _activeStatement._sql.GetInt64(_activeStatement, i); } /// <summary> /// Retrieves the name of the column /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>string</returns> public override string GetName(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetName(i - VisibleFieldCount); return _activeStatement._sql.ColumnName(_activeStatement, i); } /// <summary> /// Retrieves the i of a column, given its name /// </summary> /// <param name="name">The name of the column to retrieve</param> /// <returns>The int i of the column</returns> public override int GetOrdinal(string name) { CheckClosed(); int r = _activeStatement._sql.ColumnIndex(_activeStatement, name); if (r == -1 && _keyInfo != null) { r = _keyInfo.GetOrdinal(name); if (r > -1) r += VisibleFieldCount; } return r; } /// <summary> /// Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done /// to gather the necessary information so it can be represented in an ADO.NET manner. /// </summary> /// <returns>Returns a DataTable containing the schema information for the active SELECT statement being processed.</returns> public override DataTable GetSchemaTable() { return GetSchemaTable(true, false); } internal DataTable GetSchemaTable(bool wantUniqueInfo, bool wantDefaultValue) { CheckClosed(); DataTable tbl = new DataTable("SchemaTable"); DataTable tblIndexes = null; DataTable tblIndexColumns; DataRow row; string temp; string strCatalog = ""; string strTable = ""; |
︙ | ︙ | |||
850 851 852 853 854 855 856 | row[SchemaTableOptionalColumn.IsReadOnly] = false; row[SchemaTableOptionalColumn.IsRowVersion] = false; row[SchemaTableColumn.IsUnique] = false; row[SchemaTableColumn.IsKey] = false; row[SchemaTableOptionalColumn.IsAutoIncrement] = false; row[SchemaTableColumn.DataType] = GetFieldType(n); row[SchemaTableOptionalColumn.IsHidden] = false; | < | | | | 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 | row[SchemaTableOptionalColumn.IsReadOnly] = false; row[SchemaTableOptionalColumn.IsRowVersion] = false; row[SchemaTableColumn.IsUnique] = false; row[SchemaTableColumn.IsKey] = false; row[SchemaTableOptionalColumn.IsAutoIncrement] = false; row[SchemaTableColumn.DataType] = GetFieldType(n); row[SchemaTableOptionalColumn.IsHidden] = false; strColumn = _command.Connection._sql.ColumnOriginalName(_activeStatement, n); if (String.IsNullOrEmpty(strColumn) == false) row[SchemaTableColumn.BaseColumnName] = strColumn; row[SchemaTableColumn.IsExpression] = String.IsNullOrEmpty(strColumn); row[SchemaTableColumn.IsAliased] = (String.Compare(GetName(n), strColumn, StringComparison.OrdinalIgnoreCase) != 0); temp = _command.Connection._sql.ColumnTableName(_activeStatement, n); if (String.IsNullOrEmpty(temp) == false) row[SchemaTableColumn.BaseTableName] = temp; temp = _command.Connection._sql.ColumnDatabaseName(_activeStatement, n); if (String.IsNullOrEmpty(temp) == false) row[SchemaTableOptionalColumn.BaseCatalogName] = temp; string dataType = null; // If we have a table-bound column, extract the extra information from it if (String.IsNullOrEmpty(strColumn) == false) { string collSeq; |
︙ | ︙ | |||
961 962 963 964 965 966 967 | (string)rowIndexes["INDEX_NAME"], null }); foreach (DataRow rowColumnIndex in tblIndexColumns.Rows) { if (String.Compare((string)rowColumnIndex["COLUMN_NAME"], strColumn, StringComparison.OrdinalIgnoreCase) == 0) { | < < < < < < | | 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | (string)rowIndexes["INDEX_NAME"], null }); foreach (DataRow rowColumnIndex in tblIndexColumns.Rows) { if (String.Compare((string)rowColumnIndex["COLUMN_NAME"], strColumn, StringComparison.OrdinalIgnoreCase) == 0) { if (tblIndexColumns.Rows.Count == 1 && (bool)row[SchemaTableColumn.AllowDBNull] == false) row[SchemaTableColumn.IsUnique] = rowIndexes["UNIQUE"]; // If its an integer primary key and the only primary key in the table, then its a rowid alias and is autoincrement // NOTE: Currently commented out because this is not always the desired behavior. For example, a 1:1 relationship with // another table, where the other table is autoincrement, but this one is not, and uses the rowid from the other. // It is safer to only set Autoincrement on tables where we're SURE the user specified AUTOINCREMENT, even if its a rowid column. |
︙ | ︙ | |||
1015 1016 1017 1018 1019 1020 1021 | /// <summary> /// Retrieves the column as a string /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>string</returns> public override string GetString(int i) { | < < < < < < < | < < < | 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 | /// <summary> /// Retrieves the column as a string /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>string</returns> public override string GetString(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetString(i - VisibleFieldCount); VerifyType(i, DbType.String); return _activeStatement._sql.GetText(_activeStatement, i); } /// <summary> /// Retrieves the column as an object corresponding to the underlying datatype of the column /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>object</returns> public override object GetValue(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.GetValue(i - VisibleFieldCount); SQLiteType typ = GetSQLiteType(i); return _activeStatement._sql.GetValue(_activeStatement, i, typ); } /// <summary> /// Retreives the values of multiple columns, up to the size of the supplied array /// </summary> /// <param name="values">The array to fill with values from the columns in the current resultset</param> /// <returns>The number of columns retrieved</returns> public override int GetValues(object[] values) { int nMax = FieldCount; if (values.Length < nMax) nMax = values.Length; for (int n = 0; n < nMax; n++) { values[n] = GetValue(n); } return nMax; } /// <summary> /// Returns True if the resultset has rows that can be fetched /// </summary> public override bool HasRows { get { CheckClosed(); return (_readingState != 1); } } /// <summary> /// Returns True if the data reader is closed /// </summary> public override bool IsClosed { get { return (_command == null); } } /// <summary> /// Returns True if the specified column is null /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>True or False</returns> public override bool IsDBNull(int i) { if (i >= VisibleFieldCount && _keyInfo != null) return _keyInfo.IsDBNull(i - VisibleFieldCount); return _activeStatement._sql.IsNull(_activeStatement, i); } /// <summary> /// Moves to the next resultset in multiple row-returning SQL command. /// </summary> /// <returns>True if the command was successful and a new resultset is available, False otherwise.</returns> public override bool NextResult() { CheckClosed(); SQLiteStatement stmt = null; int fieldCount; while (true) { |
︙ | ︙ | |||
1219 1220 1221 1222 1223 1224 1225 | /// <summary> /// Reads the next row from the resultset /// </summary> /// <returns>True if a new row was successfully loaded and is ready for processing</returns> public override bool Read() { | < | 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | /// <summary> /// Reads the next row from the resultset /// </summary> /// <returns>True if a new row was successfully loaded and is ready for processing</returns> public override bool Read() { CheckClosed(); if (_readingState == -1) // First step was already done at the NextResult() level, so don't step again, just return true. { _readingState = 0; return true; } |
︙ | ︙ | |||
1252 1253 1254 1255 1256 1257 1258 | } /// <summary> /// Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed! /// </summary> public override int RecordsAffected { | | | | | 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 | } /// <summary> /// Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed! /// </summary> public override int RecordsAffected { get { return (_rowsAffected < 0) ? 0 : _rowsAffected; } } /// <summary> /// Indexer to retrieve data from a column given its name /// </summary> /// <param name="name">The name of the column to retrieve data for</param> /// <returns>The value contained in the column</returns> public override object this[string name] { get { return GetValue(GetOrdinal(name)); } } /// <summary> /// Indexer to retrieve data from a column given its i /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>The value contained in the column</returns> public override object this[int i] { get { return GetValue(i); } } private void LoadKeyInfo() { if (_keyInfo != null) _keyInfo.Dispose(); _keyInfo = new SQLiteKeyReader(_command.Connection, this, _activeStatement); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ #if !PLATFORM_COMPACTFRAMEWORK namespace System.Data.SQLite { using System.Transactions; | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ #if !PLATFORM_COMPACTFRAMEWORK namespace System.Data.SQLite { using System.Transactions; internal class SQLiteEnlistment : IEnlistmentNotification { internal SQLiteTransaction _transaction; internal Transaction _scope; internal bool _disposeConnection; internal SQLiteEnlistment(SQLiteConnection cnn, Transaction scope) { _transaction = cnn.BeginTransaction(); _scope = scope; _scope.EnlistVolatile(this, System.Transactions.EnlistmentOptions.None); } private void Cleanup(SQLiteConnection cnn) { if (_disposeConnection) cnn.Dispose(); _transaction = null; _scope = null; } #region IEnlistmentNotification Members public void Commit(Enlistment enlistment) { SQLiteConnection cnn = _transaction.Connection; cnn._enlistment = null; try { _transaction.IsValid(true); _transaction.Connection._transactionLevel = 1; _transaction.Commit(); enlistment.Done(); } finally { Cleanup(cnn); } } public void InDoubt(Enlistment enlistment) { enlistment.Done(); } public void Prepare(PreparingEnlistment preparingEnlistment) { if (_transaction.IsValid(false) == false) preparingEnlistment.ForceRollback(); else preparingEnlistment.Prepared(); } public void Rollback(Enlistment enlistment) { SQLiteConnection cnn = _transaction.Connection; cnn._enlistment = null; try { _transaction.Rollback(); enlistment.Done(); |
︙ | ︙ |
︙ | ︙ | |||
10 11 12 13 14 15 16 | using System; using System.Data.Common; #if !PLATFORM_COMPACTFRAMEWORK /// <summary> /// SQLite implementation of DbProviderFactory. /// </summary> | | > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 10 11 12 13 14 15 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 | using System; using System.Data.Common; #if !PLATFORM_COMPACTFRAMEWORK /// <summary> /// SQLite implementation of DbProviderFactory. /// </summary> public sealed partial class SQLiteFactory : DbProviderFactory { /// <summary> /// This event is raised whenever SQLite raises a logging event. /// Note that this should be set as one of the first things in the /// application. This event is provided for backward compatibility only. /// New code should use the SQLiteLog class instead. /// </summary> public event SQLiteLogEventHandler Log { add { SQLiteLog.Log += value; } remove { SQLiteLog.Log -= value; } } /// <overloads> /// Constructs a new SQLiteFactory object /// </overloads> /// <summary> /// Default constructor /// </summary> public SQLiteFactory() { // // NOTE: Do nothing here now. All the logging setup related code has // been moved to the new SQLiteLog static class. // } /// <summary> /// Static instance member which returns an instanced SQLiteFactory class. /// </summary> public static readonly SQLiteFactory Instance = new SQLiteFactory(); /// <summary> /// Returns a new SQLiteCommand object. /// </summary> /// <returns>A SQLiteCommand object.</returns> public override DbCommand CreateCommand() { return new SQLiteCommand(); } /// <summary> /// Returns a new SQLiteCommandBuilder object. /// </summary> /// <returns>A SQLiteCommandBuilder object.</returns> public override DbCommandBuilder CreateCommandBuilder() { return new SQLiteCommandBuilder(); } /// <summary> /// Creates a new SQLiteConnection. /// </summary> /// <returns>A SQLiteConnection object.</returns> public override DbConnection CreateConnection() { return new SQLiteConnection(); } /// <summary> /// Creates a new SQLiteConnectionStringBuilder. /// </summary> /// <returns>A SQLiteConnectionStringBuilder object.</returns> public override DbConnectionStringBuilder CreateConnectionStringBuilder() { return new SQLiteConnectionStringBuilder(); } /// <summary> /// Creates a new SQLiteDataAdapter. /// </summary> /// <returns>A SQLiteDataAdapter object.</returns> public override DbDataAdapter CreateDataAdapter() { return new SQLiteDataAdapter(); } /// <summary> /// Creates a new SQLiteParameter. /// </summary> /// <returns>A SQLiteParameter object.</returns> public override DbParameter CreateParameter() { return new SQLiteParameter(); } } #endif } |
︙ | ︙ | |||
79 80 81 82 83 84 85 | /// Internal constructor, initializes the function's internal variables. /// </summary> protected SQLiteFunction() { _contextDataList = new Dictionary<long, AggregateData>(); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | /// Internal constructor, initializes the function's internal variables. /// </summary> protected SQLiteFunction() { _contextDataList = new Dictionary<long, AggregateData>(); } /// <summary> /// Returns a reference to the underlying connection's SQLiteConvert class, which can be used to convert /// strings and DateTime's into the current connection's encoding schema. /// </summary> public SQLiteConvert SQLiteConvert { get { return _base; } } /// <summary> /// Scalar functions override this method to do their magic. /// </summary> /// <remarks> /// Parameters passed to functions have only an affinity for a certain data type, there is no underlying schema available /// to force them into a certain type. Therefore the only types you will ever see as parameters are /// DBNull.Value, Int64, Double, String or byte[] array. /// </remarks> /// <param name="args">The arguments for the command to process</param> /// <returns>You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or /// you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error, /// just return it!</returns> public virtual object Invoke(object[] args) { return null; } /// <summary> /// Aggregate functions override this method to do their magic. /// </summary> /// <remarks> /// Typically you'll be updating whatever you've placed in the contextData field and returning as quickly as possible. /// </remarks> /// <param name="args">The arguments for the command to process</param> /// <param name="stepNumber">The 1-based step number. This is incrememted each time the step method is called.</param> /// <param name="contextData">A placeholder for implementers to store contextual data pertaining to the current context.</param> public virtual void Step(object[] args, int stepNumber, ref object contextData) { } /// <summary> /// Aggregate functions override this method to finish their aggregate processing. /// </summary> /// <remarks> /// If you implemented your aggregate function properly, /// you've been recording and keeping track of your data in the contextData object provided, and now at this stage you should have /// all the information you need in there to figure out what to return. /// NOTE: It is possible to arrive here without receiving a previous call to Step(), in which case the contextData will /// be null. This can happen when no rows were returned. You can either return null, or 0 or some other custom return value /// if that is the case. /// </remarks> /// <param name="contextData">Your own assigned contextData, provided for you so you can return your final results.</param> /// <returns>You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or /// you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error, /// just return it! /// </returns> public virtual object Final(object contextData) { return null; } /// <summary> /// User-defined collation sequences override this method to provide a custom string sorting algorithm. /// </summary> /// <param name="param1">The first string to compare</param> /// <param name="param2">The second strnig to compare</param> /// <returns>1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2</returns> public virtual int Compare(string param1, string param2) { return 0; } /// <summary> /// Converts an IntPtr array of context arguments to an object array containing the resolved parameters the pointers point to. /// </summary> /// <remarks> |
︙ | ︙ | |||
299 300 301 302 303 304 305 | } /// <summary> /// Takes the return value from Invoke() and Final() and figures out how to return it to SQLite's context. /// </summary> /// <param name="context">The context the return value applies to</param> /// <param name="returnValue">The parameter to return to SQLite</param> | | | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | } /// <summary> /// Takes the return value from Invoke() and Final() and figures out how to return it to SQLite's context. /// </summary> /// <param name="context">The context the return value applies to</param> /// <param name="returnValue">The parameter to return to SQLite</param> void SetReturnValue(IntPtr context, object returnValue) { if (returnValue == null || returnValue == DBNull.Value) { _base.ReturnNull(context); return; } |
︙ | ︙ | |||
431 432 433 434 435 436 437 438 439 440 441 442 443 444 | _context = context; SetReturnValue(context, Final(obj)); IDisposable disp = obj as IDisposable; if (disp != null) disp.Dispose(); } /// <summary> /// Using reflection, enumerate all assemblies in the current appdomain looking for classes that /// have a SQLiteFunctionAttribute attribute, and registering them accordingly. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Security.Permissions.FileIOPermission(Security.Permissions.SecurityAction.Assert, AllFiles = Security.Permissions.FileIOPermissionAccess.PathDiscovery)] | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | _context = context; SetReturnValue(context, Final(obj)); IDisposable disp = obj as IDisposable; if (disp != null) disp.Dispose(); } /// <summary> /// Placeholder for a user-defined disposal routine /// </summary> /// <param name="disposing">True if the object is being disposed explicitly</param> protected virtual void Dispose(bool disposing) { if (disposing) { IDisposable disp; foreach (KeyValuePair<long, AggregateData> kv in _contextDataList) { disp = kv.Value._data as IDisposable; if (disp != null) disp.Dispose(); } _contextDataList.Clear(); _InvokeFunc = null; _StepFunc = null; _FinalFunc = null; _CompareFunc = null; _base = null; _contextDataList = null; } } /// <summary> /// Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if /// someone closes the connection while a DataReader is open. /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } /// <summary> /// Using reflection, enumerate all assemblies in the current appdomain looking for classes that /// have a SQLiteFunctionAttribute attribute, and registering them accordingly. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Security.Permissions.FileIOPermission(Security.Permissions.SecurityAction.Assert, AllFiles = Security.Permissions.FileIOPermissionAccess.PathDiscovery)] |
︙ | ︙ | |||
584 585 586 587 588 589 590 | /// Obtains the collating sequence in effect for the given function. /// </summary> /// <returns></returns> protected CollationSequence GetCollationSequence() { return _base.GetCollationSequence(this, _context); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | /// Obtains the collating sequence in effect for the given function. /// </summary> /// <returns></returns> protected CollationSequence GetCollationSequence() { return _base.GetCollationSequence(this, _context); } } /// <summary> /// The type of user-defined function to declare /// </summary> public enum FunctionType { |
︙ | ︙ |
︙ | ︙ | |||
41 42 43 44 45 46 47 | } /// <summary> /// A single sub-query for a given table/database. /// </summary> private sealed class KeyQuery : IDisposable { | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | < < < < < < < < < < < < < < < < < < | 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 | } /// <summary> /// A single sub-query for a given table/database. /// </summary> private sealed class KeyQuery : IDisposable { private SQLiteCommand _command; internal SQLiteDataReader _reader; internal KeyQuery(SQLiteConnection cnn, string database, string table, params string[] columns) { using (SQLiteCommandBuilder builder = new SQLiteCommandBuilder()) { _command = cnn.CreateCommand(); for (int n = 0; n < columns.Length; n++) { columns[n] = builder.QuoteIdentifier(columns[n]); } } _command.CommandText = String.Format(CultureInfo.InvariantCulture, "SELECT {0} FROM [{1}].[{2}] WHERE ROWID = ?", String.Join(",", columns), database, table); _command.Parameters.AddWithValue(null, (long)0); } internal bool IsValid { set { if (value != false) throw new ArgumentException(); if (_reader != null) { _reader.Dispose(); _reader = null; } } } internal void Sync(long rowid) { IsValid = false; _command.Parameters[0].Value = rowid; _reader = _command.ExecuteReader(); _reader.Read(); } public void Dispose() { IsValid = false; if (_command != null) _command.Dispose(); _command = null; } } /// <summary> /// This function does all the nasty work at determining what keys need to be returned for /// a given statement. /// </summary> /// <param name="cnn"></param> |
︙ | ︙ | |||
305 306 307 308 309 310 311 | // Now we have all the additional columns we have to return in order to support // CommandBehavior.KeyInfo _keyInfo = new KeyInfo[keys.Count]; keys.CopyTo(_keyInfo); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | // Now we have all the additional columns we have to return in order to support // CommandBehavior.KeyInfo _keyInfo = new KeyInfo[keys.Count]; keys.CopyTo(_keyInfo); } /// <summary> /// How many additional columns of keyinfo we're holding /// </summary> internal int Count { get { return (_keyInfo == null) ? 0 : _keyInfo.Length; } } |
︙ | ︙ | |||
426 427 428 429 430 431 432 433 434 435 436 437 438 439 | for (int n = 0; n < _keyInfo.Length; n++) { if (_keyInfo[n].query != null) _keyInfo[n].query.IsValid = false; } } internal string GetDataTypeName(int i) { Sync(); if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetDataTypeName(_keyInfo[i].column); else return "integer"; } | > > > > > > > > > > > > > > | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | for (int n = 0; n < _keyInfo.Length; n++) { if (_keyInfo[n].query != null) _keyInfo[n].query.IsValid = false; } } public void Dispose() { _stmt = null; if (_keyInfo == null) return; for (int n = 0; n < _keyInfo.Length; n++) { if (_keyInfo[n].query != null) _keyInfo[n].query.Dispose(); } _keyInfo = null; } internal string GetDataTypeName(int i) { Sync(); if (_keyInfo[i].query != null) return _keyInfo[i].query._reader.GetDataTypeName(_keyInfo[i].column); else return "integer"; } |
︙ | ︙ |
︙ | ︙ | |||
107 108 109 110 111 112 113 | private static bool _enabled; /// <summary> /// Initializes the SQLite logging facilities. /// </summary> public static void Initialize() { | < < < < < < < < | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | private static bool _enabled; /// <summary> /// Initializes the SQLite logging facilities. /// </summary> public static void Initialize() { // // BUGFIX: To avoid nasty situations where multiple AppDomains are // attempting to initialize and/or shutdown what is really // a shared native resource (i.e. the SQLite core library // is loaded per-process and has only one logging callback, // not one per-AppDomain, which it knows nothing about), // prevent all non-default AppDomains from registering a |
︙ | ︙ | |||
152 153 154 155 156 157 158 | AppDomain.CurrentDomain.DomainUnload += _domainUnload; } // // NOTE: Create an instance of the SQLite wrapper class. // if (_sql == null) | | < | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | AppDomain.CurrentDomain.DomainUnload += _domainUnload; } // // NOTE: Create an instance of the SQLite wrapper class. // if (_sql == null) _sql = new SQLite3(SQLiteDateFormats.Default); // // NOTE: Create a single "global" (i.e. per-process) callback // to register with SQLite. This callback will pass the // event on to any registered handler. We only want to // do this once. // |
︙ | ︙ | |||
196 197 198 199 200 201 202 | private static void DomainUnload( object sender, EventArgs e ) { lock (syncRoot) { | < < < < < < < < < < < < < < < < < < < < < < < | 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 | private static void DomainUnload( object sender, EventArgs e ) { lock (syncRoot) { // // BUGBUG: This will cause serious problems if other AppDomains // have any open SQLite connections; however, there is // currently no way around this limitation. // if (_sql != null) { int rc = _sql.Shutdown(); if (rc != 0) throw new SQLiteException(rc, "Failed to shutdown interface."); rc = _sql.SetLogCallback(null); if (rc != 0) throw new SQLiteException(rc, "Failed to shutdown logging."); } // // NOTE: Remove the event handler for the DomainUnload event // that we added earlier. // if (_domainUnload != null) { AppDomain.CurrentDomain.DomainUnload -= _domainUnload; |
︙ | ︙ | |||
290 291 292 293 294 295 296 | /// </summary> public static bool Enabled { get { lock (syncRoot) { return _enabled; } } set { lock (syncRoot) { _enabled = value; } } } | < < < < < < < < < < < < < < < < < < < < < < < < < | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | /// </summary> public static bool Enabled { get { lock (syncRoot) { return _enabled; } } set { lock (syncRoot) { _enabled = value; } } } /// <summary> /// Creates and initializes the default log event handler. /// </summary> private static void InitializeDefaultHandler() { lock (syncRoot) { |
︙ | ︙ | |||
386 387 388 389 390 391 392 | { if (e == null) return; string message = e.Message; if (message == null) | < < < < < < | | | < < < | < | | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | { if (e == null) return; string message = e.Message; if (message == null) message = "<null>"; else if (message.Length == 0) message = "<empty>"; Trace.WriteLine(String.Format("SQLite error ({0}): {1}", e.ErrorCode, message)); } } #endif } |
︙ | ︙ | |||
84 85 86 87 88 89 90 | } _paramNames[x] = s; _paramValues[x] = null; } } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | } _paramNames[x] = s; _paramValues[x] = null; } } } /// <summary> /// Called by SQLiteParameterCollection, this function determines if the specified parameter name belongs to /// this statement, and if so, keeps a reference to the parameter so it can be bound later. /// </summary> /// <param name="s">The parameter name to map</param> /// <param name="p">The parameter to assign it</param> internal bool MapParameter(string s, SQLiteParameter p) |
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | _paramValues[n] = p; return true; } } return false; } /// <summary> /// Bind all parameters, making sure the caller didn't miss any /// </summary> internal void BindParameters() { if (_paramNames == null) return; int x = _paramNames.Length; for (int n = 0; n < x; n++) { BindParameter(n + 1, _paramValues[n]); } } | > > > > > > > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | _paramValues[n] = p; return true; } } return false; } #region IDisposable Members /// <summary> /// Disposes and finalizes the statement /// </summary> public void Dispose() { if (_sqlite_stmt != null) { _sqlite_stmt.Dispose(); } _sqlite_stmt = null; _paramNames = null; _paramValues = null; _sql = null; _sqlStatement = null; } #endregion /// <summary> /// Bind all parameters, making sure the caller didn't miss any /// </summary> internal void BindParameters() { if (_paramNames == null) return; int x = _paramNames.Length; for (int n = 0; n < x; n++) { BindParameter(n + 1, _paramValues[n]); } } /// <summary> /// Perform the bind operation for an individual parameter /// </summary> /// <param name="index">The index of the parameter to bind</param> /// <param name="param">The parameter we're binding</param> private void BindParameter(int index, SQLiteParameter param) { |
︙ | ︙ | |||
285 286 287 288 289 290 291 | // // NOTE: The old method (commented below) does not honor the selected date format // for the connection. // _sql.Bind_DateTime(this, index, Convert.ToDateTime(obj, CultureInfo.CurrentCulture)); _sql.Bind_DateTime(this, index, (obj is string) ? _sql.ToDateTime((string)obj) : Convert.ToDateTime(obj, CultureInfo.CurrentCulture)); break; | | < < | | | < < | < < | < < | < < | < < | < < | | | 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 | // // NOTE: The old method (commented below) does not honor the selected date format // for the connection. // _sql.Bind_DateTime(this, index, Convert.ToDateTime(obj, CultureInfo.CurrentCulture)); _sql.Bind_DateTime(this, index, (obj is string) ? _sql.ToDateTime((string)obj) : Convert.ToDateTime(obj, CultureInfo.CurrentCulture)); break; case DbType.Int64: case DbType.UInt64: _sql.Bind_Int64(this, index, Convert.ToInt64(obj, CultureInfo.CurrentCulture)); break; case DbType.Boolean: case DbType.Int16: case DbType.Int32: case DbType.UInt16: case DbType.UInt32: case DbType.SByte: case DbType.Byte: _sql.Bind_Int32(this, index, Convert.ToInt32(obj, CultureInfo.CurrentCulture)); break; case DbType.Single: case DbType.Double: case DbType.Currency: //case DbType.Decimal: // Dont store decimal as double ... loses precision _sql.Bind_Double(this, index, Convert.ToDouble(obj, CultureInfo.CurrentCulture)); break; |
︙ | ︙ |
︙ | ︙ | |||
55 56 57 58 59 60 61 | _cnn._transactionLevel--; _cnn = null; throw; } } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | > > > > > > > > > > > > > > > | < | 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 | _cnn._transactionLevel--; _cnn = null; throw; } } } /// <summary> /// Commits the current transaction. /// </summary> public override void Commit() { IsValid(true); if (_cnn._transactionLevel - 1 == 0) { using (SQLiteCommand cmd = _cnn.CreateCommand()) { cmd.CommandText = "COMMIT"; cmd.ExecuteNonQuery(); } } _cnn._transactionLevel--; _cnn = null; } /// <summary> /// Returns the underlying connection to which this transaction applies. /// </summary> public new SQLiteConnection Connection { get { return _cnn; } } /// <summary> /// Forwards to the local Connection property /// </summary> protected override DbConnection DbConnection { get { return Connection; } } /// <summary> /// Disposes the transaction. If it is currently active, any changes are rolled back. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (IsValid(false)) { IssueRollback(); } } base.Dispose(disposing); } /// <summary> /// Gets the isolation level of the transaction. SQLite only supports Serializable transactions. /// </summary> public override IsolationLevel IsolationLevel { get { return _level; } } /// <summary> /// Rolls back the active transaction. /// </summary> public override void Rollback() { IsValid(true); IssueRollback(); } internal void IssueRollback() { SQLiteConnection cnn = Interlocked.Exchange(ref _cnn, null); |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. |
︙ | ︙ |
︙ | ︙ | |||
15 16 17 18 19 20 21 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC139952-261A-4463-B6FA-AEBC25283A66}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>System.Data.SQLite</RootNamespace> <AssemblyName>System.Data.SQLite</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC139952-261A-4463-B6FA-AEBC25283A66}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>System.Data.SQLite</RootNamespace> <AssemblyName>System.Data.SQLite</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> <SQLiteNetDir>$(MSBuildProjectDirectory)\..</SQLiteNetDir> <ConfigurationYear>2010</ConfigurationYear> </PropertyGroup> <Import Project="$(SQLiteNetDir)\SQLite.NET.Settings.targets" /> <PropertyGroup Condition="'$(BinaryOutputPath)' != ''"> <OutputPath>$(BinaryOutputPath)</OutputPath> <DocumentationFile>$(BinaryOutputPath)System.Data.SQLite.xml</DocumentationFile> |
︙ | ︙ |
︙ | ︙ | |||
15 16 17 18 19 20 21 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC139952-261A-4463-B6FA-AEBC25284A66}</ProjectGuid> <OutputType>Module</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>System.Data.SQLite</RootNamespace> <AssemblyName>System.Data.SQLite</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC139952-261A-4463-B6FA-AEBC25284A66}</ProjectGuid> <OutputType>Module</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>System.Data.SQLite</RootNamespace> <AssemblyName>System.Data.SQLite</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> <SignAssembly>false</SignAssembly> <SQLiteNetDir>$(MSBuildProjectDirectory)\..</SQLiteNetDir> <ConfigurationYear>2010</ConfigurationYear> <ConfigurationSuffix>Module</ConfigurationSuffix> <UseInteropDll>false</UseInteropDll> <UseSqliteStandard>false</UseSqliteStandard> </PropertyGroup> |
︙ | ︙ |
︙ | ︙ | |||
46 47 48 49 50 51 52 | <!-- NOTE: Emit an AssemblyFlags attribute that includes the Retargetable flag from the AssemblyNameFlags enumeration? --> <PropertyGroup Condition="'$(IsRetargetable)' != 'false'"> <DefineConstants>$(DefineConstants);RETARGETABLE</DefineConstants> </PropertyGroup> | < < < < < < < | 46 47 48 49 50 51 52 53 | <!-- NOTE: Emit an AssemblyFlags attribute that includes the Retargetable flag from the AssemblyNameFlags enumeration? --> <PropertyGroup Condition="'$(IsRetargetable)' != 'false'"> <DefineConstants>$(DefineConstants);RETARGETABLE</DefineConstants> </PropertyGroup> </Project> |
1 2 3 4 5 6 7 8 9 10 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; | < < < | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; #if !PLATFORM_COMPACTFRAMEWORK && !DEBUG using System.Security; #endif using System.Runtime.InteropServices; #if !PLATFORM_COMPACTFRAMEWORK && !DEBUG [SuppressUnmanagedCodeSecurity] #endif internal static class UnsafeNativeMethods { #if !SQLITE_STANDARD #if !USE_INTEROP_DLL #if !PLATFORM_COMPACTFRAMEWORK private const string SQLITE_DLL = "System.Data.SQLite.dll"; #else internal const string SQLITE_DLL = "SQLite.Interop.076.dll"; #endif // PLATFORM_COMPACTFRAMEWORK #else private const string SQLITE_DLL = "SQLite.Interop.dll"; #endif // USE_INTEROP_DLL #else |
︙ | ︙ | |||
353 354 355 356 357 358 359 | [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_libversion(); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else | < < < < < < < < < < < < < < < < < < < < < | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_libversion(); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_interrupt(IntPtr db); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern long sqlite3_last_insert_rowid(IntPtr db); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_changes(IntPtr db); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_shutdown(); |
︙ | ︙ | |||
428 429 430 431 432 433 434 | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_bind_int(IntPtr stmt, int index, int value); | < < < < < < < < < < < < < < < < < < < < < < < | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_bind_int(IntPtr stmt, int index, int value); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern int sqlite3_bind_int64(IntPtr stmt, int index, long value); #else [DllImport(SQLITE_DLL)] internal static extern int sqlite3_bind_int64_interop(IntPtr stmt, int index, ref long value); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_bind_null(IntPtr stmt, int index); |
︙ | ︙ | |||
903 904 905 906 907 908 909 | } protected override bool ReleaseHandle() { try { SQLiteBase.CloseConnection(this); | | < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | } protected override bool ReleaseHandle() { try { SQLiteBase.CloseConnection(this); } catch (SQLiteException) { } return true; } public override bool IsInvalid { get { return (handle == IntPtr.Zero); } } } |
︙ | ︙ | |||
979 980 981 982 983 984 985 | } protected override bool ReleaseHandle() { try { SQLiteBase.FinalizeStatement(this); | | < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < | 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 | } protected override bool ReleaseHandle() { try { SQLiteBase.FinalizeStatement(this); } catch (SQLiteException) { } return true; } public override bool IsInvalid { get { return (handle == IntPtr.Zero); } } } } |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
42 43 44 45 46 47 48 | } # # NOTE: Run all the unit tests. # set test_time [time { runAllTests $test_channel $path \ | | | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | } # # NOTE: Run all the unit tests. # set test_time [time { runAllTests $test_channel $path \ [getTestFiles [list $path] $test_flags(-file) $test_flags(-notFile)] \ [list [file tail [info script]] *.tcl pkgIndex.eagle common.eagle \ constraints.eagle epilogue.eagle prologue.eagle] }] # # NOTE: Run the local test epilogue, if any. # if {[file exists [file join $path epilogue.eagle]]} then { source [file join $path epilogue.eagle] |
︙ | ︙ |
︙ | ︙ | |||
47 48 49 50 51 52 53 | if {![haveConstraint [appendArgs file_ [file tail $testLinqOutFile]]]} then { checkForFile $test_channel $testLinqOutFile } ############################################################################### | | | < < < < < < < | < < < | | | | | | 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 | if {![haveConstraint [appendArgs file_ [file tail $testLinqOutFile]]]} then { checkForFile $test_channel $testLinqOutFile } ############################################################################### runTest {test basic-1.1 {unit tests from the 'test' project} -setup { catch {file delete [file join [file dirname $testExeFile] Test.db3]} } -body { set output "" set code [catch { testClrExec $testExeFile [list -eventflags Wait -directory \ [file dirname $testExeFile] -stdout output -success 0] -autoRun } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" list $code [expr {$code == 0 ? "" : $error}] } -cleanup { unset -nocomplain code output error } -constraints {eagle file_test.exe} -result {0 {}}} ############################################################################### runTest {test basic-1.2 {unit tests from the 'testlinq' project} -setup { # # NOTE: Re-copy the reference database file used for this unit test to the # build directory in case it has been changed by a previous test run. # file copy -force $northwindEfDbFile \ [file join [getBuildDirectory] [file tail $northwindEfDbFile]] # # NOTE: We need to make 100% sure that the console output encoding is the # same as when the 'testlinq.out' file was created. # set savedEncoding [object invoke Console OutputEncoding] set encoding [object invoke System.Text.Encoding GetEncoding Windows-1252] object invoke Console OutputEncoding $encoding } -body { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ [file dirname $testLinqExeFile] -stdout output -success 0] } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" list $code [string equal $output [readFile $testLinqOutFile]] \ [expr {$code == 0 ? "" : $error}] } -cleanup { catch {object invoke Console OutputEncoding $savedEncoding} unset -nocomplain code output error savedEncoding encoding } -constraints \ {eagle monoToDo file_testlinq.exe file_northwindEF.db file_testlinq.out} \ -result {0 True {}}} ############################################################################### runTest {test basic-1.3 {SELECT scalar/reader, CREATE, INSERT} -setup { setupDb [set fileName basic-1.3.db] } -body { set result [list] lappend result [sql execute -execute scalar $db \ "SELECT sqlite_source_id();"] sql execute $db "CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y, z);" |
︙ | ︙ | |||
147 148 149 150 151 152 153 | } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^\{\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}\}\ \{1 \{\{x 1\} \{y foo\} \{z 1234\}\}\} \{count 1\} \{names \{x y z\}\}$}} ############################################################################### | | | | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^\{\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}\}\ \{1 \{\{x 1\} \{y foo\} \{z 1234\}\}\} \{count 1\} \{names \{x y z\}\}$}} ############################################################################### runTest {test basic-1.4 {GetSchema with ReservedWords} -setup { setupDb [set fileName basic-1.4.db] } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getTemporaryPath] basic-1.4.db] unset -nocomplain results errors set code [compileCSharpWith [subst { using System.Data; using System.Data.SQLite; |
︙ | ︙ | |||
180 181 182 183 184 185 186 | public static void Main() { // do nothing. } } } | | | | | | 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 | public static void Main() { // do nothing. } } } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} GetReservedWords } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ System#Data#DataTable#\d+$}} ############################################################################### runTest {test basic-1.5 {GetSchema with ForeignKeys} -setup { setupDb [set fileName basic-1.5.db] } -body { sql execute $db { CREATE TABLE t1( x INTEGER REFERENCES t2 MATCH FULL ON UPDATE SET DEFAULT ON DELETE CASCADE DEFAULT 1 ); } sql execute $db "CREATE TABLE t2(x INTEGER REFERENCES t3);" set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getTemporaryPath] basic-1.5.db] unset -nocomplain results errors set code [compileCSharpWith [subst { using System.Data; using System.Data.SQLite; |
︙ | ︙ | |||
240 241 242 243 244 245 246 | public static void Main() { // do nothing. } } } | | < | | | | | | | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | public static void Main() { // do nothing. } } } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { set rows [list] set foreignKeys [object invoke _Dynamic${id}.Test${id} GetForeignKeys] object foreach -alias foreignKey $foreignKeys { lappend rows [list \ [$foreignKey Item CONSTRAINT_CATALOG] \ [$foreignKey Item CONSTRAINT_NAME] \ [$foreignKey Item TABLE_CATALOG] \ [$foreignKey Item TABLE_NAME] \ [$foreignKey Item CONSTRAINT_TYPE] \ [$foreignKey Item IS_DEFERRABLE] \ [$foreignKey Item INITIALLY_DEFERRED] \ [$foreignKey Item FKEY_FROM_COLUMN] \ [$foreignKey Item FKEY_TO_CATALOG] \ [$foreignKey Item FKEY_TO_TABLE] \ [$foreignKey Item FKEY_TO_COLUMN] \ [$foreignKey Item FKEY_FROM_ORDINAL_POSITION] \ [$foreignKey Item FKEY_ON_UPDATE] \ [$foreignKey Item FKEY_ON_DELETE] \ [$foreignKey Item FKEY_MATCH]] } set rows } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result rows foreignKey foreignKeys results errors code \ dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ \{\{main FK_t1_0 main t1 \{FOREIGN KEY\} False False x main t2 \{\} 0 \{SET\ DEFAULT\} CASCADE NONE\} \{main FK_t2_0 main t2 \{FOREIGN KEY\} False False x\ main t3 \{\} 0 \{NO ACTION\} \{NO ACTION\} NONE\}\}$}} ############################################################################### runTest {test basic-1.6 {SQLITE_FCNTL_WIN32_AV_RETRY} -setup { setupDb [set fileName basic-1.6.db] } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getTemporaryPath] basic-1.6.db] unset -nocomplain results errors set code [compileCSharpWith [subst { using System.Data; using System.Data.SQLite; |
︙ | ︙ | |||
337 338 339 340 341 342 343 | public static void Main() { // do nothing. } } } | | | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | public static void Main() { // do nothing. } } } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { set savedCount -1; set savedInterval -1 object invoke _Dynamic${id}.Test${id} TestSetAvRetry \ |
︙ | ︙ | |||
384 385 386 387 388 389 390 | } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ True$}} ############################################################################### | | | | | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ True$}} ############################################################################### runTest {test basic-1.7 {properly closed database file (non-query)} -setup { set fileName basic-1.7.db } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getTemporaryPath] $fileName] set sql { \ BEGIN EXCLUSIVE TRANSACTION; \ CREATE TABLE t1(x INTEGER); \ INSERT INTO t1 (x) VALUES(1); \ SELECT * FROM t1; \ } |
︙ | ︙ | |||
423 424 425 426 427 428 429 | { command.ExecuteNonQuery(); } } } } } | | | | | | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | { command.ExecuteNonQuery(); } } } } } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result \ [close [open $dataSource RDONLY 0 "" -share None]] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ \{\} \{\}$}} ############################################################################### runTest {test basic-1.8 {properly closed database file (reader #1)} -setup { set fileName basic-1.8.db } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getTemporaryPath] $fileName] set sql { \ BEGIN EXCLUSIVE TRANSACTION; \ CREATE TABLE t1(x INTEGER); \ INSERT INTO t1 (x) VALUES(1); \ SELECT * FROM t1; \ } |
︙ | ︙ | |||
484 485 486 487 488 489 490 | // do nothing. } } } } } } | | | | | | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | // do nothing. } } } } } } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result \ [close [open $dataSource RDONLY 0 "" -share None]] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ \{\} \{\}$}} ############################################################################### runTest {test basic-1.9 {properly closed database file (reader #2)} -setup { set fileName basic-1.9.db } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getTemporaryPath] $fileName] set sql { \ BEGIN EXCLUSIVE TRANSACTION; \ CREATE TABLE t1(x INTEGER); \ INSERT INTO t1 (x) VALUES(1); \ SELECT * FROM t1; \ } |
︙ | ︙ | |||
546 547 548 549 550 551 552 | // do nothing. } } } } } } | | | | | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | // do nothing. } } } } } } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result \ [close [open $dataSource RDONLY 0 "" -share None]] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -match regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0\ \{\} \{\}$}} ############################################################################### runTest {test basic-1.10 {Changes property} -setup { setupDb [set fileName basic-1.10.db] } -body { set connection [object invoke -flags +NonPublic -objectflags +NoDispose \ Interpreter.GetActive.connections Item $db] set result [list] sql execute $db "CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y, z);" |
︙ | ︙ | |||
600 601 602 603 604 605 606 | unset -nocomplain name rows result connection db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -result {1 2 2 {1 {{x 1} {y foobar} {z 1234}}} {2 {{x 2} {y foobar} {z 5678}}}}} ############################################################################### | | | | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | unset -nocomplain name rows result connection db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -result {1 2 2 {1 {{x 1} {y foobar} {z 1234}}} {2 {{x 2} {y foobar} {z 5678}}}}} ############################################################################### runTest {test basic-1.11 {LastInsertRowId property} -setup { setupDb [set fileName basic-1.11.db] } -body { set connection [object invoke -flags +NonPublic -objectflags +NoDispose \ Interpreter.GetActive.connections Item $db] set result [list] sql execute $db "CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y, z);" |
︙ | ︙ | |||
657 658 659 660 661 662 663 | } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -result {0 1 2 2 1 2 2 2 {1 {{x 1} {y foobar} {z 1234}}} {2 {{x 2} {y foobar}\ {z 5678}}} 2 {1 {{x 1} {y foobar} {z 1234}}} {2 {{x 2} {y foobar} {z 5678}}}}} ############################################################################### | | | | 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -result {0 1 2 2 1 2 2 2 {1 {{x 1} {y foobar} {z 1234}}} {2 {{x 2} {y foobar}\ {z 5678}}} 2 {1 {{x 1} {y foobar} {z 1234}}} {2 {{x 2} {y foobar} {z 5678}}}}} ############################################################################### runTest {test basic-1.12 {DateTime using Unix epoch} -setup { setupDb [set fileName basic-1.12.db] "" "" "DateTimeFormat=UnixEpoch;" } -body { set result [list] sql execute $db "CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y DATETIME);" sql execute $db "INSERT INTO t1 (x, y) VALUES(1, 1302825600);" sql execute $db "INSERT INTO t1 (x, y) VALUES(2, 1334448000);" sql execute $db "INSERT INTO t1 (x, y) VALUES(3, 1365984000);" |
︙ | ︙ | |||
685 686 687 688 689 690 691 | sql execute -verbatim $db "INSERT INTO t1 (x, y) VALUES(8, ?);" \ [list param1 DateTime 1334448000] sql execute -verbatim $db "INSERT INTO t1 (x, y) VALUES(9, ?);" \ [list param1 DateTime 1365984000] | | | | | | | | | | 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 | sql execute -verbatim $db "INSERT INTO t1 (x, y) VALUES(8, ?);" \ [list param1 DateTime 1334448000] sql execute -verbatim $db "INSERT INTO t1 (x, y) VALUES(9, ?);" \ [list param1 DateTime 1365984000] sql execute -execute reader -datetimeformat "MM/dd/yyyy HH:mm:ss" $db \ "SELECT x, y FROM t1 ORDER BY x;" foreach name [lsort -integer [array names rows -regexp {^\d+$}]] { lappend result [list $name $rows($name)] } set result } -cleanup { cleanupDb $fileName unset -nocomplain name rows result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -result {{1 {{x 1} {y {04/15/2011 00:00:00}}}} {2 {{x 2} {y {04/15/2012\ 00:00:00}}}} {3 {{x 3} {y {04/15/2013 00:00:00}}}} {4 {{x 4} {y {04/15/2011\ 00:00:00}}}} {5 {{x 5} {y {04/15/2012 00:00:00}}}} {6 {{x 6} {y {04/15/2013\ 00:00:00}}}} {7 {{x 7} {y {04/15/2011 00:00:00}}}} {8 {{x 8} {y {04/15/2012\ 00:00:00}}}} {9 {{x 9} {y {04/15/2013 00:00:00}}}}}} ############################################################################### set date [clock format [clock seconds] -format yyyy-MM-dd] ############################################################################### runTest {test basic-1.13 {DateTime using invariant culture} -setup { setupDb [set fileName basic-1.13.db] "" "" "DateTimeFormat=InvariantCulture;" } -body { set result [list] sql execute $db "CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y DATETIME);" sql execute $db \ "INSERT INTO t1 (x, y) VALUES(1, 'Wednesday, 16 December 2009');" |
︙ | ︙ | |||
748 749 750 751 752 753 754 | sql execute $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \ [list param1 DateTime 12:00] sql execute $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \ [list param1 DateTime "12/16/2009 12:00"] | | | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | sql execute $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \ [list param1 DateTime 12:00] sql execute $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \ [list param1 DateTime "12/16/2009 12:00"] sql execute -execute reader -datetimeformat "MM/dd/yyyy HH:mm:ss" $db \ "SELECT x, CAST(y AS TEXT) AS y2 FROM t1 ORDER BY x;" foreach name [lsort -integer [array names rows -regexp {^\d+$}]] { lappend result [list $name $rows($name)] } set result |
︙ | ︙ | |||
772 773 774 775 776 777 778 | {{x 7} {y2 2009-12-16T00:00:00.0000000Z}}} {8 {{x 8} {y2\ ${date}T12:00:00.0000000Z}}} {9 {{x 9} {y2 2009-12-16T12:00:00.0000000Z}}}\ {10 {{x 10} {y2 2009-12-16T00:00:00.0000000Z}}} {11 {{x 11} {y2\ ${date}T12:00:00.0000000Z}}} {12 {{x 12} {y2 2009-12-16T12:00:00.0000000Z}}}}]} ############################################################################### | | | | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 | {{x 7} {y2 2009-12-16T00:00:00.0000000Z}}} {8 {{x 8} {y2\ ${date}T12:00:00.0000000Z}}} {9 {{x 9} {y2 2009-12-16T12:00:00.0000000Z}}}\ {10 {{x 10} {y2 2009-12-16T00:00:00.0000000Z}}} {11 {{x 11} {y2\ ${date}T12:00:00.0000000Z}}} {12 {{x 12} {y2 2009-12-16T12:00:00.0000000Z}}}}]} ############################################################################### runTest {test basic-1.14 {DateTime using current culture} -setup { setupDb [set fileName basic-1.14.db] "" "" "DateTimeFormat=CurrentCulture;" } -body { set result [list] sql execute $db "CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y DATETIME);" sql execute $db \ "INSERT INTO t1 (x, y) VALUES(1, 'Wednesday, 16 December 2009');" |
︙ | ︙ | |||
809 810 811 812 813 814 815 | sql execute $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \ [list param1 DateTime 12:00] sql execute $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \ [list param1 DateTime "12/16/2009 12:00"] | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | sql execute $db "INSERT INTO t1 (x, y) VALUES(11, ?);" \ [list param1 DateTime 12:00] sql execute $db "INSERT INTO t1 (x, y) VALUES(12, ?);" \ [list param1 DateTime "12/16/2009 12:00"] sql execute -execute reader -datetimeformat "MM/dd/yyyy HH:mm:ss" $db \ "SELECT x, CAST(y AS TEXT) AS y2 FROM t1 ORDER BY x;" foreach name [lsort -integer [array names rows -regexp {^\d+$}]] { lappend result [list $name $rows($name)] } set result } -cleanup { cleanupDb $fileName unset -nocomplain name rows result db fileName } -constraints \ {eagle culture.en_US monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result [subst {{1 {{x 1} {y2 {Wednesday, 16 December\ 2009}}}} {2 {{x 2} {y2 12:00:00}}} {3 {{x 3} {y2 {Wednesday, 16 December 2009\ 12:00:00}}}} {4 {{x 4} {y2 12/16/2009}}} {5 {{x 5} {y2 12:00}}} {6 {{x 6} {y2\ {12/16/2009 12:00}}}} {7 {{x 7} {y2 2009-12-16T00:00:00.0000000Z}}} {8 {{x 8}\ {y2 ${date}T12:00:00.0000000Z}}} {9 {{x 9} {y2 2009-12-16T12:00:00.0000000Z}}}\ {10 {{x 10} {y2 2009-12-16T00:00:00.0000000Z}}} {11 {{x 11} {y2\ ${date}T12:00:00.0000000Z}}} {12 {{x 12} {y2 2009-12-16T12:00:00.0000000Z}}}}]} ############################################################################### unset -nocomplain date ############################################################################### unset -nocomplain testExeFile testLinqExeFile northwindEfDbFile testLinqOutFile ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
︙ | ︙ | |||
104 105 106 107 108 109 110 | # release of Eagle, the following command must be used instead # (also all on one line): # # EagleShell.exe -initialize -postInitialize # "object invoke Interpreter.GetActive AddRuntimeOption native" # -file .\path\to\all.eagle # | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | | < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | # release of Eagle, the following command must be used instead # (also all on one line): # # EagleShell.exe -initialize -postInitialize # "object invoke Interpreter.GetActive AddRuntimeOption native" # -file .\path\to\all.eagle # if {[hasRuntimeOption native]} then { return [file join [file dirname $::path] bin [getBuildYear] \ [machineToPlatform $::tcl_platform(machine)] \ [getBuildConfiguration]] } else { return [file join [file dirname $::path] bin [getBuildYear] \ [getBuildConfiguration] bin] } } proc getBuildFileName { fileName } { return [file nativename \ [file join [getBuildDirectory] [file tail $fileName]]] } proc getBinaryDirectory {} { # # NOTE: This procedure returns the directory where the test application # itself (i.e. the Eagle shell) is located. This will be used as # the destination for the copied System.Data.SQLite native and # managed assemblies (i.e. because this is one of the few places # where the CLR will actually find and load them properly). # return [info binary] } proc getBinaryFileName { fileName } { return [file nativename \ [file join [getBinaryDirectory] [file tail $fileName]]] } proc getAppDomainPreamble { {prefix ""} {suffix ""} } { return [uplevel 1 [list subst [appendArgs $prefix { if {[hasRuntimeOption native]} then { object invoke Interpreter.GetActive AddRuntimeOption native } set ::path {$::path} set ::test_year {[getBuildYear]} |
︙ | ︙ | |||
308 309 310 311 312 313 314 | } } proc tryLoadAssembly { fileName } { set fileName [getBinaryFileName $fileName] if {[catch {set assembly \ | | < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < | > | | | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | } } proc tryLoadAssembly { fileName } { set fileName [getBinaryFileName $fileName] if {[catch {set assembly \ [object load -loadtype File $fileName]}] == 0} then { # # NOTE: Now, add the necessary test constraint. # addConstraint [file rootname [file tail $fileName]] # # NOTE: Return the full path of the loaded file. # return $fileName } return "" } proc checkForSQLite { channel } { tputs $channel "---- checking for core SQLite library... " if {[catch {object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \ SQLiteVersion} version] == 0} then { # # NOTE: Yes, the SQLite core library appears to be available. # addConstraint SQLite tputs $channel [appendArgs "yes (" $version ")\n"] } else { tputs $channel no\n } } proc enumerableToList { enumerable } { set result [list] if {[string length $enumerable] == 0 || $enumerable eq "null"} then { return $result } object foreach -alias item $enumerable { if {[string length $item] > 0} then { lappend result [$item ToString] } } return $result } proc compileCSharpWith { text resultsVarName errorsVarName fileNames args } { # # NOTE: Create the base command to evaluate and add the property settings # that are almost always needed by our unit tests (i.e. the System # and System.Data assembly references). # set command [list compileCSharp $text results errors \ ReferencedAssemblies.Add System.dll ReferencedAssemblies.Add \ System.Data.dll ReferencedAssemblies.Add System.Xml.dll] # # NOTE: Add all the provided file names as assembly references. # foreach fileName $fileNames { lappend command ReferencedAssemblies.Add [getBinaryFileName $fileName] } # # NOTE: Add the extra arguments, if any, to the command to evaluate. # eval lappend command $args |
︙ | ︙ | |||
439 440 441 442 443 444 445 | # # NOTE: Evaluate the constructed [compileCSharp] command and return the # result. # eval $command } | | < < | < < < < < | | > | < < < < < < < | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | # # NOTE: Evaluate the constructed [compileCSharp] command and return the # result. # eval $command } proc setupDb {fileName {mode ""} {delete ""} {extra ""} {varName db}} { # # NOTE: For now, all test databases used by the test suite are placed into # the temporary directory. Each database used by a test should be # cleaned up by that test using the "cleanupDb" procedure, below. # set fileName [file join [getTemporaryPath] [file tail $fileName]] # # NOTE: By default, delete any pre-existing database with the same file # name. # if {[string length $delete] == 0 || $delete} then { catch {file delete $fileName} } # # NOTE: Refer to the specified variable (e.g. "db") in the context of the # caller. The handle to the opened database will be stored there. # upvar 1 $varName db |
︙ | ︙ | |||
488 489 490 491 492 493 494 | # NOTE: If the caller specified a journal mode, add the necessary portion # of the connection string now. # if {[string length $mode] > 0} then { append connection {;Journal Mode=${mode}} } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | < < | < < < < < < < | < < < < < < < | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | # NOTE: If the caller specified a journal mode, add the necessary portion # of the connection string now. # if {[string length $mode] > 0} then { append connection {;Journal Mode=${mode}} } # # NOTE: If the caller specified an extra payload to the connection string, # append it now. # if {[string length $extra] > 0} then { append connection \; $extra } # # NOTE: Open the database connection now, placing the opaque handle value # into the variable specified by the caller. # set db [sql open -type SQLite [subst $connection]] } proc cleanupDb {fileName {varName db}} { # # NOTE: Refer to the specified variable (e.g. "db") in the context of the # caller. The handle to the opened database is stored there. # upvar 1 $varName db # # NOTE: Close the connection to the database now. This should allow us to # delete the underlying database file. # catch {sql close $db} # # NOTE: Delete the test database file now. For now, all test database # files are stored in the temporary directory. # catch {file delete [file join [getTemporaryPath] [file tail $fileName]]} } proc runSQLiteTestPrologue {} { # # NOTE: Skip running our custom prologue if the main one has been skipped. # if {![info exists ::no(prologue.eagle)]} then { # # NOTE: Skip all System.Data.SQLite related file handling (deleting, # copying, and loading) if we are so instructed. # if {![info exists ::no(sqliteFiles)]} then { # # NOTE: Skip trying to delete any files if we are so instructed. # if {![info exists ::no(deleteSqliteFiles)]} then { tryDeleteAssembly SQLite.Interop.dll tryDeleteAssembly System.Data.SQLite.dll tryDeleteAssembly System.Data.SQLite.Linq.dll } # # NOTE: Skip trying to copy any files if we are so instructed. # if {![info exists ::no(copySqliteFiles)]} then { tryCopyAssembly SQLite.Interop.dll tryCopyAssembly System.Data.SQLite.dll tryCopyAssembly System.Data.SQLite.Linq.dll } # # NOTE: Skip trying to load any files if we are so instructed. |
︙ | ︙ | |||
814 815 816 817 818 819 820 | # NOTE: Now, we need to know if the SQLite core library is available # (i.e. because the managed-only System.Data.SQLite assembly can # load without it; however, it cannot do anything useful without # it). If we are using the mixed-mode assembly and we already # found it (above), this should always succeed. # checkForSQLite $::test_channel | < < < < < < < < < < < | < < < < < < | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | # NOTE: Now, we need to know if the SQLite core library is available # (i.e. because the managed-only System.Data.SQLite assembly can # load without it; however, it cannot do anything useful without # it). If we are using the mixed-mode assembly and we already # found it (above), this should always succeed. # checkForSQLite $::test_channel } } proc runSQLiteTestEpilogue {} { # # NOTE: Skip running our custom epilogue if the main one has been skipped. # if {![info exists ::no(epilogue.eagle)]} then { # # NOTE: For now, nothing is done here. # } } ########################################################################### ############################# END Eagle ONLY ############################## ########################################################################### } # # NOTE: Provide the System.Data.SQLite test package to the interpreter. # package provide System.Data.SQLite.Test 1.0 } |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
45 46 47 48 49 50 51 | set result [list] foreach value [list "" a b z 1+1 don notthere] { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ | | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | set result [list] foreach value [list "" a b z 1+1 don notthere] { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ [file dirname $testLinqExeFile] -nocarriagereturns -stdout output \ -success 0] -startsWith $value } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" lappend result $code |
︙ | ︙ |
︙ | ︙ | |||
64 65 66 67 68 69 70 | public static void Main() { SQLiteFunction.RegisterFunction(typeof(Test${id})); } } } | | | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | public static void Main() { SQLiteFunction.RegisterFunction(typeof(Test${id})); } } } }] results errors System.Data.SQLite.dll] # # NOTE: Compile the C# code (above) to register the custom SQLite function # and then open the database for this test case and attempt to execute # the function. Normally, we would open the database in the test setup # phase; however, that will not work correctly because newly registered # functions are only picked up and used by databases opened after they |
︙ | ︙ | |||
89 90 91 92 93 94 95 | } -cleanup { cleanupDb $fileName unset -nocomplain result code results errors id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \ regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}\ | | | 89 90 91 92 93 94 95 96 97 98 99 100 101 | } -cleanup { cleanupDb $fileName unset -nocomplain result code results errors id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \ regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}\ SQLiteConnection#\d+ \{\} \{\} Zm9v$}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
︙ | ︙ | |||
31 32 33 34 35 36 37 | for {set x 0} {$x < [llength $y]} {incr x} { sql execute $db \ "INSERT INTO t1 (x, y) VALUES($x, [lindex $y $x]);" } set result [sql execute -execute reader -format list $db \ | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | for {set x 0} {$x < [llength $y]} {incr x} { sql execute $db \ "INSERT INTO t1 (x, y) VALUES($x, [lindex $y $x]);" } set result [sql execute -execute reader -format list $db \ "SELECT x, y FROM t1 ORDER BY x;"] } -cleanup { cleanupDb $fileName unset -nocomplain x result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {0 -1.79769E+308 1 -3.40282E+38 2 -1 3 0 4 1 5 3.40282E+38 6 1.79769E+308}} |
︙ | ︙ | |||
53 54 55 56 57 58 59 | for {set x 0} {$x < [llength $y]} {incr x} { sql execute $db \ "INSERT INTO t2 (x, y) VALUES($x, [lindex $y $x]);" } set result [sql execute -execute reader -format list $db \ | | | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | for {set x 0} {$x < [llength $y]} {incr x} { sql execute $db \ "INSERT INTO t2 (x, y) VALUES($x, [lindex $y $x]);" } set result [sql execute -execute reader -format list $db \ "SELECT x, y FROM t2 ORDER BY x;"] } -cleanup { cleanupDb $fileName unset -nocomplain x result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {0 -1.79769E+308 1 -3.40282E+38 2 -1 3 0 4 1 5 3.40282E+38 6 1.79769E+308}} |
︙ | ︙ | |||
75 76 77 78 79 80 81 | for {set x 0} {$x < [llength $y]} {incr x} { sql execute $db \ "INSERT INTO t3 (x, y) VALUES($x, [lindex $y $x]);" } set result [sql execute -execute reader -format list $db \ | | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | for {set x 0} {$x < [llength $y]} {incr x} { sql execute $db \ "INSERT INTO t3 (x, y) VALUES($x, [lindex $y $x]);" } set result [sql execute -execute reader -format list $db \ "SELECT x, y FROM t3 ORDER BY x;"] } -cleanup { cleanupDb $fileName unset -nocomplain x result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {0 -1.79769E+308 1 -3.40282E+38 2 -1 3 0 4 1 5 3.40282E+38 6 1.79769E+308}} |
︙ | ︙ |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
31 32 33 34 35 36 37 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.2 {missing journal mode, WAL db} -body { set fileName tkt-448d663d11-1.2.db file copy -force [file join $path wal.db] \ | | | | | | 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 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.2 {missing journal mode, WAL db} -body { set fileName tkt-448d663d11-1.2.db file copy -force [file join $path wal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName "" false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {wal}} ############################################################################### runTest {test tkt-448d663d11-1.3 {missing journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.3.db file copy -force [file join $path nonWal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName "" false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {delete}} |
︙ | ︙ | |||
73 74 75 76 77 78 79 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.5 {'Default' journal mode, WAL db} -body { set fileName tkt-448d663d11-1.5.db file copy -force [file join $path wal.db] \ | | | | | | 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 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.5 {'Default' journal mode, WAL db} -body { set fileName tkt-448d663d11-1.5.db file copy -force [file join $path wal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Default false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {wal}} ############################################################################### runTest {test tkt-448d663d11-1.6 {'Default' journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.6.db file copy -force [file join $path nonWal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Default false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {delete}} |
︙ | ︙ | |||
115 116 117 118 119 120 121 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.8 {'Delete' journal mode, WAL db} -body { set fileName tkt-448d663d11-1.8.db file copy -force [file join $path wal.db] \ | | | | | | 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 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.8 {'Delete' journal mode, WAL db} -body { set fileName tkt-448d663d11-1.8.db file copy -force [file join $path wal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Delete false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {delete}} ############################################################################### runTest {test tkt-448d663d11-1.9 {'Delete' journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.9.db file copy -force [file join $path nonWal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Delete false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {delete}} |
︙ | ︙ | |||
205 206 207 208 209 210 211 | {wal}} ############################################################################### runTest {test tkt-448d663d11-1.15 {'Wal' journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.15.db file copy -force [file join $path nonWal.db] \ | | | | | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | {wal}} ############################################################################### runTest {test tkt-448d663d11-1.15 {'Wal' journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.15.db file copy -force [file join $path nonWal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Wal false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {wal}} ############################################################################### runTest {test tkt-448d663d11-1.16 {'Wal' journal mode, WAL db} -body { set fileName tkt-448d663d11-1.16.db file copy -force [file join $path wal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Wal false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {wal}} |
︙ | ︙ | |||
247 248 249 250 251 252 253 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.18 {'Bad' journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.18.db file copy -force [file join $path nonWal.db] \ | | | | | | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | {delete}} ############################################################################### runTest {test tkt-448d663d11-1.18 {'Bad' journal mode, non-WAL db} -body { set fileName tkt-448d663d11-1.18.db file copy -force [file join $path nonWal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Bad false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {delete}} ############################################################################### runTest {test tkt-448d663d11-1.19 {'Bad' journal mode, WAL db} -body { set fileName tkt-448d663d11-1.19.db file copy -force [file join $path wal.db] \ [file join [getTemporaryPath] $fileName] setupDb $fileName Bad false sql execute -execute scalar $db "PRAGMA journal_mode;" } -cleanup { cleanupDb $fileName unset -nocomplain db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \ {wal}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
45 46 47 48 49 50 51 | set result [list] foreach value [list "" a b z 1+1 don notthere] { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ | | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | set result [list] foreach value [list "" a b z 1+1 don notthere] { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ [file dirname $testLinqExeFile] -nocarriagereturns -stdout output \ -success 0] -endsWith $value } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" lappend result $code |
︙ | ︙ |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
23 24 25 26 27 28 29 | runTest {test tkt-8554170e09-1.1 {default DATETIME value, NULL} -setup { setupDb [set fileName tkt-8554170e09-1.1.db] } -body { sql execute $db "CREATE TABLE t1(x INTEGER, y DATETIME);" sql execute $db "INSERT INTO t1 (x, y) VALUES(1, NULL);" set result [sql execute -execute reader -format list $db \ | | | | 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 | runTest {test tkt-8554170e09-1.1 {default DATETIME value, NULL} -setup { setupDb [set fileName tkt-8554170e09-1.1.db] } -body { sql execute $db "CREATE TABLE t1(x INTEGER, y DATETIME);" sql execute $db "INSERT INTO t1 (x, y) VALUES(1, NULL);" set result [sql execute -execute reader -format list $db \ "SELECT x, y FROM t1 ORDER BY x;"] } -cleanup { cleanupDb $fileName unset -nocomplain result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -result {1}} ############################################################################### runTest {test tkt-8554170e09-1.2 {default DATETIME value, empty} -setup { setupDb [set fileName tkt-8554170e09-1.2.db] } -body { sql execute $db "CREATE TABLE t1(x INTEGER, y DATETIME);" sql execute $db "INSERT INTO t1 (x, y) VALUES(1, '');" set result [sql execute -execute reader -format list $db \ "SELECT x, y FROM t1 ORDER BY x;"] } -cleanup { cleanupDb $fileName unset -nocomplain result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -returnCodes 1 -match glob -result {*.SQLiteConvert.ToDateTime*}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
︙ | ︙ | |||
45 46 47 48 49 50 51 | set result [list] for {set pageSize 0} {$pageSize <= 2} {incr pageSize} { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ | | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | set result [list] for {set pageSize 0} {$pageSize <= 2} {incr pageSize} { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ [file dirname $testLinqExeFile] -nocarriagereturns -stdout output \ -success 0] -skip $pageSize } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" lappend result $code |
︙ | ︙ |
︙ | ︙ | |||
28 29 30 31 32 33 34 | object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \ sqlite3_shutdown } ############################################################################### for {set i 1} {$i < 3} {incr i} { | | | | < | 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 | object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \ sqlite3_shutdown } ############################################################################### for {set i 1} {$i < 3} {incr i} { runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup \ [getAppDomainPreamble { set appDomainId(1) {[object invoke AppDomain.CurrentDomain Id]} set fileName {tkt-b4a7ddc83f-1.$i.db} }] -body { set appDomainId(2) [object invoke AppDomain.CurrentDomain Id] package require EagleLibrary package require EagleTest package require System.Data.SQLite.Test object load -loadtype File [file join [getBinaryDirectory] \ System.Data.SQLite.dll] object invoke System.Data.SQLite.SQLiteLog Initialize list $appDomainId(1) $appDomainId(2) \ [expr {$appDomainId(1) != $appDomainId(2)}] [setupDb $fileName] } -cleanup { cleanupDb $fileName unset -nocomplain appDomainId db fileName } -constraints {eagle monoBug28 command.sql compile.DATA\ compile.ISOLATED_INTERPRETERS SQLite System.Data.SQLite} -isolationLevel \ AppDomain -match regexp -result {^\d+ \d+ True SQLiteConnection#\d+$}} } ############################################################################### unset -nocomplain i ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
45 46 47 48 49 50 51 | set result [list] foreach add [list false true false] { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ | | | | | | 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 | set result [list] foreach add [list false true false] { set output "" set code [catch { testClrExec $testLinqExeFile [list -eventflags Wait -directory \ [file dirname $testLinqExeFile] -nocarriagereturns -stdout output \ -success 0] -efTransaction $add } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" lappend result $code if {$code == 0} then { lappend result [string trim $output] } else { lappend result [string trim $error] } } set result } -cleanup { unset -nocomplain code output error result add } -constraints {eagle monoToDo file_testlinq.exe file_northwindEF.db} -match \ glob -result {0 {1581 1730 1833 2116 2139} 0 {System.Data.UpdateException: * --->\ System.Data.SQLite.SQLiteException: Abort due to constraint violation PRIMARY KEY must be unique *} 0 {1 2 3 4 5 6 7 8 9 10 1576 1577 1578 1579 1580 1581 1730 1833 2116 2139}}} ############################################################################### unset -nocomplain testLinqExeFile northwindEfDbFile ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
︙ | ︙ | |||
27 28 29 30 31 32 33 | sql execute $db "CREATE TABLE t2(x INTEGER);" foreach x [list 1 2 3] { sql execute $db "INSERT INTO t1 (x) VALUES($x);" } set result1 [list] | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | sql execute $db "CREATE TABLE t2(x INTEGER);" foreach x [list 1 2 3] { sql execute $db "INSERT INTO t1 (x) VALUES($x);" } set result1 [list] set dataSource [file join [getTemporaryPath] tkt-e1b2e0f769-1.1.db] foreach table [list t1 t2] { set id [object invoke Interpreter.GetActive NextId] set sql "SELECT x FROM $table ORDER BY x;" unset -nocomplain results errors |
︙ | ︙ | |||
99 100 101 102 103 104 105 | connection.Open(); return Tkt_e1b2e0f769(connection).Count; } } } } | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | connection.Open(); return Tkt_e1b2e0f769(connection).Count; } } } } }] results errors System.Data.SQLite.dll] lappend result1 $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result2] : [set result2 ""]}] $result2 } |
︙ | ︙ |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
25 26 27 28 29 30 31 | # # NOTE: For these unit tests to be useful and accurate, the following version # numbers must be manually kept synchronized with the version numbers for # the source code files, the built binaries, and the release packages. # set version(major) 1 set version(minor) 0 | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # # NOTE: For these unit tests to be useful and accurate, the following version # numbers must be manually kept synchronized with the version numbers for # the source code files, the built binaries, and the release packages. # set version(major) 1 set version(minor) 0 set version(build) 76; # NOTE: Incremented with each release. set version(revision) 0 ############################################################################### # ********************* END VOLATILE VERSION INFORMATION ********************** ############################################################################### # |
︙ | ︙ | |||
79 80 81 82 83 84 85 | runTest {test version-1.1 {'System.Data.SQLite' binary version} -body { file version $systemDataSQLiteDllFile } -constraints {eagle file_System.Data.SQLite.dll} -result $version(full)} ############################################################################### | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < | 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 | runTest {test version-1.1 {'System.Data.SQLite' binary version} -body { file version $systemDataSQLiteDllFile } -constraints {eagle file_System.Data.SQLite.dll} -result $version(full)} ############################################################################### runTest {test version-1.2 {'System.Data.SQLite.Linq' binary version} -body { file version $systemDataSQLiteLinqDllFile } -constraints {eagle file_System.Data.SQLite.Linq.dll} -result $version(full)} ############################################################################### runTest {test version-1.3 {'test' binary version} -body { file version $testExeFile } -constraints {eagle file_test.exe} -result $version(full)} ############################################################################### runTest {test version-1.4 {'testlinq' binary version} -body { file version $testLinqExeFile } -constraints {eagle file_testlinq.exe} -result $version(full)} ############################################################################### set patterns [list \ [appendArgs <version> [string map [list . \\.] $version(full)] \ </version>] \ [appendArgs <version> [string map [list . \\.] $version(full)] \ </version>] \ [appendArgs <version> [string map [list . \\.] $version(full)] \ </version>] \ [appendArgs <version> [string map [list . \\.] $version(full)] \ </version>] \ [appendArgs Version= [string map [list . \\.] $version(full)] ,] \ [appendArgs "\; [format %03d $version(build)] "\;] \ [appendArgs AssemblyVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)] \ [appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)] \ [appendArgs AssemblyVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)] \ [appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)] \ [appendArgs Value=\" [format %03d $version(build)] \"] \ [appendArgs Value=\" [string map [list . \\.] $version(full)] \"] \ [appendArgs Value=\" [string map [list . ,] $version(full)] \"] \ [appendArgs <INTEROP_BUILD_NUMBER> [format %03d $version(build)] \ </INTEROP_BUILD_NUMBER>] \ [appendArgs <INTEROP_MANIFEST_VERSION> [string map [list . \\.] \ $version(full)] </INTEROP_MANIFEST_VERSION>] \ |
︙ | ︙ | |||
195 196 197 198 199 200 201 | $version(full)] \"\\)] \ [appendArgs AssemblyVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)] \ [appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)]] set fileNames [list \ | < < | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | $version(full)] \"\\)] \ [appendArgs AssemblyVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)] \ [appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \ $version(full)] \"\\)]] set fileNames [list \ SQLite.nuspec \ SQLite.MSIL.nuspec \ SQLite.x64.nuspec \ SQLite.x86.nuspec \ [file join Doc Extra dbfactorysupport.html] \ [file join Doc Extra welcome.html] \ [file join Membership Properties AssemblyInfo.cs] \ [file join Membership Properties AssemblyInfo.cs] \ [file join SQLite.Designer AssemblyInfo.cs] \ [file join SQLite.Designer AssemblyInfo.cs] \ [file join SQLite.Interop props SQLite.Interop.vsprops] \ [file join SQLite.Interop props SQLite.Interop.vsprops] \ [file join SQLite.Interop props SQLite.Interop.vsprops] \ [file join SQLite.Interop props SQLite.Interop.props] \ [file join SQLite.Interop props SQLite.Interop.props] \ [file join SQLite.Interop props SQLite.Interop.props] \ [file join SQLite.Interop src win interop.h] \ |
︙ | ︙ | |||
242 243 244 245 246 247 248 | set constraint [string map [list / _ \\ _] $fileName] set fileName [file join $root_path $fileName] if {![haveConstraint [appendArgs file_ $constraint]]} then { checkForFile $test_channel $fileName $constraint } | | | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | set constraint [string map [list / _ \\ _] $fileName] set fileName [file join $root_path $fileName] if {![haveConstraint [appendArgs file_ $constraint]]} then { checkForFile $test_channel $fileName $constraint } runTest {test [appendArgs version-1.5. $i] \ [appendArgs "pattern {" $pattern "} in file \"" $fileName \"] -body { regexp -- $pattern [readFile $fileName] } -constraints [list eagle [appendArgs file_ $constraint]] -result {1}} } ############################################################################### |
︙ | ︙ |
|
| < > | 1 2 3 4 5 6 | *.exp *.lib *.map *Installer.* *EnvDTE.* *Microsoft.* |
︙ | ︙ | |||
23 24 25 26 27 28 29 | Externals/Eagle/lib/Eagle1.0/shell.eagle Externals/Eagle/lib/Eagle1.0/test.eagle Externals/Eagle/lib/Test1.0/constraints.eagle Externals/Eagle/lib/Test1.0/epilogue.eagle Externals/Eagle/lib/Test1.0/pkgIndex.eagle Externals/Eagle/lib/Test1.0/pkgIndex.tcl Externals/Eagle/lib/Test1.0/prologue.eagle | < < | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | Externals/Eagle/lib/Eagle1.0/shell.eagle Externals/Eagle/lib/Eagle1.0/test.eagle Externals/Eagle/lib/Test1.0/constraints.eagle Externals/Eagle/lib/Test1.0/epilogue.eagle Externals/Eagle/lib/Test1.0/pkgIndex.eagle Externals/Eagle/lib/Test1.0/pkgIndex.tcl Externals/Eagle/lib/Test1.0/prologue.eagle Externals/MSVCPP/* Membership/* Membership/obj/* Membership/Profile/* Membership/SiteMap/* obj/* Setup/Output/* SQLite.Designer/obj/* |
︙ | ︙ |
1 2 3 4 5 6 7 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET SQLite Data Provider<br /> | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET SQLite Data Provider<br /> Version 1.0.75.0 October 3, 2011<br /> Using SQLite 3.7.8 <a href="http://www.sqlite.org/src/info/3e0da808d2">[3e0da808d2]</a><br /> Originally written by Robert Simpson<br /> Released to the public domain, use at your own risk!<br /> Official provider website: <a href="http://system.data.sqlite.org/">http://system.data.sqlite.org/</a><br /> Legacy versions: <a href="http://sqlite.phxsoftware.com/">http://sqlite.phxsoftware.com/</a><br /> <br /> The current development version can be downloaded from <a href="http://system.data.sqlite.org/index.html/timeline?n=20&y=ci"> http://system.data.sqlite.org/index.html/timeline?n=20&y=ci</a> <br /> <br /> <h2><b>Features</b></h2> <ul> <li> |
︙ | ︙ | |||
52 53 54 55 56 57 58 | <li> Visual Studio design-time Support, works with all versions of Visual Studio 2005/2008/2010. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc. <br /> <font color="red"> | > | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | <li> Visual Studio design-time Support, works with all versions of Visual Studio 2005/2008/2010. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc. <br /> <font color="red"> Currently not included. We are still updating the design-time support installer. Due to Visual Studio licensing restrictions, the Express Editions can no longer be supported. </font> </li> <li> Full SQLite schema editing inside Visual Studio. You can create/edit tables, views, triggers, indexes, check constraints and foreign keys. </li> |
︙ | ︙ | |||
126 127 128 129 130 131 132 133 | <li> Full source for the entire engine and wrapper. No copyrights. Public Domain. 100% free for commercial and non-commercial use. </li> </ul> <h2><strong>Design-Time Support</strong></h2> <p> | > > < > > | < | | | 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 | <li> Full source for the entire engine and wrapper. No copyrights. Public Domain. 100% free for commercial and non-commercial use. </li> </ul> <h2><strong>Design-Time Support</strong></h2> <font color="red">Currently not included. We are still updating the Design-Time support installer.</font> <p> In Windows Explorer, navigate to the <strong>SQLite.NET\bin\Designer</strong> folder and execute the <strong>INSTALL.EXE</strong> file. The program will automatically detect what version(s) of Visual Studio 2005/2008 are installed and allow you to selectively install and uninstall the designer for each edition.</p> <h2> <strong>DbFactory Support (Non-Compact Framework)</strong></h2> In order to use the SQLiteFactory and have the SQLite data provider enumerated in the DbProviderFactories methods, you must add the following segment into your application's app.config file:<br /> <pre> <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> </DbProviderFactories> </system.data> </configuration> </pre> <p> See the help documentation for further details on implementing both version-specific (GAC enabled) and version independent DBProviderFactories support. |
︙ | ︙ | |||
174 175 176 177 178 179 180 | to distribute both the CF version of System.Data.SQLite.DLL, as well as the SQLite.Interop.XXX.DLL. This is a breaking change as of 1.0.59.0. Recent Windows Mobile frameworks are not supporting the mixed CF assembly I was building prior to this version.</p> <h2><b>Development Notes Regarding the SQLite 3 Source Code</b></h2> <p> | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 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 | to distribute both the CF version of System.Data.SQLite.DLL, as well as the SQLite.Interop.XXX.DLL. This is a breaking change as of 1.0.59.0. Recent Windows Mobile frameworks are not supporting the mixed CF assembly I was building prior to this version.</p> <h2><b>Development Notes Regarding the SQLite 3 Source Code</b></h2> <p> The core sqlite engine is compiled directly from the unmodified source code available at the sqlite.org website. Several additional pieces are compiled on top of it to extend its functionality, but the core engine's source is not changed.</p> <p> </p> <h2><b>Version History</b></h2> <p> <b>1.0.76.0 - October 4, 2011</b> </p> <ul> <li>Prevent the domain unload event handler in SQLiteLog from being registered multiple times. Fix for [0d5b1ef362].</li> <li>Stop allowing non-default application domains to initialize the SQLiteLog class. Fix for [ac47dd230a].</li> </ul> <p> <b>1.0.75.0 - October 3, 2011</b> </p> <ul> <li>Updated to SQLite 3.7.8 <a href="http://www.sqlite.org/src/info/3e0da808d2">[3e0da808d2]</a>.</li> <li>More enhancements to the build system.</li> <li>Add official <a href="http://www.nuget.org/">NuGet</a> packages for x86 and x64.</li> <li>Add Changes and LastInsertRowId properties to the connection class.</li> <li>Support more formats when converting data from/to the DateTime type.</li> <li>Make all the assembly versioning attributes consistent.</li> <li>Add unit testing infrastructure using <a href="http://eagle.to/">Eagle</a>.</li> <li>Integrate all legacy unit tests, including the "testlinq" project, into the new test suite.</li> |
︙ | ︙ | |||
261 262 263 264 265 266 267 | <li>Fix incorrect resource name for SR.resx in the mixed-mode assembly.</li> <li>Reduce the number of String.Compare() calls in the hot path for SQLiteCommand.ExecuteReader().</li> </ul> <p> <b>1.0.74.0 - July 4, 2011</b> </p> <ul> | | | | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | <li>Fix incorrect resource name for SR.resx in the mixed-mode assembly.</li> <li>Reduce the number of String.Compare() calls in the hot path for SQLiteCommand.ExecuteReader().</li> </ul> <p> <b>1.0.74.0 - July 4, 2011</b> </p> <ul> <li>Updated to SQLite 3.7.7.1 <a href="http://www.sqlite.org/src/info/af0d91adf4">[af0d91adf4]</a>.</li> <li>Fix incorrect hard-coded .NET Framework version information SQLiteFactory_Linq.cs that was causing IServiceProvider.GetService to fail when running against the .NET Framework 3.5.</li> <li>Fix all XML documentation warnings.</li> <li>Restore support for the mixed-mode assembly (i.e. the one that can be registered in the Global Assembly Cache).</li> <li>Restore support for the Compact Framework.</li> <li>Remove unused "using" statements from the System.Data.SQLite and System.Data.SQLite.Linq projects.</li> <li>Remove hard-coded System.Data.SQLite.Linq version from SQLiteFactory_Linq.cs</li> <li>Modify the setup to support bundled packages (i.e. with the mixed-mode assembly) and standard packages (i.e. with the managed assembly separate from the native interop library).</li> <li>Disable the ability to register with the Global Assembly Cache in the standard setup package (i.e. it is available in the bundled setup only).</li> <li>Remove PATH modification from the setup.</li> <li>Modify the naming scheme for the source, setup, and binary packages to allow for the necessary variants.</li> <li>In the build automation, attempt to automatically detect if Visual Studio 2008 and/or 2010 are installed and support building binaries for both at once, when available.</li> <li>Add release automation to build the source, setup, and binary packages in all supported build variants.</li> <li>Add the testlinq project to the new build system and make it work properly with Visual Studio 2008 and 2010.</li> </ul> <p> <b>1.0.73.0 - June 2, 2011</b> </p> <ul> <li>Updated to SQLite 3.7.6.3 <a href="http://www.sqlite.org/src/info/ed1da510a2">[ed1da510a2]</a> <li>Minor optimization to GetBytes(). Fix for [8c1650482e].</li> <li>Update various assembly information settings.</li> <li>Correct System.Data.SQLite.Linq version and resource information. Fix for [6489c5a396] and [133daf50d6].</li> <li>Moved log handler from SQLiteConnection object to SQLiteFactory object to prevent if from being prematurely GCed.</li> <li>We should block x64 installs on x86 and we should install native only if the setup package itself is native. Fix for [e058ce156e].</li> </ul> <p> |
︙ | ︙ | |||
305 306 307 308 309 310 311 | to get additional Windows error logging.</li> <li>Updated setup to optionally add install directory to PATH if GAC option selected.</li> </ul> <p> <b>1.0.70.0 - April 22, 2011</b> </p> <ul> | | | | | | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | to get additional Windows error logging.</li> <li>Updated setup to optionally add install directory to PATH if GAC option selected.</li> </ul> <p> <b>1.0.70.0 - April 22, 2011</b> </p> <ul> <li>Added support for sqlite3_extended_result_codes(), sqlite3_errcode(), and sqlite3_extended_errcode() via SetExtendedResultCodes(), ResultCode(), and ExtendedResultCode().</li> <li>Added support for SQLITE_CONFIG_LOG via SQLiteLogEventHandler().</li> </ul> <p> <b>1.0.69.0 - April 12, 2011</b> </p> <ul> <li>Code merge with SQLite 3.7.6</li> <li>New VS2008 and VS2010 solution files</li> <li>Build and packaging automation</li> <li>New Inno Setup files</li> <li>Designer support currently not ready for release</li> </ul> <p> <b>1.0.68.0 - February 2011</b> </p> <ul> <li>Code merge with SQLite 3.7.5</li> <li>Continuing work on supporting Visual Studio 2010</li> </ul> <p> <b>1.0.67.0 - January 3, 2011</b></p> <ul> <li>Code merge with SQLite 3.7.4</li> <li>Continuing work on supporting Visual Studio 2010</li> </ul> <p> <b>1.0.66.1 - August 1, 2010</b></p> <ul> <li>Code merge with SQLite 3.7.0.1</li> <li>Re-enabled VS2005 designer support, broken in previous versions during the 2008 |
︙ | ︙ | |||
844 845 846 847 848 849 850 | <ul> <li>Code merge with SQLite 3.3.10</li> <li>Fixed a multi-threaded race condition bug in the garbage collector when commands and/or connections are not properly disposed by the user. </li> <li>Switched the encryption's internal deallocation code to use sqlite's built-in aux functions instead of modifying the pager.c source to free the crypt block. This eliminates the last of the code changes the provider makes to the original | | | 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | <ul> <li>Code merge with SQLite 3.3.10</li> <li>Fixed a multi-threaded race condition bug in the garbage collector when commands and/or connections are not properly disposed by the user. </li> <li>Switched the encryption's internal deallocation code to use sqlite's built-in aux functions instead of modifying the pager.c source to free the crypt block. This eliminates the last of the code changes the provider makes to the original sqlite engine sources. Props to Ralf Junker for pointing that out.</li> </ul> <p> <b>1.0.38.0 - November 22, 2006</b></p> <ul> <li>Fixed a bug when using CommandBehavior.KeyInfo whereby integer primary key columns may be duplicated in the results. </li> <li>Enhanced the CommandBuilder so that update/delete statements are optimized when |
︙ | ︙ | |||
1141 1142 1143 1144 1145 1146 1147 | connection string, or call ChangePassword() you may use a binary byte array or a text string as the password.</li> <li>Rewrote the locking implementation for the Compact Framework. It is now more robust and incorporates into the SQLite codebase more efficiently than the previous CE adaptation.</li> <li>Moved some of the embedded schema XML data into a resource file to ease code readability.</li> | | | 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | connection string, or call ChangePassword() you may use a binary byte array or a text string as the password.</li> <li>Rewrote the locking implementation for the Compact Framework. It is now more robust and incorporates into the SQLite codebase more efficiently than the previous CE adaptation.</li> <li>Moved some of the embedded schema XML data into a resource file to ease code readability.</li> <li>Automated the fixup of the original sqlite codebase's source prior to compiling, to ease merging with sqlite.org's source.</li> <li>Fixed a memory leak in SQLiteCommand due to it not removing an internal reference to itself in SQLiteConnection. </li> </ul> <p> <b>1.0.24.2 - December 30, 2005</b></p> <ul> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("System.Data.SQLite Tester")] |
︙ | ︙ | |||
34 35 36 37 38 39 40 | // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // | | | | 27 28 29 30 31 32 33 34 35 | // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Diagnostics; using System.Windows.Forms; namespace test { class Program |
︙ | ︙ | |||
30 31 32 33 34 35 36 | { // do nothing. } Debugger.Break(); } | < | < < < < | | | | | | | < < < < < < < < | | | | | < | | 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 | { // do nothing. } Debugger.Break(); } bool autoRun = false; if ((args != null) && (args.Length > 0)) { string arg = args[0]; if (arg != null) { arg = arg.TrimStart(new char[] { '-', '/' }); if (String.Equals(arg, "autoRun", StringComparison.OrdinalIgnoreCase)) { autoRun = true; } } } Application.Run(new TestCasesDialog(autoRun)); } } } |
|
| < < < < < < < | 1 2 3 4 5 6 7 | //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Data.Common; using System.Data; using System.Data.SQLite; using System.Transactions; using System.Collections.Generic; using System.Text; |
︙ | ︙ | |||
115 116 117 118 119 120 121 | cnn.Open(); // Decrpyt database cnn.ChangePassword(""); cnn.Close(); | < < < < < < < < < < < < < < < < < < < < < < | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | cnn.Open(); // Decrpyt database cnn.ChangePassword(""); cnn.Close(); // Try opening now without password cnn.Open(); cnn.Close(); } } |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace test { partial class TestCasesDialog { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Collections.Generic; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.Common; |
︙ | ︙ | |||
28 29 30 31 32 33 34 | /// If set, then automatically run all the tests and exit. /// </summary> private bool _autoRun; private TestCases _test; private TestCases _testitems; | | | | 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 | /// If set, then automatically run all the tests and exit. /// </summary> private bool _autoRun; private TestCases _test; private TestCases _testitems; public TestCasesDialog(bool autoRun) { InitializeComponent(); using (DataTable tbl = DbProviderFactories.GetFactoryClasses()) { foreach (DataRow row in tbl.Rows) { string prov = row[2].ToString(); if (prov.IndexOf("SQLite", 0, StringComparison.OrdinalIgnoreCase) != -1 || prov.IndexOf("SqlClient", 0, StringComparison.OrdinalIgnoreCase) != -1 ) _provider.Items.Add(prov); if (prov == "System.Data.SQLite") _provider.SelectedItem = prov; } } _connectionString.Items.Add("Data Source=Test.db3;Pooling=true;FailIfMissing=false"); _connectionString.Items.Add("Data Source=(local);Initial Catalog=sqlite;Integrated Security=True;Max Pool Size=10"); _connectionString.SelectedIndex = 0; _autoRun = autoRun; _testitems = new TestCases(); foreach (KeyValuePair<string, bool> pair in _testitems.Tests) { |
︙ | ︙ |
1 2 3 4 | <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> | | | 1 2 3 4 5 6 7 8 | <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.76.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /> </DbProviderFactories> </system.data> </configuration> |
︙ | ︙ | |||
15 16 17 18 19 20 21 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>test</RootNamespace> <AssemblyName>test</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{E27B1B1E-19C0-45E8-AA74-B6E1C041A130}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>test</RootNamespace> <AssemblyName>test</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> <SQLiteNetDir>$(MSBuildProjectDirectory)\..</SQLiteNetDir> <ConfigurationYear>2010</ConfigurationYear> </PropertyGroup> <Import Project="$(SQLiteNetDir)\SQLite.NET.Settings.targets" /> <PropertyGroup Condition="'$(BinaryOutputPath)' != ''"> <OutputPath>$(BinaryOutputPath)</OutputPath> </PropertyGroup> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("System.Data.SQLite Tester for Windows CE")] |
︙ | ︙ | |||
34 35 36 37 38 39 40 | // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // | | | | 27 28 29 30 31 32 33 34 35 36 | // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
|
| < < < < < < < | 1 2 3 4 5 6 7 | namespace test { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Windows.Forms; namespace test { public partial class Form1 : Form { |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Data.Common; using System.Data; using System.Data.SQLite; namespace test { |
︙ | ︙ |
1 2 3 4 5 | <?xml version="1.0"?> <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> | | | 1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0"?> <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.76.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /> </DbProviderFactories> </system.data> <connectionStrings> <add name="northwindEFEntities" connectionString="metadata=res://*/NorthwindModel2008.csdl|res://*/NorthwindModel2008.ssdl|res://*/NorthwindModel2008.msl;provider=System.Data.SQLite;provider connection string="data source=.\northwindEF.db"" providerName="System.Data.EntityClient" /> </connectionStrings> </configuration> |
1 2 3 4 5 | <?xml version="1.0"?> <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> | | | 1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0"?> <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.76.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /> </DbProviderFactories> </system.data> <connectionStrings> <add name="northwindEFEntities" connectionString="metadata=res://*/NorthwindModel2010.csdl|res://*/NorthwindModel2010.ssdl|res://*/NorthwindModel2010.msl;provider=System.Data.SQLite;provider connection string="data source=.\northwindEF.db"" providerName="System.Data.EntityClient" /> </connectionStrings> </configuration> |
|
| < < < < < < < | 1 2 3 4 5 6 7 | //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:2.0.50727.3053 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. |
︙ | ︙ |
1 | <?xml version="1.0" encoding="utf-8"?> | < < < < < < < < < < | 1 2 3 4 5 6 7 8 | <?xml version="1.0" encoding="utf-8"?> <edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"> <!-- EF Runtime content --> <edmx:Runtime> <!-- SSDL content --> <edmx:StorageModels> <Schema Namespace="northwindEFModel.Store" Alias="Self" Provider="System.Data.SQLite" ProviderManifestToken="ISO8601" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl"> <EntityContainer Name="northwindEFModelStoreContainer"> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | //------------------------------------------------------------------------------ // <auto-generated> // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // </auto-generated> |
︙ | ︙ |
1 | <?xml version="1.0" encoding="utf-8"?> | < < < < < < < < < < | 1 2 3 4 5 6 7 8 | <?xml version="1.0" encoding="utf-8"?> <edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx"> <!-- EF Runtime content --> <edmx:Runtime> <!-- SSDL content --> <edmx:StorageModels> <Schema Namespace="northwindEFModel.Store" Alias="Self" Provider="System.Data.SQLite" ProviderManifestToken="ISO8601" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl"> <EntityContainer Name="northwindEFModelStoreContainer"> |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System; using System.Diagnostics; using System.Linq; using System.Data.Objects; using System.Text; using System.Transactions; |
︙ | ︙ |
|
| < < < < < < < | 1 2 3 4 5 6 7 | using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("System.Data.SQLite Tester for LINQ")] |
︙ | ︙ | |||
37 38 39 40 41 42 43 | // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] | | | | 30 31 32 33 34 35 36 37 38 | // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
︙ | ︙ | |||
15 16 17 18 19 20 21 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>testlinq</RootNamespace> <AssemblyName>testlinq</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{9D3CF7A6-092A-4B05-B0E4-BEF6944525B3}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>testlinq</RootNamespace> <AssemblyName>testlinq</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> <SQLiteNetDir>$(MSBuildProjectDirectory)\..</SQLiteNetDir> <ConfigurationYear>2010</ConfigurationYear> </PropertyGroup> <Import Project="$(SQLiteNetDir)\SQLite.NET.Settings.targets" /> <PropertyGroup Condition="'$(BinaryOutputPath)' != ''"> <OutputPath>$(BinaryOutputPath)</OutputPath> </PropertyGroup> |
︙ | ︙ |
︙ | ︙ | |||
14 15 16 17 18 19 20 | <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A41FE2A5-07AD-4CE7-B836-1544634816F5}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>Installer</RootNamespace> <AssemblyName>Installer</AssemblyName> | < < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A41FE2A5-07AD-4CE7-B836-1544634816F5}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>Installer</RootNamespace> <AssemblyName>Installer</AssemblyName> <OldToolsVersion>2.0</OldToolsVersion> <SQLiteNetDir>$(MSBuildProjectDirectory)\..\..</SQLiteNetDir> <NetFx20>true</NetFx20> <ConfigurationYear>2008</ConfigurationYear> </PropertyGroup> <Import Project="$(SQLiteNetDir)\SQLite.NET.Settings.targets" /> <PropertyGroup Condition="'$(BinaryOutputPath)' != ''"> <OutputPath>$(BinaryOutputPath)</OutputPath> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> |
︙ | ︙ | |||
48 49 50 51 52 53 54 | <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Installer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> | < < < < < < < < < < | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Installer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> |
︙ | ︙ | |||
14 15 16 17 18 19 20 | <ProductVersion>10.0.30319</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A41FE2A5-07AD-4CE7-B836-1544634816F5}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>Installer</RootNamespace> <AssemblyName>Installer</AssemblyName> | < < < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <ProductVersion>10.0.30319</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A41FE2A5-07AD-4CE7-B836-1544634816F5}</ProjectGuid> <AppDesignerFolder>Properties</AppDesignerFolder> <OutputType>Exe</OutputType> <RootNamespace>Installer</RootNamespace> <AssemblyName>Installer</AssemblyName> <OldToolsVersion>3.5</OldToolsVersion> <SQLiteNetDir>$(MSBuildProjectDirectory)\..\..</SQLiteNetDir> <ConfigurationYear>2010</ConfigurationYear> </PropertyGroup> <Import Project="$(SQLiteNetDir)\SQLite.NET.Settings.targets" /> <PropertyGroup Condition="'$(BinaryOutputPath)' != ''"> <OutputPath>$(BinaryOutputPath)</OutputPath> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> |
︙ | ︙ | |||
48 49 50 51 52 53 54 | <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Installer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> | < < < < < < < < < < | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Installer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> |
1 2 3 4 5 6 7 | /* * Installer.cs -- * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! */ | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /* * Installer.cs -- * * Written by Joe Mistachkin. * Released to the public domain, use at your own risk! */ using System.Collections.Generic; using System.Diagnostics; using System.EnterpriseServices.Internal; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; |
︙ | ︙ | |||
31 32 33 34 35 36 37 | string fileName, string invariant, string name, string description, string typeName, AssemblyName assemblyName, object clientData, | < < | < < | | > > > < < | 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 | string fileName, string invariant, string name, string description, string typeName, AssemblyName assemblyName, object clientData, bool whatIf, bool verbose, ref bool saved, ref string error ); /////////////////////////////////////////////////////////////////////////// internal delegate bool FrameworkRegistryCallback( RegistryKey rootKey, string frameworkName, Version frameworkVersion, string platformName, object clientData, bool whatIf, bool verbose, ref string error ); /////////////////////////////////////////////////////////////////////////// internal delegate bool VisualStudioRegistryCallback( RegistryKey rootKey, Version vsVersion, Guid packageId, Guid serviceId, Guid dataSourceId, Guid dataProviderId, object clientData, bool whatIf, bool verbose, ref string error ); #endregion /////////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
85 86 87 88 89 90 91 | DbProviderFactory = 0x4, VsPackage = 0x8, VsDataSource = 0x10, VsDataProvider = 0x20, Framework = GAC | AssemblyFolders | DbProviderFactory, Vs = VsPackage | VsDataSource | VsDataProvider, All = Framework | Vs, | < < < < < < < < < < < < < < < < < < < | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | DbProviderFactory = 0x4, VsPackage = 0x8, VsDataSource = 0x10, VsDataProvider = 0x20, Framework = GAC | AssemblyFolders | DbProviderFactory, Vs = VsPackage | VsDataSource | VsDataProvider, All = Framework | Vs, Default = All } #endregion /////////////////////////////////////////////////////////////////////////// #region Installer Class internal static class Installer { |
︙ | ︙ | |||
171 172 173 174 175 176 177 | /////////////////////////////////////////////////////////////////////// #region TraceOps Class private static class TraceOps { #region Private Constants | < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < | < | | < < | | < < < < < < < < < < < | | < < < < < < < | 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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | /////////////////////////////////////////////////////////////////////// #region TraceOps Class private static class TraceOps { #region Private Constants private const string Iso8601DateTimeOutputFormat = "yyyy.MM.ddTHH:mm:ss.fffffff"; #endregion /////////////////////////////////////////////////////////////////// #region Private Data private static object syncRoot = new object(); private static long nextId; #endregion /////////////////////////////////////////////////////////////////// #region Interactive Support Methods public static string GetAssemblyTitle( Assembly assembly ) { if (assembly != null) { try { if (assembly.IsDefined( typeof(AssemblyTitleAttribute), false)) { AssemblyTitleAttribute title = (AssemblyTitleAttribute) assembly.GetCustomAttributes( typeof(AssemblyTitleAttribute), false)[0]; return title.Title; } } catch { // do nothing. } } return null; } /////////////////////////////////////////////////////////////////// public static DialogResult ShowMessage( TraceCallback traceCallback, Assembly assembly, string message, string category, MessageBoxButtons buttons, MessageBoxIcon icon ) { DialogResult result = DialogResult.OK; Trace(traceCallback, message, category); if (SystemInformation.UserInteractive) { string title = GetAssemblyTitle(assembly); if (title == null) title = Application.ProductName; result = MessageBox.Show(message, title, buttons, icon); Trace(traceCallback, String.Format( "User choice of \"{0}\".", result), category); return result; } Trace(traceCallback, String.Format( "Default choice of \"{0}\".", result), category); return result; } #endregion /////////////////////////////////////////////////////////////////// #region Tracing Support Methods public static long NextId() { return Interlocked.Increment(ref nextId); } /////////////////////////////////////////////////////////////////// public static string TimeStamp(DateTime dateTime) { return dateTime.ToString(Iso8601DateTimeOutputFormat); |
︙ | ︙ | |||
368 369 370 371 372 373 374 | } return null; } /////////////////////////////////////////////////////////////////// | < < < < < < < < < < < < < < < < < < < < < < < < | | | < < | | | < < < < | | < < < < < < < | < < < < < | < | < < < < < | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | } return null; } /////////////////////////////////////////////////////////////////// public static void TraceCore( string message, string category ) { lock (syncRoot) { System.Diagnostics.Trace.WriteLine(message, category); System.Diagnostics.Trace.Flush(); } } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static string Trace( TraceCallback traceCallback, Exception exception, string category ) { if (exception != null) return Trace(traceCallback, new StackTrace(exception, true), 0, exception.ToString(), category); return null; } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static string Trace( TraceCallback traceCallback, string message, string category ) { return Trace(traceCallback, null, 1, message, category); } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] private static string Trace( TraceCallback traceCallback, StackTrace stackTrace, int level, string message, string category ) { // // NOTE: Always skip this call frame if the stack trace is // going to be captured by GetMethodName. // if (stackTrace == null) level++; if (traceCallback == null) traceCallback = TraceCore; traceCallback(String.Format("{0}: {1}", GetMethodName(stackTrace, level), message), category); return message; } #endregion } #endregion /////////////////////////////////////////////////////////////////////// #region MockRegistryKey Class private sealed class MockRegistryKey : IDisposable { #region Private Constructors private MockRegistryKey() { whatIf = true; } #endregion /////////////////////////////////////////////////////////////////// #region Public Constructors public MockRegistryKey( |
︙ | ︙ | |||
914 915 916 917 918 919 920 | this.whatIf = whatIf; } /////////////////////////////////////////////////////////////////// public MockRegistryKey( RegistryKey key, | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | this.whatIf = whatIf; } /////////////////////////////////////////////////////////////////// public MockRegistryKey( RegistryKey key, bool whatIf ) : this(key, null, whatIf) { // do nothing. } #endregion /////////////////////////////////////////////////////////////////// #region Public Methods |
︙ | ︙ | |||
993 994 995 996 997 998 999 | /////////////////////////////////////////////////////////////////// public MockRegistryKey CreateSubKey( string subKeyName ) { CheckDisposed(); | < | < | < | | < < | < | < < | | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | /////////////////////////////////////////////////////////////////// public MockRegistryKey CreateSubKey( string subKeyName ) { CheckDisposed(); if (key == null) return null; if (whatIf) { // // HACK: Attempt to open the specified sub-key. If this // fails, we will simply return the wrapped root key // itself since no writes are allowed in 'what-if' // mode anyhow. // RegistryKey subKey = key.OpenSubKey(subKeyName); return (subKey != null) ? new MockRegistryKey(subKey) : new MockRegistryKey(key, subKeyName); } else { return new MockRegistryKey( key.CreateSubKey(subKeyName), false); } } /////////////////////////////////////////////////////////////////// public void DeleteSubKey( string subKeyName ) { CheckDisposed(); if (key == null) return; if (!whatIf) key.DeleteSubKey(subKeyName); } /////////////////////////////////////////////////////////////////// public void DeleteSubKeyTree( string subKeyName ) { CheckDisposed(); if (key == null) return; if (!whatIf) key.DeleteSubKeyTree(subKeyName); } /////////////////////////////////////////////////////////////////// public void DeleteValue( string name ) { CheckDisposed(); if (key == null) return; if (!whatIf) key.DeleteValue(name); } /////////////////////////////////////////////////////////////////// public string[] GetSubKeyNames() { CheckDisposed(); |
︙ | ︙ | |||
1118 1119 1120 1121 1122 1123 1124 | public MockRegistryKey OpenSubKey( string subKeyName, bool writable ) { CheckDisposed(); | < < < | < | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | public MockRegistryKey OpenSubKey( string subKeyName, bool writable ) { CheckDisposed(); if (key == null) return null; RegistryKey subKey = key.OpenSubKey( subKeyName, whatIf ? false : writable); return (subKey != null) ? new MockRegistryKey(subKey, whatIf) : null; } /////////////////////////////////////////////////////////////////// public void SetValue( string name, object value ) { CheckDisposed(); if (key == null) return; if (!whatIf) key.SetValue(name, value); } |
︙ | ︙ | |||
1172 1173 1174 1175 1176 1177 1178 | } /////////////////////////////////////////////////////////////////// private RegistryKey key; public RegistryKey Key { | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > > | 623 624 625 626 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 | } /////////////////////////////////////////////////////////////////// private RegistryKey key; public RegistryKey Key { get { CheckDisposed(); return key; } } /////////////////////////////////////////////////////////////////// private string subKeyName; public string SubKeyName { get { CheckDisposed(); return subKeyName; } } /////////////////////////////////////////////////////////////////// private bool whatIf; public bool WhatIf { get { CheckDisposed(); return whatIf; } } #endregion /////////////////////////////////////////////////////////////////// #region System.Object Overrides public override string ToString() { CheckDisposed(); return this.Name; } #endregion /////////////////////////////////////////////////////////////////// #region Implicit Conversion Operators // // BUGBUG: The 'what-if' mode setting here should probably be based // on some static property, not hard-coded to true? // public static implicit operator MockRegistryKey( RegistryKey key ) { return new MockRegistryKey(key, null, true); } /////////////////////////////////////////////////////////////////// // // BUGBUG: Remove me? This should be safe because in 'what-if' // mode all keys are opened read-only. // public static implicit operator RegistryKey( MockRegistryKey key ) |
︙ | ︙ | |||
1272 1273 1274 1275 1276 1277 1278 | #region IDisposable "Pattern" Members private bool disposed; private void CheckDisposed() /* throw */ { if (!disposed) return; | | < | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | #region IDisposable "Pattern" Members private bool disposed; private void CheckDisposed() /* throw */ { if (!disposed) return; throw new ObjectDisposedException(typeof(MockRegistryKey).Name); } /////////////////////////////////////////////////////////////////// private /* protected virtual */ void Dispose( bool disposing ) |
︙ | ︙ | |||
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 | get { return keyValuesDeleted; } } #endregion /////////////////////////////////////////////////////////////////// #region Public Static Methods public static MockRegistryKey OpenSubKey( MockRegistryKey rootKey, string subKeyName, bool writable, bool whatIf, bool verbose ) { if (rootKey == null) return null; if (verbose) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < | | | | < | | | < | | | < | < < < | | | < | < | | | < < | < | | 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 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 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | get { return keyValuesDeleted; } } #endregion /////////////////////////////////////////////////////////////////// #region Public Static Methods public static RegistryKey GetRootKeyByName( string keyName ) { if (String.IsNullOrEmpty(keyName)) return null; switch (keyName.ToUpperInvariant()) { case "HKCR": case "HKEY_CLASSES_ROOT": return Registry.ClassesRoot; case "HKCC": case "HKEY_CURRENT_CONFIG": return Registry.CurrentConfig; case "HKCU": case "HKEY_CURRENT_USER": return Registry.CurrentUser; case "HKDD": case "HKEY_DYN_DATA": return Registry.DynData; case "HKLM": case "HKEY_LOCAL_MACHINE": return Registry.LocalMachine; case "HKPD": case "HKEY_PERFORMANCE_DATA": return Registry.PerformanceData; case "HKU": case "HKEY_USERS": return Registry.Users; } return null; } /////////////////////////////////////////////////////////////////// public static MockRegistryKey OpenSubKey( MockRegistryKey rootKey, string subKeyName, bool writable, bool whatIf, bool verbose ) { if (rootKey == null) return null; if (verbose) TraceOps.Trace(traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}, writable = {2}", ForDisplay(rootKey), ForDisplay(subKeyName), writable), traceCategory); // // HACK: Always forbid writable access when operating in // 'what-if' mode. // MockRegistryKey key = rootKey.OpenSubKey( subKeyName, whatIf ? false : writable); return (key != null) ? new MockRegistryKey(key, whatIf) : null; } /////////////////////////////////////////////////////////////////// public static MockRegistryKey CreateSubKey( MockRegistryKey rootKey, string subKeyName, bool whatIf, bool verbose ) { if (rootKey == null) return null; if (verbose) TraceOps.Trace(traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); try { // // HACK: Always open a key, rather than creating one when // operating in 'what-if' mode. // if (whatIf) { // // HACK: Attempt to open the specified sub-key. If // this fails, we will simply return the root key // itself since no writes are allowed in // 'what-if' mode anyhow. // MockRegistryKey key = rootKey.OpenSubKey(subKeyName); return (key != null) ? key : new MockRegistryKey(rootKey, subKeyName); } else { return new MockRegistryKey( rootKey.CreateSubKey(subKeyName), false); } } finally { subKeysCreated++; } } /////////////////////////////////////////////////////////////////// public static void DeleteSubKey( MockRegistryKey rootKey, string subKeyName, bool whatIf, bool verbose ) { if (rootKey == null) return; if (verbose) TraceOps.Trace(traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (!whatIf) rootKey.DeleteSubKey(subKeyName); subKeysDeleted++; } /////////////////////////////////////////////////////////////////// public static void DeleteSubKeyTree( MockRegistryKey rootKey, string subKeyName, bool whatIf, bool verbose ) { if (rootKey == null) return; if (verbose) TraceOps.Trace(traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (!whatIf) rootKey.DeleteSubKeyTree(subKeyName); subKeysDeleted++; } /////////////////////////////////////////////////////////////////// public static string[] GetSubKeyNames( MockRegistryKey key, bool whatIf, bool verbose ) { if (key == null) return null; if (verbose) TraceOps.Trace(traceCallback, String.Format( "key = {0}", ForDisplay(key)), traceCategory); return key.GetSubKeyNames(); } /////////////////////////////////////////////////////////////////// public static object GetValue( MockRegistryKey key, string name, object defaultValue, bool whatIf, bool verbose ) { if (key == null) return null; if (verbose) TraceOps.Trace(traceCallback, String.Format( "key = {0}, name = {1}, defaultValue = {2}", ForDisplay(key), ForDisplay(name), ForDisplay(defaultValue)), traceCategory); return key.GetValue(name, defaultValue); } |
︙ | ︙ | |||
1559 1560 1561 1562 1563 1564 1565 | bool verbose ) { if (key == null) return; if (verbose) | < | | | < < < | | | 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 | bool verbose ) { if (key == null) return; if (verbose) TraceOps.Trace(traceCallback, String.Format( "key = {0}, name = {1}, value = {2}", ForDisplay(key), ForDisplay(name), ForDisplay(value)), traceCategory); if (!whatIf) key.SetValue(name, value); keyValuesSet++; } /////////////////////////////////////////////////////////////////// public static void DeleteValue( MockRegistryKey key, string name, bool whatIf, bool verbose ) { if (key == null) return; if (verbose) TraceOps.Trace(traceCallback, String.Format( "key = {0}, name = {1}", ForDisplay(key), ForDisplay(name)), traceCategory); if (!whatIf) key.DeleteValue(name); keyValuesDeleted++; } #endregion } #endregion |
︙ | ︙ | |||
1667 1668 1669 1670 1671 1672 1673 | // do nothing. } } #endregion /////////////////////////////////////////////////////////////////////// | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 | // do nothing. } } #endregion /////////////////////////////////////////////////////////////////////// #region Configuration Class private sealed class Configuration { #region Private Constants private const char Switch = '-'; private const char AltSwitch = '/'; |
︙ | ︙ | |||
1752 1753 1754 1755 1756 1757 1758 | private Configuration( Assembly assembly, string logFileName, string directory, string coreFileName, string linqFileName, string designerFileName, | < < < < < < < < < < < < < < < < | 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 | private Configuration( Assembly assembly, string logFileName, string directory, string coreFileName, string linqFileName, string designerFileName, InstallFlags installFlags, bool install, bool noDesktop, bool noCompact, bool noNetFx20, bool noNetFx40, bool noVs2008, bool noVs2010, bool noTrace, bool noConsole, bool noLog, bool whatIf, bool verbose, bool confirm ) { this.assembly = assembly; this.logFileName = logFileName; this.directory = directory; this.coreFileName = coreFileName; this.linqFileName = linqFileName; this.designerFileName = designerFileName; this.installFlags = installFlags; this.install = install; this.noDesktop = noDesktop; this.noCompact = noCompact; this.noNetFx20 = noNetFx20; this.noNetFx40 = noNetFx40; this.noVs2008 = noVs2008; this.noVs2010 = noVs2010; this.noTrace = noTrace; this.noConsole = noConsole; this.noLog = noLog; this.whatIf = whatIf; this.verbose = verbose; this.confirm = confirm; } #endregion /////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
1948 1949 1950 1951 1952 1953 1954 | string linqFileName = null; string designerFileName = null; GetDefaultFileNames( ref directory, ref coreFileName, ref linqFileName, ref designerFileName); | | | < | < | | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | string linqFileName = null; string designerFileName = null; GetDefaultFileNames( ref directory, ref coreFileName, ref linqFileName, ref designerFileName); return new Configuration( thisAssembly, null, directory, coreFileName, linqFileName, designerFileName, InstallFlags.Default, true, false, true, false, false, false, false, false, false, false, true, true, false); } /////////////////////////////////////////////////////////////////// public static bool FromArgs( string[] args, bool strict, |
︙ | ︙ | |||
1980 1981 1982 1983 1984 1985 1986 | int length = args.Length; for (int index = 0; index < length; index++) { string arg = args[index]; | < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | < < | | | | | | | | < < < < < < < < < | < < < < < < < < | < < | < < | | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > > > > > > > > > > | > | | | > > | > > > > > > > > > > > > > > | | | | | | | | | | | | | < | | | > > > | > > > > > > > > > > > > > > | | > | | | | | < < < < < < < < | | | | | | | < < | | | | | | | | | | < < < < < < < < < < < < < < < < < < < < < | | | | | < < | | | | | | | | | | | | | | | < < | | | | | | | | | | | | | | | < < | | | | | | | | | | | | | | | < < | | | | | | | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | < < | | | | | | | | | | | | | | | < < | | | | | | | | | | | | | | | | > > > | > > > > > > > > > > > > > > | | | | | | | | < < < < < | | | | | | | < < | | | | | | | | < < < < | < | < < < < | < < < | < < < | < < < < < < < < < < < < < < < < < < < < | < < < < < < < < | < < < < < < < < < < < < < | < | < < < < < < < < < < < < < < < < < < < < < < < < < < | | < | | 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 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 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 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 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 | int length = args.Length; for (int index = 0; index < length; index++) { string arg = args[index]; if (String.IsNullOrEmpty(arg)) continue; string newArg = arg; if (CheckOption(ref newArg)) { // // NOTE: All the supported command line options must // have a value; therefore, attempt to advance // to it now. If we fail, we are done. // index++; if (index >= length) { error = TraceOps.Trace( traceCallback, String.Format( "Missing value for option: {0}", ForDisplay(arg)), traceCategory); if (strict) return false; break; } // // NOTE: Grab the textual value of this command line // option. // string text = args[index]; // // NOTE: Figure out which command line option this is // (based on a partial name match) and then try // to interpret the textual value as the correct // type. // if (MatchOption(newArg, "strict")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } // // NOTE: Allow the command line arguments to override // the "strictness" setting provided by our caller. // strict = (bool)value; } else if (MatchOption(newArg, "logFileName")) { configuration.logFileName = text; } else if (MatchOption(newArg, "directory")) { configuration.directory = text; // // NOTE: *SPECIAL* Must refresh the file names // here because the underlying directory // has changed. // string coreFileName = configuration.coreFileName; if (!String.IsNullOrEmpty(coreFileName)) coreFileName = Path.GetFileName(coreFileName); if (String.IsNullOrEmpty(coreFileName)) coreFileName = Installer.CoreFileName; configuration.coreFileName = Path.Combine( configuration.directory, coreFileName); string linqFileName = configuration.linqFileName; if (!String.IsNullOrEmpty(linqFileName)) linqFileName = Path.GetFileName(linqFileName); if (String.IsNullOrEmpty(linqFileName)) linqFileName = Installer.LinqFileName; configuration.linqFileName = Path.Combine( configuration.directory, linqFileName); string designerFileName = configuration.designerFileName; if (!String.IsNullOrEmpty(designerFileName)) designerFileName = Path.GetFileName(designerFileName); if (String.IsNullOrEmpty(designerFileName)) designerFileName = Installer.DesignerFileName; configuration.designerFileName = Path.Combine( configuration.directory, designerFileName); } else if (MatchOption(newArg, "coreFileName")) { configuration.coreFileName = text; } else if (MatchOption(newArg, "linqFileName")) { configuration.linqFileName = text; } else if (MatchOption(newArg, "designerFileName")) { configuration.designerFileName = text; } else if (MatchOption(newArg, "installFlags")) { object value = ParseEnum( typeof(InstallFlags), text, true); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid install flags value: {0}", ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.installFlags = (InstallFlags)value; } else if (MatchOption(newArg, "install")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.install = (bool)value; } else if (MatchOption(newArg, "whatIf")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.whatIf = (bool)value; } else if (MatchOption(newArg, "verbose")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.verbose = (bool)value; } else if (MatchOption(newArg, "confirm")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.confirm = (bool)value; } else if (MatchOption(newArg, "noDesktop")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noDesktop = (bool)value; } else if (MatchOption(newArg, "noCompact")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noCompact = (bool)value; } else if (MatchOption(newArg, "noNetFx20")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noNetFx20 = (bool)value; } else if (MatchOption(newArg, "noNetFx40")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noNetFx40 = (bool)value; } else if (MatchOption(newArg, "noVs2008")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noVs2008 = (bool)value; } else if (MatchOption(newArg, "noVs2010")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noVs2010 = (bool)value; } else if (MatchOption(newArg, "noTrace")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noTrace = (bool)value; } else if (MatchOption(newArg, "noConsole")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noConsole = (bool)value; } else if (MatchOption(newArg, "noLog")) { bool? value = ParseBoolean(text); if (value == null) { error = TraceOps.Trace(traceCallback, String.Format( "Invalid {0} boolean value: {1}", ForDisplay(arg), ForDisplay(text)), traceCategory); if (strict) return false; continue; } configuration.noLog = (bool)value; } else { error = TraceOps.Trace(traceCallback, String.Format( "Unsupported command line option: {0}", ForDisplay(arg)), traceCategory); if (strict) return false; } } else { error = TraceOps.Trace(traceCallback, String.Format( "Unsupported command line argument: {0}", ForDisplay(arg)), traceCategory); if (strict) return false; } } return true; } catch (Exception e) { TraceOps.Trace(traceCallback, e, traceCategory); error = "Failed to modify configuration."; } return false; } |
︙ | ︙ | |||
2624 2625 2626 2627 2628 2629 2630 | } if (!configuration.noTrace) { if (!configuration.noLog && String.IsNullOrEmpty(configuration.logFileName)) { | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < | < < < < | < < < < < < < | | | | | < > | | | < < < < < < < < | 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 | } if (!configuration.noTrace) { if (!configuration.noLog && String.IsNullOrEmpty(configuration.logFileName)) { configuration.logFileName = GetLogFileName(); } /////////////////////////////////////////////////////// if (!configuration.noConsole) { Trace.Listeners.Add(new ConsoleTraceListener()); } if (!configuration.noLog && !String.IsNullOrEmpty(configuration.logFileName)) { Trace.Listeners.Add(new TextWriterTraceListener( configuration.logFileName)); } } // // NOTE: Dump the configuration now in case we need to // troubleshoot any issues. // configuration.Dump(); // // NOTE: Show where we are running from and how we were // invoked. // string location = assembly.Location; TraceOps.Trace(traceCallback, String.Format( "Original command line is: {0}", Environment.CommandLine), traceCategory); // // NOTE: If the debugger is attached and What-If mode is // [now] disabled, issue a warning. // if (!configuration.whatIf && Debugger.IsAttached) { TraceOps.Trace(traceCallback, "Forced to disable \"what-if\" mode with " + "debugger attached.", traceCategory); } // // NOTE: If the command line has not been manually // confirmed (i.e. via the explicit command line // option), then stop processing now. We enforce // this rule so that simply double-clicking the |
︙ | ︙ | |||
2742 2743 2744 2745 2746 2747 2748 | return false; } return true; } catch (Exception e) { | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 | return false; } return true; } catch (Exception e) { TraceOps.Trace(traceCallback, e, traceCategory); error = "Failed to process configuration."; } return false; } #endregion /////////////////////////////////////////////////////////////////// #region Public Methods public bool HasFlags( InstallFlags hasFlags, bool all ) { if (all) return ((installFlags & hasFlags) == hasFlags); else return ((installFlags & hasFlags) != InstallFlags.None); } /////////////////////////////////////////////////////////////////// public void Dump() { if (traceCallback != null) { traceCallback(String.Format(NameAndValueFormat, "Assembly", ForDisplay(assembly)), traceCategory); |
︙ | ︙ | |||
2920 2921 2922 2923 2924 2925 2926 | "LinqFileName", ForDisplay(linqFileName)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "DesignerFileName", ForDisplay(designerFileName)), traceCategory); | < < < < < < < < < < < < < < < < < < < < < < < < | 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 | "LinqFileName", ForDisplay(linqFileName)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "DesignerFileName", ForDisplay(designerFileName)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "InstallFlags", ForDisplay(installFlags)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "Install", ForDisplay(install)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "NoDesktop", ForDisplay(noDesktop)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "NoCompact", ForDisplay(noCompact)), traceCategory); |
︙ | ︙ | |||
2988 2989 2990 2991 2992 2993 2994 | "NoConsole", ForDisplay(noConsole)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "NoLog", ForDisplay(noLog)), traceCategory); | < < < < < < < < < < < < < < < < < < < < < < < | 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 | "NoConsole", ForDisplay(noConsole)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "NoLog", ForDisplay(noLog)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "WhatIf", ForDisplay(whatIf)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "Verbose", ForDisplay(verbose)), traceCategory); traceCallback(String.Format(NameAndValueFormat, "Confirm", ForDisplay(confirm)), traceCategory); } } #endregion /////////////////////////////////////////////////////////////////// #region Public Properties |
︙ | ︙ | |||
3083 3084 3085 3086 3087 3088 3089 | { get { return designerFileName; } set { designerFileName = value; } } /////////////////////////////////////////////////////////////////// | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 | { get { return designerFileName; } set { designerFileName = value; } } /////////////////////////////////////////////////////////////////// private InstallFlags installFlags; public InstallFlags InstallFlags { get { return installFlags; } set { installFlags = value; } } /////////////////////////////////////////////////////////////////// private bool install; public bool Install { get { return install; } set { install = value; } } /////////////////////////////////////////////////////////////////// private bool noDesktop; public bool NoDesktop { get { return noDesktop; } set { noDesktop = value; } |
︙ | ︙ | |||
3236 3237 3238 3239 3240 3241 3242 | { get { return noLog; } set { noLog = value; } } /////////////////////////////////////////////////////////////////// | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > | > | > > < | > | > | | < < < | | < > > | < < < > > > > > | < < < | < | | | < > | > | < | > > | < < < > | < < < < < < < < < < < < < < < < < < < < < < < < < < | 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 | { get { return noLog; } set { noLog = value; } } /////////////////////////////////////////////////////////////////// private bool whatIf; public bool WhatIf { get { return whatIf; } set { whatIf = value; } } /////////////////////////////////////////////////////////////////// private bool verbose; public bool Verbose { get { return verbose; } set { verbose = value; } } /////////////////////////////////////////////////////////////////// private bool confirm; public bool Confirm { get { return confirm; } set { confirm = value; } } #endregion } #endregion #endregion /////////////////////////////////////////////////////////////////////// #region Private Constant Data private const string CoreFileName = "System.Data.SQLite.dll"; private const string LinqFileName = "System.Data.SQLite.Linq.dll"; private const string DesignerFileName = "SQLite.Designer.dll"; private const string ProviderName = "SQLite Data Provider"; private const string ProjectName = "System.Data.SQLite"; private const string LegacyProjectName = "SQLite"; private const string InvariantName = "System.Data.SQLite"; private const string FactoryTypeName = "System.Data.SQLite.SQLiteFactory"; private const string Description = ".NET Framework Data Provider for SQLite"; /////////////////////////////////////////////////////////////////////// private const string NameAndValueFormat = "{0}: {1}"; private const string TraceFormat = "#{0} @ {1}: {2}"; private const string LogFileSuffix = ".log"; /////////////////////////////////////////////////////////////////////// private static readonly string VsIdFormat = "B"; /////////////////////////////////////////////////////////////////////// private static readonly string FrameworkKeyName = "Software\\Microsoft\\.NETFramework"; /////////////////////////////////////////////////////////////////////// private static readonly string FrameworkSdkKeyName = "Software\\Microsoft\\Microsoft SDKs\\.NETFramework"; /////////////////////////////////////////////////////////////////////// private static readonly string WindowsSdkKeyName = "Software\\Microsoft\\Microsoft SDKs\\Windows"; /////////////////////////////////////////////////////////////////////// private static readonly string XPathForAddElement = "configuration/system.data/DbProviderFactories/add[@invariant=\"{0}\"]"; private static readonly string XPathForRemoveElement = "configuration/system.data/DbProviderFactories/remove[@invariant=\"{0}\"]"; #endregion /////////////////////////////////////////////////////////////////////// #region Private Data private static Assembly thisAssembly = Assembly.GetExecutingAssembly(); private static string traceCategory = Path.GetFileName( thisAssembly.Location); private static TraceCallback traceCallback = AppTrace; /////////////////////////////////////////////////////////////////////// private static RegistryKey frameworkRootKey; private static StringList frameworkNameList; private static VersionMap frameworkVersionMap; private static StringList platformNameList; /////////////////////////////////////////////////////////////////////// private static RegistryKey vsRootKey; private static VersionList vsVersionList; private static Guid? vsPackageId; private static Guid? vsServiceId; private static Guid? vsDataSourcesId; private static Guid? vsDataProviderId; private static Guid? vsAdoNetTechnologyId; #endregion /////////////////////////////////////////////////////////////////////// #region Trace Handling private static string GetLogFileName() { string result = Path.GetTempFileName(); /* throw */ File.Move(result, result + LogFileSuffix); /* throw */ result += LogFileSuffix; return result; } /////////////////////////////////////////////////////////////////////// private static void AppTrace( string message, string category ) { TraceOps.TraceCore(String.Format( TraceFormat, TraceOps.NextId(), TraceOps.TimeStamp(DateTime.UtcNow), message), category); } #endregion /////////////////////////////////////////////////////////////////////// #region Generic String Handling private static string ForDisplay( object value |
︙ | ︙ | |||
3518 3519 3520 3521 3522 3523 3524 | if (type == typeof(XmlElement)) { XmlElement element = (XmlElement)value; result = element.OuterXml; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | < | < < < < | < | < | | | | | | < < | < | | | | | | | | < | | | | | | | | | | | < | < < | | | | | | < > > > > | | | | < < < < < < < < < < < < < < < < | | | | | | | | | | | | | < | | < | | < | | < | < | | | | < | | | | | | < | | < | < < < < < < < < < < < < < < < < | | | | | | | | | | | | | < | | < | | | | < | > > > > | > > > | > > > | | | > | > > | > > > | | | | | | < < < | | | 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 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 | if (type == typeof(XmlElement)) { XmlElement element = (XmlElement)value; result = element.OuterXml; } else { result = value.ToString(); if (result.Length == 0) return "<empty>"; result = String.Format( type.IsSubclassOf(typeof(ValueType)) ? "{0}" : "\"{0}\"", result); } return result; } #endregion /////////////////////////////////////////////////////////////////////// #region .NET Framework Handling private static string GetFrameworkDirectory( RegistryKey rootKey, Version frameworkVersion, bool whatIf, bool verbose ) { using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, FrameworkKeyName, false, whatIf, verbose)) { if (key == null) return null; object value = RegistryHelper.GetValue( key, "InstallRoot", null, whatIf, verbose); if (!(value is string)) return null; return Path.Combine( (string)value, String.Format("v{0}", frameworkVersion)); } } /////////////////////////////////////////////////////////////////////// private static string GetSdkBinaryFileName( RegistryKey rootKey, string fileName, bool whatIf, bool verbose ) { StringDictionary results = new StringDictionary(); string[] keyNames = { FrameworkKeyName, FrameworkSdkKeyName, WindowsSdkKeyName }; string[] valueNames = { "sdkInstallRootv2.0", "InstallationFolder", "InstallationFolder" }; bool[] useSubKeys = { false, true, true }; for (int index = 0; index < keyNames.Length; index++) { using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyNames[index], false, whatIf, verbose)) { if (key == null) continue; if (useSubKeys[index]) { foreach (string subKeyName in RegistryHelper.GetSubKeyNames( key, whatIf, verbose)) { using (MockRegistryKey subKey = RegistryHelper.OpenSubKey( key, subKeyName, false, whatIf, verbose)) { if (subKey == null) continue; object value = RegistryHelper.GetValue( subKey, valueNames[index], null, whatIf, verbose); if (!(value is string)) continue; string path = (string)value; if (!Directory.Exists(path)) continue; path = Path.Combine(path, "bin"); if (!Directory.Exists(path)) continue; if (String.IsNullOrEmpty(fileName)) { results.Add(subKey.Name, path); continue; } path = Path.Combine(path, fileName); if (File.Exists(path)) results.Add(subKey.Name, path); } } } else { object value = RegistryHelper.GetValue( key, valueNames[index], null, whatIf, verbose); if (!(value is string)) continue; string path = (string)value; if (!Directory.Exists(path)) continue; path = Path.Combine(path, "bin"); if (!Directory.Exists(path)) continue; if (String.IsNullOrEmpty(fileName)) { results.Add(key.Name, path); continue; } path = Path.Combine(path, fileName); if (File.Exists(path)) results.Add(key.Name, path); } } } // // NOTE: If we found some results, return the last (latest) one. // if (results.Count > 0) return results[new StringList(results.Keys)[results.Count - 1]]; return null; } #endregion /////////////////////////////////////////////////////////////////////// #region Per-Framework/Platform Handling private static void InitializeAllFrameworks( Configuration configuration ) { if (frameworkRootKey == null) frameworkRootKey = Registry.LocalMachine; if (frameworkNameList == null) { frameworkNameList = new StringList(); if ((configuration == null) || !configuration.NoDesktop) frameworkNameList.Add(".NETFramework"); if ((configuration == null) || !configuration.NoCompact) { frameworkNameList.Add(".NETCompactFramework"); frameworkNameList.Add(".NETCompactFramework"); frameworkNameList.Add(".NETCompactFramework"); } } if (frameworkVersionMap == null) frameworkVersionMap = new VersionMap(); if ((configuration == null) || !configuration.NoDesktop) { VersionList desktopVersionList = new VersionList(); if ((configuration == null) || !configuration.NoNetFx20) desktopVersionList.Add(new Version(2, 0, 50727)); if ((configuration == null) || !configuration.NoNetFx40) desktopVersionList.Add(new Version(4, 0, 30319)); frameworkVersionMap.Add(".NETFramework", desktopVersionList); } if ((configuration == null) || !configuration.NoCompact) { frameworkVersionMap.Add(".NETCompactFramework", new VersionList( new Version[] { new Version(2, 0, 0, 0), new Version(3, 5, 0, 0) })); } if (platformNameList == null) { platformNameList = new StringList(); if ((configuration == null) || !configuration.NoDesktop) platformNameList.Add(null); if ((configuration == null) || !configuration.NoCompact) { platformNameList.Add("PocketPC"); platformNameList.Add("Smartphone"); platformNameList.Add("WindowsCE"); } } } /////////////////////////////////////////////////////////////////////// private static bool HaveFramework( RegistryKey rootKey, string frameworkName, Version frameworkVersion, string platformName, bool whatIf, bool verbose ) { string format = !String.IsNullOrEmpty(platformName) ? "Software\\Microsoft\\{0}\\v{1}\\{2}" : "Software\\Microsoft\\{0}\\v{1}"; string keyName = String.Format( format, frameworkName, frameworkVersion, platformName); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) return false; if (platformName != null) // NOTE: Skip non-desktop frameworks. return true; string directory = GetFrameworkDirectory( rootKey, frameworkVersion, whatIf, verbose); if (String.IsNullOrEmpty(directory)) return false; if (!Directory.Exists(directory)) return false; return true; } } /////////////////////////////////////////////////////////////////////// private static bool ForEachFrameworkConfig( FrameworkConfigCallback callback, string invariant, string name, string description, string typeName, AssemblyName assemblyName, object clientData, bool whatIf, bool verbose, ref bool saved, ref string error ) { RegistryKey rootKey = frameworkRootKey; if (rootKey == null) { error = "invalid root key"; return false; } if (!Object.ReferenceEquals(rootKey, Registry.CurrentUser) && !Object.ReferenceEquals(rootKey, Registry.LocalMachine)) { error = "root key must be per-user or per-machine"; return false; } if (frameworkNameList == null) { error = "no framework names found"; return false; } if (frameworkVersionMap == null) { error = "no framework versions found"; return false; } if (platformNameList == null) { error = "no platform names found"; return false; } if (frameworkNameList.Count != platformNameList.Count) { error = String.Format("framework name count {0} does not " + "match platform name count {1}", frameworkNameList.Count, platformNameList.Count); return false; } for (int index = 0; index < frameworkNameList.Count; index++) { // // NOTE: Grab the name of the framework (e.g. ".NETFramework") // and the name of the platform (e.g. "WindowsCE"). // string frameworkName = frameworkNameList[index]; string platformName = platformNameList[index]; // // NOTE: Skip all non-desktop frameworks (i.e. if the platform // name is not null). // if (platformName != null) continue; // // NOTE: Grab the supported versions of this particular // framework. // VersionList frameworkVersionList; if (!frameworkVersionMap.TryGetValue( frameworkName, out frameworkVersionList) || (frameworkVersionList == null)) { continue; } foreach (Version frameworkVersion in frameworkVersionList) { TraceOps.Trace(traceCallback, String.Format( "frameworkName = {0}, frameworkVersion = {1}, " + "platformName = {2}", ForDisplay(frameworkName), ForDisplay(frameworkVersion), ForDisplay(platformName)), traceCategory); if (!HaveFramework( rootKey, frameworkName, frameworkVersion, platformName, whatIf, verbose)) { TraceOps.Trace(traceCallback, ".NET Framework not found, skipping...", traceCategory); continue; } if (callback == null) continue; string directory = GetFrameworkDirectory( rootKey, frameworkVersion, whatIf, verbose); if (String.IsNullOrEmpty(directory)) { TraceOps.Trace(traceCallback, String.Format( ".NET Framework v{0} directory is invalid, " + "skipping...", frameworkVersion), traceCategory); continue; } directory = Path.Combine(directory, "Config"); if (!Directory.Exists(directory)) { TraceOps.Trace(traceCallback, String.Format( ".NET Framework v{0} directory \"{1}\" does not " + "exist, skipping...", frameworkVersion, directory), traceCategory); continue; } string fileName = Path.Combine(directory, "machine.config"); if (!File.Exists(fileName)) { TraceOps.Trace(traceCallback, String.Format( ".NET Framework v{0} file \"{1}\" does not exist, " + "skipping...", frameworkVersion, fileName), traceCategory); continue; } bool localSaved = false; if (!callback( fileName, invariant, name, description, typeName, assemblyName, clientData, whatIf, verbose, ref localSaved, ref error)) { return false; } else { if (localSaved && !saved) saved = true; if (verbose) TraceOps.Trace(traceCallback, String.Format( "localSaved = {0}, saved = {1}", localSaved, saved), traceCategory); } } } return true; } /////////////////////////////////////////////////////////////////////// private static bool ForEachFrameworkRegistry( FrameworkRegistryCallback callback, object clientData, bool whatIf, bool verbose, ref string error ) { RegistryKey rootKey = frameworkRootKey; if (rootKey == null) { error = "invalid root key"; return false; } if (!Object.ReferenceEquals(rootKey, Registry.CurrentUser) && !Object.ReferenceEquals(rootKey, Registry.LocalMachine)) { error = "root key must be per-user or per-machine"; return false; } if (frameworkNameList == null) { error = "no framework names found"; return false; } if (frameworkVersionMap == null) { error = "no framework versions found"; return false; } if (platformNameList == null) { error = "no platform names found"; return false; } if (frameworkNameList.Count != platformNameList.Count) { error = String.Format("framework name count {0} does not " + "match platform name count {1}", frameworkNameList.Count, platformNameList.Count); return false; } for (int index = 0; index < frameworkNameList.Count; index++) { // // NOTE: Grab the name of the framework (e.g. ".NETFramework") // and the name of the platform (e.g. "WindowsCE"). // string frameworkName = frameworkNameList[index]; string platformName = platformNameList[index]; // // NOTE: Grab the supported versions of this particular // framework. // VersionList frameworkVersionList; if (!frameworkVersionMap.TryGetValue( frameworkName, out frameworkVersionList) || (frameworkVersionList == null)) { continue; } foreach (Version frameworkVersion in frameworkVersionList) { TraceOps.Trace(traceCallback, String.Format( "frameworkName = {0}, frameworkVersion = {1}, " + "platformName = {2}", ForDisplay(frameworkName), ForDisplay(frameworkVersion), ForDisplay(platformName)), traceCategory); if (!HaveFramework( rootKey, frameworkName, frameworkVersion, platformName, whatIf, verbose)) { TraceOps.Trace(traceCallback, ".NET Framework not found, skipping...", traceCategory); continue; } if (callback == null) continue; if (!callback( rootKey, frameworkName, frameworkVersion, platformName, clientData, whatIf, verbose, ref error)) { return false; } } } return true; } #endregion /////////////////////////////////////////////////////////////////////// #region Per-Visual Studio Version Handling private static void InitializeAllVsVersions( Configuration configuration ) { if (vsRootKey == null) vsRootKey = Registry.LocalMachine; if (vsAdoNetTechnologyId == null) vsAdoNetTechnologyId = new Guid( "77AB9A9D-78B9-4BA7-91AC-873F5338F1D2"); if (vsPackageId == null) vsPackageId = new Guid( "DCBE6C8D-0E57-4099-A183-98FF74C64D9C"); if (vsServiceId == null) vsServiceId = new Guid( "DCBE6C8D-0E57-4099-A183-98FF74C64D9D"); if (vsDataSourcesId == null) vsDataSourcesId = new Guid( "0EBAAB6E-CA80-4B4A-8DDF-CBE6BF058C71"); if (vsDataProviderId == null) vsDataProviderId = new Guid( "0EBAAB6E-CA80-4B4A-8DDF-CBE6BF058C70"); if (vsVersionList == null) { vsVersionList = new VersionList(); // vsVersionList.Add(new Version(8, 0)); // Visual Studio 2005 if ((configuration == null) || !configuration.NoVs2008) vsVersionList.Add(new Version(9, 0)); // Visual Studio 2008 if ((configuration == null) || !configuration.NoVs2010) vsVersionList.Add(new Version(10, 0));// Visual Studio 2010 } } /////////////////////////////////////////////////////////////////////// private static bool HaveVsVersion( RegistryKey rootKey, Version vsVersion, bool whatIf, bool verbose ) { string format = "Software\\Microsoft\\VisualStudio\\{0}"; string keyName = String.Format(format, vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) return false; |
︙ | ︙ | |||
4191 4192 4193 4194 4195 4196 4197 | return true; } } /////////////////////////////////////////////////////////////////////// private static bool ForEachVsVersionRegistry( | < < | > > > < < < < < < < < < < < < < < | | | | | < | | < | | > | | 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 | return true; } } /////////////////////////////////////////////////////////////////////// private static bool ForEachVsVersionRegistry( VisualStudioRegistryCallback callback, Guid packageId, Guid serviceId, Guid dataSourceId, Guid dataProviderId, object clientData, bool whatIf, bool verbose, ref string error ) { RegistryKey rootKey = vsRootKey; if (rootKey == null) { error = "invalid root key"; return false; } if (!Object.ReferenceEquals(rootKey, Registry.CurrentUser) && !Object.ReferenceEquals(rootKey, Registry.LocalMachine)) { error = "root key must be per-user or per-machine"; return false; } if (vsVersionList == null) { error = "no VS versions found"; return false; } foreach (Version vsVersion in vsVersionList) { TraceOps.Trace(traceCallback, String.Format( "vsVersion = {0}", ForDisplay(vsVersion)), traceCategory); if (!HaveVsVersion(rootKey, vsVersion, whatIf, verbose)) { TraceOps.Trace(traceCallback, "Visual Studio version not found, skipping...", traceCategory); continue; } if (callback == null) continue; if (!callback( rootKey, vsVersion, packageId, serviceId, dataSourceId, dataProviderId, clientData, whatIf, verbose, ref error)) { return false; } } return true; } |
︙ | ︙ | |||
4357 4358 4359 4360 4361 4362 4363 | if (!String.Equals(element.GetAttribute("type"), fullTypeName, StringComparison.InvariantCulture)) { element.SetAttribute("type", fullTypeName); dirty = true; } | | < | | < | 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 | if (!String.Equals(element.GetAttribute("type"), fullTypeName, StringComparison.InvariantCulture)) { element.SetAttribute("type", fullTypeName); dirty = true; } if (dirty) { if (verbose) TraceOps.Trace(traceCallback, String.Format( "element = {0}", ForDisplay(element)), traceCategory); if (!whatIf) document.Save(fileName); saved = true; } |
︙ | ︙ | |||
4409 4410 4411 4412 4413 4414 4415 | if (element != null) { element.ParentNode.RemoveChild(element); dirty = true; } | | < | | < < < | 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 | if (element != null) { element.ParentNode.RemoveChild(element); dirty = true; } if (dirty) { if (verbose) TraceOps.Trace(traceCallback, String.Format( "element = {0}", ForDisplay(element)), traceCategory); if (!whatIf) document.Save(fileName); saved = true; } return true; } /////////////////////////////////////////////////////////////////////// private static bool ProcessDbProviderFactory( string fileName, string invariant, string name, string description, string typeName, AssemblyName assemblyName, object clientData, bool whatIf, bool verbose, ref bool saved, ref string error ) { AnyPair<string, bool> pair = clientData as AnyPair<string, bool>; |
︙ | ︙ | |||
4476 4477 4478 4479 4480 4481 4482 | /////////////////////////////////////////////////////////////////////// #region Assembly Folders Handling private static string GetAssemblyFoldersKeyName( string frameworkName, Version frameworkVersion, | | < < < < < < | | | | | < | | 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 | /////////////////////////////////////////////////////////////////////// #region Assembly Folders Handling private static string GetAssemblyFoldersKeyName( string frameworkName, Version frameworkVersion, string platformName ) { string format = !String.IsNullOrEmpty(platformName) ? "Software\\Microsoft\\{0}\\v{1}\\{2}\\AssemblyFoldersEx" : "Software\\Microsoft\\{0}\\v{1}\\AssemblyFoldersEx"; return String.Format(format, frameworkName, frameworkVersion, platformName); } /////////////////////////////////////////////////////////////////////// private static bool AddToAssemblyFolders( RegistryKey rootKey, string frameworkName, Version frameworkVersion, string platformName, string subKeyName, string directory, bool whatIf, bool verbose, ref string error ) { string keyName = GetAssemblyFoldersKeyName( frameworkName, frameworkVersion, platformName); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, true, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
4546 4547 4548 4549 4550 4551 4552 | return true; } /////////////////////////////////////////////////////////////////////// private static bool RemoveFromAssemblyFolders( | | < < | | | | < < < | | < | < < < < < < < < < < | < < < < | | | | | < < < < < < < < < < < < | | 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 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 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 | return true; } /////////////////////////////////////////////////////////////////////// private static bool RemoveFromAssemblyFolders( RegistryKey rootKey, string frameworkName, Version frameworkVersion, string platformName, string subKeyName, bool whatIf, bool verbose, ref string error ) { string keyName = GetAssemblyFoldersKeyName( frameworkName, frameworkVersion, platformName); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( "could not open registry key: {0}\\{1}", rootKey, keyName); return false; } RegistryHelper.DeleteSubKey( key, subKeyName, whatIf, verbose); } return true; } /////////////////////////////////////////////////////////////////////// private static bool ProcessAssemblyFolders( RegistryKey rootKey, string frameworkName, Version frameworkVersion, string platformName, object clientData, bool whatIf, bool verbose, ref string error ) { AnyPair<string, bool> pair = clientData as AnyPair<string, bool>; if (pair == null) { error = "invalid framework callback data"; return false; } if (pair.Y) { return RemoveFromAssemblyFolders( rootKey, frameworkName, frameworkVersion, platformName, LegacyProjectName, whatIf, verbose, ref error) && AddToAssemblyFolders( rootKey, frameworkName, frameworkVersion, platformName, ProjectName, pair.X, whatIf, verbose, ref error); } else { return RemoveFromAssemblyFolders( rootKey, frameworkName, frameworkVersion, platformName, ProjectName, whatIf, verbose, ref error); } } #endregion /////////////////////////////////////////////////////////////////////// #region Visual Studio Handling private static string GetVsKeyName( Version vsVersion ) { return String.Format("Software\\Microsoft\\VisualStudio\\{0}", vsVersion); } /////////////////////////////////////////////////////////////////////// #region Visual Studio Data Source Handling private static bool AddVsDataSource( RegistryKey rootKey, Version vsVersion, Guid dataSourceId, Guid dataProviderId, bool whatIf, bool verbose, ref string error ) { string keyName = GetVsKeyName(vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
4699 4700 4701 4702 4703 4704 4705 | error = String.Format( "could not open registry key: {0}\\DataSources", key); return false; } | | < | | | | | | | | < < < < < < < < < < < < < | | 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 | error = String.Format( "could not open registry key: {0}\\DataSources", key); return false; } using (MockRegistryKey dataSourceKey = RegistryHelper.CreateSubKey( subKey, dataSourceId.ToString(VsIdFormat), whatIf, verbose)) { if (dataSourceKey == null) { error = String.Format( "could not create registry key: {0}\\{1}", key, dataSourceId.ToString(VsIdFormat)); return false; } RegistryHelper.SetValue( dataSourceKey, null, String.Format( "{0} Database File", ProjectName), whatIf, verbose); RegistryHelper.CreateSubKey(dataSourceKey, String.Format("SupportingProviders\\{0}", dataProviderId.ToString(VsIdFormat)), whatIf, verbose); } } } return true; } /////////////////////////////////////////////////////////////////////// private static bool RemoveVsDataSource( RegistryKey rootKey, Version vsVersion, Guid dataSourceId, bool whatIf, bool verbose, ref string error ) { string keyName = GetVsKeyName(vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
4780 4781 4782 4783 4784 4785 4786 | "could not open registry key: {0}\\DataSources", key); return false; } RegistryHelper.DeleteSubKeyTree( | | | | | > > > < < < < < < < < | | | | | > < | | < < < < < < | | 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 | "could not open registry key: {0}\\DataSources", key); return false; } RegistryHelper.DeleteSubKeyTree( subKey, dataSourceId.ToString(VsIdFormat), whatIf, verbose); } } return true; } /////////////////////////////////////////////////////////////////////// private static bool ProcessVsDataSource( RegistryKey rootKey, Version vsVersion, Guid packageId, /* NOT USED */ Guid serviceId, /* NOT USED */ Guid dataSourceId, Guid dataProviderId, object clientData, bool whatIf, bool verbose, ref string error ) { AnyPair<string, bool> pair = clientData as AnyPair<string, bool>; if (pair == null) { error = "invalid VS callback data"; return false; } if (pair.Y) { return AddVsDataSource( rootKey, vsVersion, dataSourceId, dataProviderId, whatIf, verbose, ref error); } else { return RemoveVsDataSource( rootKey, vsVersion, dataSourceId, whatIf, verbose, ref error); } } #endregion /////////////////////////////////////////////////////////////////////// #region Visual Studio Data Provider Handling private static bool AddVsDataProvider( RegistryKey rootKey, Version vsVersion, Guid serviceId, Guid dataProviderId, string fileName, bool whatIf, bool verbose, ref string error ) { if (vsAdoNetTechnologyId == null) { error = "invalid ADO.NET technology Id"; return false; } string keyName = GetVsKeyName(vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
4883 4884 4885 4886 4887 4888 4889 | error = String.Format( "could not open registry key: {0}\\DataProviders", key); return false; } | | < | | | | | | < | 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 | error = String.Format( "could not open registry key: {0}\\DataProviders", key); return false; } using (MockRegistryKey dataProviderKey = RegistryHelper.CreateSubKey( subKey, dataProviderId.ToString(VsIdFormat), whatIf, verbose)) { if (dataProviderKey == null) { error = String.Format( "could not create registry key: {0}\\{1}", key, dataProviderId.ToString(VsIdFormat)); return false; } RegistryHelper.SetValue( dataProviderKey, null, Description, whatIf, verbose); RegistryHelper.SetValue( dataProviderKey, "InvariantName", InvariantName, whatIf, verbose); RegistryHelper.SetValue( dataProviderKey, "Technology", ((Guid)vsAdoNetTechnologyId).ToString(VsIdFormat), whatIf, verbose); RegistryHelper.SetValue( dataProviderKey, "CodeBase", fileName, whatIf, verbose); RegistryHelper.SetValue( dataProviderKey, "FactoryService", serviceId.ToString(VsIdFormat), whatIf, verbose); RegistryHelper.CreateSubKey(dataProviderKey, "SupportedObjects\\DataConnectionUIControl", whatIf, verbose); RegistryHelper.CreateSubKey(dataProviderKey, "SupportedObjects\\DataConnectionProperties", |
︙ | ︙ | |||
4948 4949 4950 4951 4952 4953 4954 | return true; } /////////////////////////////////////////////////////////////////////// private static bool RemoveVsDataProvider( | | | < < < < < < < | | 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 | return true; } /////////////////////////////////////////////////////////////////////// private static bool RemoveVsDataProvider( RegistryKey rootKey, Version vsVersion, Guid dataProviderId, bool whatIf, bool verbose, ref string error ) { string keyName = GetVsKeyName(vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
4990 4991 4992 4993 4994 4995 4996 | "could not open registry key: {0}\\DataProviders", key); return false; } RegistryHelper.DeleteSubKeyTree( | | | | | > > > < < | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < | | > < < < < < < < < < < < < < | | 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 | "could not open registry key: {0}\\DataProviders", key); return false; } RegistryHelper.DeleteSubKeyTree( subKey, dataProviderId.ToString(VsIdFormat), whatIf, verbose); } } return true; } /////////////////////////////////////////////////////////////////////// private static bool ProcessVsDataProvider( RegistryKey rootKey, Version vsVersion, Guid packageId, /* NOT USED */ Guid serviceId, Guid dataSourceId, /* NOT USED */ Guid dataProviderId, object clientData, bool whatIf, bool verbose, ref string error ) { AnyPair<string, bool> pair = clientData as AnyPair<string, bool>; if (pair == null) { error = "invalid VS callback data"; return false; } if (pair.Y) { return AddVsDataProvider( rootKey, vsVersion, serviceId, dataProviderId, pair.X, whatIf, verbose, ref error); } else { return RemoveVsDataProvider( rootKey, vsVersion, dataProviderId, whatIf, verbose, ref error); } } #endregion /////////////////////////////////////////////////////////////////////// #region Visual Studio Package Handling private static bool AddVsPackage( RegistryKey rootKey, Version vsVersion, Guid packageId, Guid serviceId, string fileName, bool whatIf, bool verbose, ref string error ) { string keyName = GetVsKeyName(vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
5114 5115 5116 5117 5118 5119 5120 | error = String.Format( "could not open registry key: {0}\\Packages", key); return false; } | | < | | | | | | 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 | error = String.Format( "could not open registry key: {0}\\Packages", key); return false; } using (MockRegistryKey packageKey = RegistryHelper.CreateSubKey( subKey, packageId.ToString(VsIdFormat), whatIf, verbose)) { if (packageKey == null) { error = String.Format( "could not create registry key: {0}\\{1}", key, packageId.ToString(VsIdFormat)); return false; } RegistryHelper.SetValue(packageKey, null, String.Format( "{0} Designer Package", ProjectName), whatIf, verbose); RegistryHelper.SetValue(packageKey, "Class", "SQLite.Designer.SQLitePackage", whatIf, verbose); RegistryHelper.SetValue(packageKey, "CodeBase", fileName, whatIf, verbose); |
︙ | ︙ | |||
5158 5159 5160 5161 5162 5163 5164 | RegistryHelper.SetValue(packageKey, "ProductName", String.Format("{0} Designer Package", ProjectName), whatIf, verbose); RegistryHelper.SetValue(packageKey, "ProductVersion", "1.0", whatIf, verbose); | | < | | | | 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 | RegistryHelper.SetValue(packageKey, "ProductName", String.Format("{0} Designer Package", ProjectName), whatIf, verbose); RegistryHelper.SetValue(packageKey, "ProductVersion", "1.0", whatIf, verbose); using (MockRegistryKey toolboxKey = RegistryHelper.CreateSubKey( packageKey, "Toolbox", whatIf, verbose)) { if (toolboxKey == null) { error = String.Format( "could not create registry key: {0}\\Toolbox", packageKey); return false; } RegistryHelper.SetValue( toolboxKey, "Default Items", 3, whatIf, verbose); |
︙ | ︙ | |||
5191 5192 5193 5194 5195 5196 5197 | "could not open registry key: {0}\\Menus", key); return false; } RegistryHelper.SetValue( | | | | < | | | < | | | < < < < < < < < < < < < < | | 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 | "could not open registry key: {0}\\Menus", key); return false; } RegistryHelper.SetValue( subKey, packageId.ToString(VsIdFormat), ", 1000, 3", whatIf, verbose); } using (MockRegistryKey subKey = RegistryHelper.OpenSubKey( key, "Services", true, whatIf, verbose)) { if (subKey == null) { error = String.Format( "could not open registry key: {0}\\Services", key); return false; } using (MockRegistryKey serviceKey = RegistryHelper.CreateSubKey( subKey, serviceId.ToString(VsIdFormat), whatIf, verbose)) { if (serviceKey == null) { error = String.Format( "could not create registry key: {0}\\{1}", key, serviceId.ToString(VsIdFormat)); return false; } RegistryHelper.SetValue(serviceKey, null, packageId.ToString(VsIdFormat), whatIf, verbose); RegistryHelper.SetValue(serviceKey, "Name", String.Format("{0} Designer Service", ProjectName), whatIf, verbose); } } } return true; } /////////////////////////////////////////////////////////////////////// private static bool RemoveVsPackage( RegistryKey rootKey, Version vsVersion, Guid packageId, Guid serviceId, bool whatIf, bool verbose, ref string error ) { string keyName = GetVsKeyName(vsVersion); using (MockRegistryKey key = RegistryHelper.OpenSubKey( rootKey, keyName, false, whatIf, verbose)) { if (key == null) { error = String.Format( |
︙ | ︙ | |||
5287 5288 5289 5290 5291 5292 5293 | "could not open registry key: {0}\\Packages", key); return false; } RegistryHelper.DeleteSubKeyTree( | | < | | | | | | > > > < < | | | | < < < < | | | | | | | | < < | | | < | < < < < | | < | < | < < < < < < < < < < < < < | < < < | | < < < < < < < < < < < < < < | | | | < | | | | | > > | < | | > > > | > > | < < < | | < < < < < | | < < < < < | | | | > | | | < > > | | | < < < < < < | | | < | | > | | | | < | | < | < < | < | | < | | < < < < | | | | | | < | | | | < | | < | | | | | < | | < < < < | | | | | | | < | < < < < < | > | < < | | | | < | | < < < < | | | | | | | < < < < < < < < < < < < < | > > > > > > | < | | < < < < | | | | | | | < | < < < < | | | < < | | | < < < < < | < | > | | | | | < < | | | | < < | | < | < < < < | < < < < < < < < < | 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 | "could not open registry key: {0}\\Packages", key); return false; } RegistryHelper.DeleteSubKeyTree( key, packageId.ToString(VsIdFormat), whatIf, verbose); } using (MockRegistryKey subKey = RegistryHelper.OpenSubKey( key, "Menus", true, whatIf, verbose)) { if (subKey == null) { error = String.Format( "could not open registry key: {0}\\Menus", key); return false; } RegistryHelper.DeleteValue( subKey, packageId.ToString(VsIdFormat), whatIf, verbose); } using (MockRegistryKey subKey = RegistryHelper.OpenSubKey( key, "Services", true, whatIf, verbose)) { if (subKey == null) { error = String.Format( "could not open registry key: {0}\\Services", key); return false; } RegistryHelper.DeleteSubKeyTree( subKey, serviceId.ToString(VsIdFormat), whatIf, verbose); } } return true; } /////////////////////////////////////////////////////////////////////// private static bool ProcessVsPackage( RegistryKey rootKey, Version vsVersion, Guid packageId, Guid serviceId, Guid dataSourceId, Guid dataProviderId, object clientData, bool whatIf, bool verbose, ref string error ) { AnyPair<string, bool> pair = clientData as AnyPair<string, bool>; if (pair == null) { error = "invalid VS callback data"; return false; } if (pair.Y) { return AddVsPackage( rootKey, vsVersion, packageId, serviceId, pair.X, whatIf, verbose, ref error); } else { return RemoveVsPackage( rootKey, vsVersion, packageId, serviceId, whatIf, verbose, ref error); } } #endregion #endregion /////////////////////////////////////////////////////////////////////// #region Application Entry Point private static int Main(string[] args) { Configuration configuration = null; string error = null; /////////////////////////////////////////////////////////////////// #region Command Line Processing if (!Configuration.FromArgs( args, true, ref configuration, ref error) || !Configuration.Process( args, configuration, true, ref error)) { TraceOps.ShowMessage( traceCallback, thisAssembly, error, traceCategory, MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } /////////////////////////////////////////////////////////////////// InitializeAllFrameworks(configuration); InitializeAllVsVersions(configuration); #endregion /////////////////////////////////////////////////////////////////// AnyPair<string, bool> directoryPair = new AnyPair<string, bool>( configuration.Directory, configuration.Install); AnyPair<string, bool> fileNamePair = new AnyPair<string, bool>( configuration.DesignerFileName, configuration.Install); /////////////////////////////////////////////////////////////////// #region .NET GAC Install/Remove if (configuration.HasFlags(InstallFlags.GAC, true)) { Publish publish = new Publish(); if (configuration.Install) { if (!configuration.WhatIf) { publish.GacInstall(configuration.CoreFileName); /* throw */ publish.GacInstall(configuration.LinqFileName); /* throw */ } else { TraceOps.Trace(traceCallback, String.Format( "GacInstall: assemblyPath = {0}", configuration.CoreFileName), traceCategory); TraceOps.Trace(traceCallback, String.Format( "GacInstall: assemblyPath = {0}", configuration.LinqFileName), traceCategory); } } else { if (!configuration.WhatIf) { publish.GacRemove(configuration.LinqFileName); /* throw */ publish.GacRemove(configuration.CoreFileName); /* throw */ } else { TraceOps.Trace(traceCallback, String.Format( "GacRemove: assemblyPath = {0}", configuration.LinqFileName), traceCategory); TraceOps.Trace(traceCallback, String.Format( "GacRemove: assemblyPath = {0}", configuration.CoreFileName), traceCategory); } } } #endregion /////////////////////////////////////////////////////////////////// #region .NET AssemblyFolders if (configuration.HasFlags(InstallFlags.AssemblyFolders, true)) { if (!ForEachFrameworkRegistry(ProcessAssemblyFolders, directoryPair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( traceCallback, null, error, traceCategory, MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } } #endregion /////////////////////////////////////////////////////////////////// #region .NET DbProviderFactory if (configuration.HasFlags(InstallFlags.DbProviderFactory, true)) { bool saved = false; if (!ForEachFrameworkConfig(ProcessDbProviderFactory, InvariantName, ProviderName, Description, FactoryTypeName, AssemblyName.GetAssemblyName( configuration.CoreFileName), directoryPair, configuration.WhatIf, configuration.Verbose, ref saved, ref error)) { TraceOps.ShowMessage( traceCallback, null, error, traceCategory, MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } } #endregion /////////////////////////////////////////////////////////////////// #region VS Package if (configuration.HasFlags(InstallFlags.VsPackage, true)) { if (!ForEachVsVersionRegistry(ProcessVsPackage, (Guid)vsPackageId, (Guid)vsServiceId, (Guid)vsDataSourcesId, (Guid)vsDataProviderId, fileNamePair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( traceCallback, null, error, traceCategory, MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } } #endregion /////////////////////////////////////////////////////////////////// #region VS DataSource if (configuration.HasFlags(InstallFlags.VsDataSource, true)) { if (!ForEachVsVersionRegistry(ProcessVsDataSource, (Guid)vsPackageId, (Guid)vsServiceId, (Guid)vsDataSourcesId, (Guid)vsDataProviderId, fileNamePair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( traceCallback, null, error, traceCategory, MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } } #endregion /////////////////////////////////////////////////////////////////// #region VS DataProvider if (configuration.HasFlags(InstallFlags.VsDataProvider, true)) { if (!ForEachVsVersionRegistry(ProcessVsDataProvider, (Guid)vsPackageId, (Guid)vsServiceId, (Guid)vsDataSourcesId, (Guid)vsDataProviderId, fileNamePair, configuration.WhatIf, configuration.Verbose, ref error)) { TraceOps.ShowMessage( traceCallback, null, error, traceCategory, MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } } #endregion /////////////////////////////////////////////////////////////////// TraceOps.Trace(traceCallback, String.Format( "subKeysCreated = {0}, subKeysDeleted = {1}, " + "keyValuesSet = {2}, keyValuesDeleted = {3}", RegistryHelper.SubKeysCreated, RegistryHelper.SubKeysDeleted, RegistryHelper.KeyValuesSet, RegistryHelper.KeyValuesDeleted), traceCategory); /////////////////////////////////////////////////////////////////// return 0; } #endregion } #endregion } |
1 2 3 4 5 6 7 8 | using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("System.Data.SQLite Designer Installer")] [assembly: AssemblyDescription("ADO.NET Data Provider for SQLite")] | > | 1 2 3 4 5 6 7 8 9 | using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("System.Data.SQLite Designer Installer")] [assembly: AssemblyDescription("ADO.NET Data Provider for SQLite")] |
︙ | ︙ | |||
24 25 26 27 28 29 30 | // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // | | | | 25 26 27 28 29 30 31 32 33 | // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // [assembly: AssemblyVersion("1.0.76.0")] [assembly: AssemblyFileVersion("1.0.76.0")] |
|
| < < < < < < < < < < |
︙ | ︙ | |||
73 74 75 76 77 78 79 | [http://www.jrsoftware.org/isdl.php | Inno Setup 5.4.2] or higher installed in "%ProgramFiles%\Inno Setup 5" or "%ProgramFiles(x86)%\Inno Setup 5" for an 64-bit machines. Alternatively, the Inno Setup directory may be included in the PATH environment variable. </li> <li> | | < | < < < < < < | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | [http://www.jrsoftware.org/isdl.php | Inno Setup 5.4.2] or higher installed in "%ProgramFiles%\Inno Setup 5" or "%ProgramFiles(x86)%\Inno Setup 5" for an 64-bit machines. Alternatively, the Inno Setup directory may be included in the PATH environment variable. </li> <li> The string "<root>" represents the root of your source tree for the System.Data.SQLite project. </li> <li> The string "<year>" represents the version of Visual Studio being used (e.g. 2008). </li> </ol> <a name="all"></a> <h2>All Builds</h2> <ol> <li> |
︙ | ︙ | |||
113 114 115 116 117 118 119 | </li> <li> Make sure the version information is correct for System.Data.SQLite in the following files: <ul> | < < | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | </li> <li> Make sure the version information is correct for System.Data.SQLite in the following files: <ul> <li><root>\SQLite.nuspec</li> <li><root>\SQLite.MSIL.nuspec</li> <li><root>\SQLite.x86.nuspec</li> <li><root>\SQLite.x64.nuspec</li> <li><root>\Doc\Extra\dbfactorysupport.html</li> <li><root>\Doc\Extra\welcome.html</li> <li><root>\Membership\Properties\AssemblyInfo.cs</li> <li><root>\SQLite.Designer\AssemblyInfo.cs</li> <li><root>\SQLite.Interop\props\SQLite.Interop.vsprops</li> <li><root>\SQLite.Interop\props\SQLite.Interop.props</li> <li><root>\SQLite.Interop\src\win\interop.h</li> <li><root>\System.Data.SQLite\AssemblyInfo.cs</li> <li><root>\System.Data.SQLite\SQLite3.cs</li> <li><root>\System.Data.SQLite\UnsafeNativeMethods.cs</li> <li><root>\System.Data.SQLite.Linq\AssemblyInfo.cs</li> |
︙ | ︙ | |||
214 215 216 217 218 219 220 221 | be able to simply delete these directories. </li> <li>Open a normal command prompt window with "cmd.exe".</li> <li>Change the current directory to "<root>\Setup".</li> <li> | < < < < < < < < < < < | | | | | | < | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | be able to simply delete these directories. </li> <li>Open a normal command prompt window with "cmd.exe".</li> <li>Change the current directory to "<root>\Setup".</li> <li> Enter the following command to build the binaries for Win32 (x86): <b>build.bat ReleaseNativeOnly Win32</b><br /><i>You may need to enter the command "<b>setenv /x86</b>" first if you are using a "Windows SDK Command Prompt" or "Visual Studio Command Prompt" window.</i> </li> <li> Make sure everything succeeds with no errors; the log file "%TEMP%\System.Data.SQLite.Build_ReleaseNativeOnly_Win32_<year>_Unknown.log" may be checked if any errors should occur. </li> <li> Enter the following command to build the binaries for x64: <b>build.bat ReleaseNativeOnly x64</b><br /><i>You may need to enter the command "<b>setenv /x64</b>" first if you are using a "Windows SDK Command Prompt" or "Visual Studio Command Prompt" window.</i> </li> <li> Make sure everything succeeds with no errors; the log file "%TEMP%\System.Data.SQLite.Build_ReleaseNativeOnly_x64_<year>_Unknown.log" may be checked if any errors should occur. </li> |
︙ | ︙ | |||
267 268 269 270 271 272 273 | <li> Make sure everything succeeds with no errors. Inno Setup should produce "success" messages very similar to the following: <b>Successful compile (X.XXX sec). Resulting Setup program filename is: abc</b> </li> </ol> | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 246 247 248 249 250 251 252 | <li> Make sure everything succeeds with no errors. Inno Setup should produce "success" messages very similar to the following: <b>Successful compile (X.XXX sec). Resulting Setup program filename is: abc</b> </li> </ol> |
︙ | ︙ | |||
8 9 10 11 12 13 14 | <b>Source Code</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8 9 10 11 12 13 14 15 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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 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 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 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 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | <b>Source Code</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx-source-1.0.76.0.zip">sqlite-netFx-source-1.0.76.0.zip</a> <br /> (2.53 MiB) </td> <td width="5"></td> <td valign="top"> This ZIP archive contains all current source code for System.Data.SQLite 1.0.76.0 (3.7.8) combined into a single archive file. <br /> (sha1: fba56449601e4f023aa450c1c5471ee58d424b2d) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-setup-bundle-x86-2008-1.0.76.0.exe">sqlite-netFx35-setup-bundle-x86-2008-1.0.76.0.exe</a> <br /> (5.86 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x86 is included. The .NET Framework 3.5 SP1 is required. <br /> (sha1: 1f9c794d866e23f9e8828fad13e8d062610cf310) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-setup-x86-2008-1.0.76.0.exe">sqlite-netFx35-setup-x86-2008-1.0.76.0.exe</a> <br /> (5.86 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x86 is included. The .NET Framework 3.5 SP1 is required. <br /> (sha1: e0585ea3563eb838bdd8833bd64ebff9802efd0f) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-setup-bundle-x64-2008-1.0.76.0.exe">sqlite-netFx35-setup-bundle-x64-2008-1.0.76.0.exe</a> <br /> (6.60 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x64 is included. The .NET Framework 3.5 SP1 is required. <br /> (sha1: 75389cd822172c1690ab80c79229ca992d0d127e) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-setup-x64-2008-1.0.76.0.exe">sqlite-netFx35-setup-x64-2008-1.0.76.0.exe</a> <br /> (6.60 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x64 is included. The .NET Framework 3.5 SP1 is required. <br /> (sha1: 1a81ecdb4062d0c913551d74dee5eb477677aa00) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-setup-bundle-x86-2010-1.0.76.0.exe">sqlite-netFx40-setup-bundle-x86-2010-1.0.76.0.exe</a> <br /> (10.23 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x86 is included. The .NET Framework 4.0 is required. <br /> (sha1: 0f48a58182afb4aeca22428885520f1359155bbb) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-setup-x86-2010-1.0.76.0.exe">sqlite-netFx40-setup-x86-2010-1.0.76.0.exe</a> <br /> (10.23 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x86 is included. The .NET Framework 4.0 is required. <br /> (sha1: 9752bf41e287ff4781673cf79e3a0413c8229997) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-setup-bundle-x64-2010-1.0.76.0.exe">sqlite-netFx40-setup-bundle-x64-2010-1.0.76.0.exe</a> <br /> (11.44 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required. <br /> (sha1: 86dfd84874d322f0cdb4b3807d02f19b86c28bc6) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-setup-x64-2010-1.0.76.0.exe">sqlite-netFx40-setup-x64-2010-1.0.76.0.exe</a> <br /> (11.44 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required. <br /> (sha1: 7184b5ff13deb8692a85d0c8c4a06f2f8c64ae4b) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-binary-bundle-Win32-2008-1.0.76.0.zip">sqlite-netFx35-binary-bundle-Win32-2008-1.0.76.0.zip</a> <br /> (1.66 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: c11309defe95d31acba09e2960bf5f8398772e1f) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-binary-Win32-2008-1.0.76.0.zip">sqlite-netFx35-binary-Win32-2008-1.0.76.0.zip</a> <br /> (1.65 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: 8c34d86a88487b2c13b3738222be5a2f546d828b) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-binary-bundle-x64-2008-1.0.76.0.zip">sqlite-netFx35-binary-bundle-x64-2008-1.0.76.0.zip</a> <br /> (1.46 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: 715cb5c6ded65c143949e91a9e338e86181d7e9b) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-binary-x64-2008-1.0.76.0.zip">sqlite-netFx35-binary-x64-2008-1.0.76.0.zip</a> <br /> (1.45 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: 20c08bfb7314489f11b813973464746b97195b88) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-binary-bundle-Win32-2010-1.0.76.0.zip">sqlite-netFx40-binary-bundle-Win32-2010-1.0.76.0.zip</a> <br /> (1.44 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required. <br /> (sha1: cf0efe272bffb48313b9f7781b8de723fb4ea5d2) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-binary-Win32-2010-1.0.76.0.zip">sqlite-netFx40-binary-Win32-2010-1.0.76.0.zip</a> <br /> (1.43 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required. <br /> (sha1: 12d98305a9bd4860bfa98f1ffd7207df67022323) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-binary-bundle-x64-2010-1.0.76.0.zip">sqlite-netFx40-binary-bundle-x64-2010-1.0.76.0.zip</a> <br /> (1.46 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET Framework 4.0 are required. <br /> (sha1: 0bb3ebde1b9a0838e911de8eb2a9608cd2f95010) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-binary-x64-2010-1.0.76.0.zip">sqlite-netFx40-binary-x64-2010-1.0.76.0.zip</a> <br /> (1.45 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET Framework 4.0 are required. <br /> (sha1: f93461445c3b36586b5eed8e78acd32c0be01f75) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-static-binary-bundle-Win32-2008-1.0.76.0.zip">sqlite-netFx35-static-binary-bundle-Win32-2008-1.0.76.0.zip</a> <br /> (1.61 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x86 is statically linked. The .NET Framework 3.5 SP1 is required. <br /> (sha1: 286a2fafef12dfc15810b834c37007a2c97f7bbb) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-static-binary-Win32-2008-1.0.76.0.zip">sqlite-netFx35-static-binary-Win32-2008-1.0.76.0.zip</a> <br /> (1.60 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x86 is statically linked. The .NET Framework 3.5 SP1 is required. <br /> (sha1: bb1babce67aa349352ca2ad135d8932702d3859d) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-static-binary-bundle-x64-2008-1.0.76.0.zip">sqlite-netFx35-static-binary-bundle-x64-2008-1.0.76.0.zip</a> <br /> (1.64 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x64 is statically linked. The .NET Framework 3.5 SP1 is required. <br /> (sha1: 4e88bb3125718e19f869bd9d5ffdd60faee275fb) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-static-binary-x64-2008-1.0.76.0.zip">sqlite-netFx35-static-binary-x64-2008-1.0.76.0.zip</a> <br /> (1.63 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2008 SP1 runtime for x64 is statically linked. The .NET Framework 3.5 SP1 is required. <br /> (sha1: 8cbea2faa17623d49a407e591f663ce976422b33) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.76.0.zip">sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.76.0.zip</a> <br /> (1.66 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x86 is statically linked. The .NET Framework 4.0 is required. <br /> (sha1: 7942b03061317c3297882a2d9a155abe3a9dca68) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-static-binary-Win32-2010-1.0.76.0.zip">sqlite-netFx40-static-binary-Win32-2010-1.0.76.0.zip</a> <br /> (1.65 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x86 is statically linked. The .NET Framework 4.0 is required. <br /> (sha1: 56763c0e40f347ed1c66917c52dc2f5fd32c572e) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-static-binary-bundle-x64-2010-1.0.76.0.zip">sqlite-netFx40-static-binary-bundle-x64-2010-1.0.76.0.zip</a> <br /> (1.40 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x64 is statically linked. The .NET Framework 4.0 is required. <br /> (sha1: ffa622c031a4bdb9de3dd32839fd261b580426cf) </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx40-static-binary-x64-2010-1.0.76.0.zip">sqlite-netFx40-static-binary-x64-2010-1.0.76.0.zip</a> <br /> (1.39 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The Visual C++ 2010 SP1 runtime for x64 is statically linked. The .NET Framework 4.0 is required. <br /> (sha1: 36411ff1712baf96378c4bfdc4bbd08376dc4f5c) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for Windows CE (.NET Compact Framework 3.5)</b> </td> </tr> <tr> <td width="10"> </td> <td valign="top" align="right"> <a href="/sqlite-netFx35-binary-PocketPC-2008-1.0.76.0.zip">sqlite-netFx35-binary-PocketPC-2008-1.0.76.0.zip</a> <br /> (0.79 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the PocketPC version of the System.Data.SQLite 1.0.76.0 (3.7.8) package. The .NET Compact Framework 3.5 is required. <br /> (sha1: 3168092dbacd5faf1140e4fb8637603b237d67c8) </td> </tr> <tr> <td colspan="4"> <b>Legacy Versions</b> </td> |
︙ | ︙ |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
︙ | ︙ | |||
35 36 37 38 39 40 41 | <li> Visual Studio design-time Support, works with all versions of Visual Studio 2005/2008/2010. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc. <br /> <font color="red"> | > | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | <li> Visual Studio design-time Support, works with all versions of Visual Studio 2005/2008/2010. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc. <br /> <font color="red"> Currently not included. We are still updating the design-time support installer. Due to Visual Studio licensing restrictions, the Express Editions can no longer be supported. </font> </li> <li> Full SQLite schema editing inside Visual Studio. You can create/edit tables, views, triggers, indexes, check constraints and foreign keys. </li> |
︙ | ︙ |
1 2 3 4 5 6 7 | <title>About</title> <table align="right" border="1" cellpadding="10" hspace="10" cellspacing="0"> <tr> <td> <ul> <li>[./features.wiki | Features]</li> | < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <title>About</title> <table align="right" border="1" cellpadding="10" hspace="10" cellspacing="0"> <tr> <td> <ul> <li>[./features.wiki | Features]</li> <li>[./news.wiki | News]</li> <li>[./support.wiki | Support]</li> <li>[./downloads.wiki | Downloads]</li> <li>[./contribute.wiki | Contributing]</li> <li>[./build.wiki | Build Procedures]</li> <li>[./test.wiki | Test Procedures]</li> <li>[./release.wiki | Release Procedures]</li> </ul> </td> </tr> </table> |
︙ | ︙ | |||
30 31 32 33 34 35 36 | <p> Historical versions, as well as the original support forums, may still be found at <a href="http://sqlite.phxsoftware.com/">http://sqlite.phxsoftware.com/</a>, though there have been no updates to this version since April of 2010. </p> | < < < < < < < < < < < < | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <p> Historical versions, as well as the original support forums, may still be found at <a href="http://sqlite.phxsoftware.com/">http://sqlite.phxsoftware.com/</a>, though there have been no updates to this version since April of 2010. </p> <p> </p> <p> </p> |
︙ | ︙ |
1 2 3 4 5 | <title>News</title> <b>Version History</b> <p> | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <title>News</title> <b>Version History</b> <p> <b>1.0.76.0 - October 4, 2011</b> </p> <ul> <li>Prevent the domain unload event handler in SQLiteLog from being registered multiple times. Fix for [0d5b1ef362].</li> <li>Stop allowing non-default application domains to initialize the SQLiteLog class. Fix for [ac47dd230a].</li> </ul> <p> <b>1.0.75.0 - October 3, 2011</b> </p> <ul> <li>Updated to SQLite 3.7.8 <a href="http://www.sqlite.org/src/info/3e0da808d2">[3e0da808d2]</a>.</li> <li>More enhancements to the build system.</li> <li>Add official <a href="http://www.nuget.org/">NuGet</a> packages for x86 and x64.</li> <li>Add Changes and LastInsertRowId properties to the connection class.</li> <li>Support more formats when converting data from/to the DateTime type.</li> <li>Make all the assembly versioning attributes consistent.</li> <li>Add unit testing infrastructure using <a href="http://eagle.to/">Eagle</a>.</li> <li>Integrate all legacy unit tests, including the "testlinq" project, into the new test suite.</li> |
︙ | ︙ | |||
77 78 79 80 81 82 83 | <li>Fix incorrect resource name for SR.resx in the mixed-mode assembly.</li> <li>Reduce the number of String.Compare() calls in the hot path for SQLiteCommand.ExecuteReader().</li> </ul> <p> <b>1.0.74.0 - July 4, 2011</b> </p> <ul> | | | | | 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 | <li>Fix incorrect resource name for SR.resx in the mixed-mode assembly.</li> <li>Reduce the number of String.Compare() calls in the hot path for SQLiteCommand.ExecuteReader().</li> </ul> <p> <b>1.0.74.0 - July 4, 2011</b> </p> <ul> <li>Updated to SQLite 3.7.7.1 <a href="http://www.sqlite.org/src/info/af0d91adf4">[af0d91adf4]</a>.</li> <li>Fix incorrect hard-coded .NET Framework version information SQLiteFactory_Linq.cs that was causing IServiceProvider.GetService to fail when running against the .NET Framework 3.5.</li> <li>Fix all XML documentation warnings.</li> <li>Restore support for the mixed-mode assembly (i.e. the one that can be registered in the Global Assembly Cache).</li> <li>Restore support for the Compact Framework.</li> <li>Remove unused "using" statements from the System.Data.SQLite and System.Data.SQLite.Linq projects.</li> <li>Remove hard-coded System.Data.SQLite.Linq version from SQLiteFactory_Linq.cs</li> <li>Modify the setup to support bundled packages (i.e. with the mixed-mode assembly) and standard packages (i.e. with the managed assembly separate from the native interop library).</li> <li>Disable the ability to register with the Global Assembly Cache in the standard setup package (i.e. it is available in the bundled setup only).</li> <li>Remove PATH modification from the setup.</li> <li>Modify the naming scheme for the source, setup, and binary packages to allow for the necessary variants.</li> <li>In the build automation, attempt to automatically detect if Visual Studio 2008 and/or 2010 are installed and support building binaries for both at once, when available.</li> <li>Add release automation to build the source, setup, and binary packages in all supported build variants.</li> <li>Add the testlinq project to the new build system and make it work properly with Visual Studio 2008 and 2010.</li> </ul> <p> <b>1.0.73.0 - June 2, 2011</b> </p> <ul> <li>Updated to SQLite 3.7.6.3 <a href="http://www.sqlite.org/src/info/ed1da510a2">[ed1da510a2]</a>.</li> <li>Minor optimization to GetBytes(). Fix for [8c1650482e].</li> <li>Update various assembly information settings.</li> <li>Correct System.Data.SQLite.Linq version and resource information. Fix for [6489c5a396] and [133daf50d6].</li> <li>Moved log handler from SQLiteConnection object to SQLiteFactory object to prevent if from being prematurely GCed.</li> <li>We should block x64 installs on x86 and we should install native only if the setup package itself is native. Fix for [e058ce156e].</li> </ul> <p> <b>1.0.72.0 - May 1, 2011</b> </p> <ul> <li>Add the correct directory to the path. Fix for [50515a0c8e].</li> </ul> <p> <b>1.0.71.0 - April 27, 2011</b> </p> <ul> <li> Updated to SQLite 3.7.6+ <a href="http://www.sqlite.org/src/info/1bd1484cd7">[1bd1484cd7]</a> to get additional Windows error logging. </li> <li>Updated setup to optionally add install directory to PATH if GAC option selected.</li> </ul> <p> <b>1.0.69.0 - April 12, 2011</b> </p> |
︙ | ︙ | |||
143 144 145 146 147 148 149 | <p> <b>1.0.67.0 - January 3, 2011</b> </p> <ul> <li>Code merge with [http://www.sqlite.org/releaselog/3_7_4.html | SQLite 3.7.4]</li> <li>Continuing work on supporting Visual Studio 2010</li> </ul> | > | 104 105 106 107 108 109 110 111 | <p> <b>1.0.67.0 - January 3, 2011</b> </p> <ul> <li>Code merge with [http://www.sqlite.org/releaselog/3_7_4.html | SQLite 3.7.4]</li> <li>Continuing work on supporting Visual Studio 2010</li> </ul> |
1 2 | <title>Release Procedures</title> | < > | | | < < < < | | < < < < | < | < | < < < < < | < < < < < < < < | < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < | < < < | < < < < | < < < < | < < < < | < < < < | < < < < | < < < < | < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < | < < < < | < < | | < | < | < < < < < > | < < | < < | < | | < < | < < < < < < < < < < | < < < < | < < | < < < < < < < < < < | < < < < < < < < < < < | < < | < < | < < < < < < < < | < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 | <title>Release Procedures</title> <h2>Release Procedures</h2> <font color="red">This content on this page is outdated and needs to be updated.</font> <p>Follow these steps to prepare a new release of System.Data.SQLite. Unless otherwise noted, all steps need to be done in the order specified.</p> <ol type="A"> <li> <b>Build Runtime Packages</b> <ul> 1. [./build.wiki | Build] the runtime and design time components, and setup package.<br /> 2. Copy the and rename the resulting setup.exe to sqlite-dotnet-1xxyyzz.exe<br /> </ul> </li> <li> <b>Build Source Package</b> <ul> 1. Get a fresh checkout of the "dotnet" Fossil repository.<br /> 2. Run fossil close to remove the _FOSSIL_ file.<br /> 3. Remove the bin, obj, and Externals directories.<br /> 4. Rename the subdirectory to sqlite-dotnetsrc-1xxyyzz<br /> 5. Package this subdirectory as sqlite-dotnetsrc-1xxyyzz.zip<br /> 6. Move the ZIP archive to the doc/ folder of the build area.<br /> </ul> </li> <li> <b>Update documentation</b> <font color="red">This section needs updating.</font> <ul> 1. Update the readme.htm file with the latest version changes<br /> 2. Copy the version changes from readme.htm into doc\extra\version.html<br /> 3. Update doc\extra\dbfactorysupport.html to reflect the latest version # of the DLL<br /> 4. Copy over doc\extra\dbfactorysupport.html and version.html to my temp ndoc2 location where all my intermediate files are for the CHM<br /> 5. Run HTML Help Workshop on the HHP project to get my CHM<br /> 6. Copy the CHM file over to \doc<br /> </ul> </li> <li> <b>Publish the release</b> <ul> 1. Update the news.wiki page and the downloads.wiki page.<br /> 2. Tag the release in Fossil.<br /> 3. Upload the distributables.<br /> 4. Announce the release on the mailing list.<br /> </ul> </li> </ol> |
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
1 2 3 4 | <title>Support</title> <h3>Mailing Lists</h3> | < | < | < < | < | < | | < < < < | | < < < | | | < < | | | | | | | | | | < | < < < < < | < < < | < < < | < | < < | < < < < | < < < | | | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 | <title>Support</title> <h3>Mailing Lists</h3> <p>SQLite has an active mailing list and support community, and users of this version of System.Data.SQLite are encouraged to use these for support questions.</p> <p>Three separate mailing lists have been established to help support SQLite:</p> <ul> <li><a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-announce"> sqlite-announce</a> - announcements of new releases or significant developments.</li> <li><a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users"> sqlite-users</a> - general user discussion; most postings belong here.</li> <li><a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev"> sqlite-dev</a> - developer conversations; for people who have or aspire to have write permission on the SQLite source code repository.</li> </ul> <p> Most users of SQLite will want to join the <a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-announce"> sqlite-announce</a> list and many will want to join the <a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users"> sqlite-users</a> list. The <a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev"> sqlite-dev</a> list is more specialized and appeals to a narrower audience. Off-site archives of the <a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users"> sqlite-users</a> list are available at: </p> <ul> <li><a href="http://www.mail-archive.com/sqlite-users%40sqlite.org/">http://www.mail-archive.com/sqlite-users%40sqlite.org/</a><br> <li><a href="http://marc.info/?l">http://marc.info/?l=sqlite-users&r=1&w=2</a><br> <li><a href="http://news.gmane.org/gmane.comp.db.sqlite.general">http://news.gmane.org/gmane.comp.db.sqlite.general</a> </ul> <h3>Direct E-Mail</h3> <p>Use the mailing list. Please do <b>not</b> send email directly to the authors of SQLite or System.Data.SQLite unless:</p> <ul> <li>You have or intend to acquire a <a href="http://www.sqlite.org/draft/support.html">professional support contract</a> <li>You are working on an open source project. </ul> <p>You are welcomed to use SQLite in closed source, proprietary, and/or commercial projects and to ask questions about such use on the public mailing list. But please do not ask to receive free direct technical support. The software is free; direct technical support is not.</p> |
1 2 3 4 5 6 7 | <title>Test Procedures</title> <a name="assumptions"></a> <h2>Test Assumptions & Prerequisites</h2> <ol> <li> | | | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <title>Test Procedures</title> <a name="assumptions"></a> <h2>Test Assumptions & Prerequisites</h2> <ol> <li> The string "<root>" represents the root of the source tree (i.e. the working check-out directory) for the System.Data.SQLite project. </li> <li> The string "<year>" represents the version of Visual Studio used (e.g. "2008" or "2010") to build the binaries being tested. </li> |
︙ | ︙ | |||
48 49 50 51 52 53 54 | "<a href="/index.html/dir?name=Externals/Eagle">Externals\Eagle</a>" directory. </p> <p> The binaries to test must be [./build.wiki | built] or [./downloads.wiki | downloaded]. If the binaries are downloaded, they must be | | | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | "<a href="/index.html/dir?name=Externals/Eagle">Externals\Eagle</a>" directory. </p> <p> The binaries to test must be [./build.wiki | built] or [./downloads.wiki | downloaded]. If the binaries are downloaded, they must be placed in the appropriate build output directory (e.g. "<root>\bin\<year>\<configuration>\bin" for the separate managed and interop assemblies or "<root>\bin\<year>\<platform>\<configuration>" for the mixed-mode assembly). </p> <p> |
︙ | ︙ | |||
76 77 78 79 80 81 82 | <li>Open a normal command prompt window with "cmd.exe".</li> <li>Change the current directory to "<root>".</li> <li> Enter the following command to run all the unit tests against the binaries built with a separate managed and interop assembly: | | | | | | | | 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 | <li>Open a normal command prompt window with "cmd.exe".</li> <li>Change the current directory to "<root>".</li> <li> Enter the following command to run all the unit tests against the binaries built with a separate managed and interop assembly: <b>Externals\Eagle\bin\EagleShell.exe -file Tests\all.eagle</b> </li> <li> Enter the following command to run all the unit tests against the binaries built with a mixed-mode assembly: <b>Externals\Eagle\bin\EagleShell.exe -initialize -runtimeOption native -file Tests\all.eagle</b> </li> <li> To test binaries built with MSBuild 3.5 or Visual Studio 2008 (i.e. because the default is to test binaries built with MSBuild 4.0 or Visual Studio 2010) add the following command line argument right after "Externals\Eagle\bin\EagleShell.exe" in either of the above command lines: <b>-preInitialize "set test_year 2008"</b> </li> <li> To test binaries built in the "Debug" build configuration (i.e. because the default is to test binaries built in the "Release" build configuration) add the following command line argument right after "Externals\Eagle\bin\EagleShell.exe" in either of the above command lines: <b>-preInitialize "set test_configuration Debug"</b> </li> <li> Make sure all tests pass; the log file "%TEMP%\EagleShell.exe.test.<pid>.log" may be checked if any errors should occur. EagleTest should produce "success" messages very similar to the following:<br /><br /> PASSED: 48<br /> TOTAL: 48<br /> PASS PERCENTAGE: 100%<br /> OVERALL RESULT: SUCCESS<br /> </li> </ol> |