Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Tweaks and optimizations |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sourceforge |
Files: | files | file ages | folders |
SHA1: |
dcbda7101ee5d885a04d743a348b3b75 |
User & Date: | rmsimpson 2005-08-26 05:04:57.000 |
Context
2005-08-27
| ||
23:17 | Added itanium and x64 platform build settings check-in: 065c6034ae user: rmsimpson tags: sourceforge | |
2005-08-26
| ||
05:04 | Tweaks and optimizations check-in: dcbda7101e user: rmsimpson tags: sourceforge | |
03:08 | no message check-in: c2d292b29a user: rmsimpson tags: sourceforge | |
Changes
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
541 542 543 544 545 546 547 | throw new ArgumentException("Data Source cannot be empty. Use :MEMORY: to open an in-memory database"); try { bool bUTF16 = (Convert.ToBoolean(FindKey(opts, "UseUTF16Encoding", "False"), CultureInfo.InvariantCulture) == true); SQLiteDateFormats dateFormat = String.Compare(FindKey(opts, "DateTimeFormat", "ISO8601"), "ticks", true, CultureInfo.CurrentCulture) == 0 ? SQLiteDateFormats.Ticks : SQLiteDateFormats.ISO8601; | | < < < < < | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | throw new ArgumentException("Data Source cannot be empty. Use :MEMORY: to open an in-memory database"); try { bool bUTF16 = (Convert.ToBoolean(FindKey(opts, "UseUTF16Encoding", "False"), CultureInfo.InvariantCulture) == true); SQLiteDateFormats dateFormat = String.Compare(FindKey(opts, "DateTimeFormat", "ISO8601"), "ticks", true, CultureInfo.CurrentCulture) == 0 ? SQLiteDateFormats.Ticks : SQLiteDateFormats.ISO8601; 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); _sql.Open(strFile); _dataSource = System.IO.Path.GetFileNameWithoutExtension(strFile); _sql.Execute(String.Format(CultureInfo.InvariantCulture, "PRAGMA Synchronous={0}", FindKey(opts, "Synchronous", "Normal"))); _sql.Execute(String.Format(CultureInfo.InvariantCulture, "PRAGMA Cache_Size={0}", FindKey(opts, "Cache Size", "2000"))); if (String.Compare(":MEMORY:", strFile, true, CultureInfo.CurrentCulture) == 0) _sql.Execute(String.Format(CultureInfo.InvariantCulture, "PRAGMA Page_Size={0}", FindKey(opts, "Page Size", "1024"))); } catch (SQLiteException) { |
︙ | ︙ |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | ︙ | |||
22 23 24 25 26 27 28 | private const string SQLITE_DLL = "SQLite.Interop.DLL"; #endif private UnsafeNativeMethods() { } | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | private const string SQLITE_DLL = "SQLite.Interop.DLL"; #endif private UnsafeNativeMethods() { } [DllImport(SQLITE_DLL)] internal static extern void sqlite3_sleep_interop(uint dwMilliseconds); [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_libversion_interop(out int len); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_free_interop(IntPtr p); |
︙ | ︙ | |||
231 232 233 234 235 236 237 | internal static extern int sqlite3_encryptedstatus(string fileName, out long fileStatus); [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern int sqlite3_compressfile(string fileName); [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern int sqlite3_decompressfile(string fileName); | | | < | 231 232 233 234 235 236 237 238 239 | internal static extern int sqlite3_encryptedstatus(string fileName, out long fileStatus); [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern int sqlite3_compressfile(string fileName); [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern int sqlite3_decompressfile(string fileName); } } |
Changes to test/Program.cs.
︙ | ︙ | |||
9 10 11 12 13 14 15 | class Program { static void Main(string[] args) { DbProviderFactory fact; DbConnection cnn; | < < < < < < < < < < < < < | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | class Program { static void Main(string[] args) { DbProviderFactory fact; DbConnection cnn; using (cnn = new SQLiteConnection()) { fact = DbProviderFactories.GetFactory("System.Data.SQLite"); cnn.ConnectionString = "Data Source=test.db3"; cnn.Open(); TestCases.Run(fact, cnn); } System.IO.File.Delete("test.db3"); Console.ReadKey(); |
︙ | ︙ |
Changes to testce/Program.cs.
︙ | ︙ | |||
9 10 11 12 13 14 15 | class Program { [MTAThread] static void Main() { DbConnection cnn; | < < < < < < < < < < < < < | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | class Program { [MTAThread] static void Main() { DbConnection cnn; SQLiteFunction.RegisterFunction(typeof(TestFunc)); SQLiteFunction.RegisterFunction(typeof(MyCount)); SQLiteFunction.RegisterFunction(typeof(MySequence)); using (cnn = new SQLiteConnection()) { TestCases tests = new TestCases(); cnn.ConnectionString = "Data Source=test.db3"; cnn.Open(); tests.Run(cnn); System.Windows.Forms.Application.Run(tests.frm); } System.IO.File.Delete("test.db3"); |
︙ | ︙ |