Version History
+1.0.55.0 - August 6, 2008
+-
+
- Code merge with SQLite 3.6.1 +
- Added support for the user-contributed extension-functions at + http://www.sqlite.org/contrib. + Feel free to override any of them with your own implementation. The new + functions are: 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, and + aggregates stdev, variance, mode, median, lower_quartile, upper_quartile. +
- Moved the last_rows_affected() function to the C extension library. +
- 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. +
- When registering user-defined collation sequences and functions, the provider + will now register both a UTF8 and a UTF16 version instead of just UTF8. +
- Revamped connection pooling and added static ClearPool() and ClearAllPools() + functions to SQLiteConnection. Behavior of the pool and its clearing + mechanics match SqlClient. +
- 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. +
- 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. +
- Revamped the test.exe program. It's now an interactive GUI application. + Easier for me to add tests now. +
- Tweaks to the VS designer package and installer. +
- More adjustments to the internal SQLite3.Prepare() method to account for both + kinds of lock errors when retrying. +
- 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. +
- Rerigged internal callbacks for userdef functions and other native to managed + callbacks. More portable this way. +
- 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. +
- Added "boolean" and a couple other missing datatypes to the "DataTypes" schema + xml file. Used by the VS designer when displaying tables and querying. +
- Added a new connection string option "Read Only". When set to True, the + database will be opened in read-only mode. +
- Added a new connection string option "Max Pool Size" to set the maximum size + of the connection pool for a given db file connection. +
- Added a new connection string option "Default IsolationLevel" to set the + default isolation level of transactions. Possible values are Serializable and + ReadCommitted. +
- Added a new connection string option "URI" as an optional parameter for + compatibility with other ports of the provider. +
1.0.54.0 - July 25, 2008
- Fixed the setup project, which somehow "forgot" to include all the binaries in the 53 release.
- Fixed a crash in the table designer when creating a new table and tabbing past
Index: Doc/SQLite.NET.chm
==================================================================
--- Doc/SQLite.NET.chm
+++ Doc/SQLite.NET.chm
cannot compute difference between binary files
Index: SQLite.Designer/AssemblyInfo.cs
==================================================================
--- SQLite.Designer/AssemblyInfo.cs
+++ SQLite.Designer/AssemblyInfo.cs
@@ -30,10 +30,10 @@
// 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.33.0")]
-[assembly: AssemblyFileVersion("1.0.33.0")]
+[assembly: AssemblyVersion("1.0.35.0")]
+[assembly: AssemblyFileVersion("1.0.35.0")]
[assembly: AssemblyDelaySignAttribute(false)]
[assembly: AssemblyKeyFileAttribute("..\\System.Data.SQLite\\System.Data.SQLite.snk")]
[assembly: AssemblyKeyNameAttribute("")]
Index: SQLite.Designer/Design/Table.cs
==================================================================
--- SQLite.Designer/Design/Table.cs
+++ SQLite.Designer/Design/Table.cs
@@ -31,11 +31,10 @@
private string _name;
private string _oldname;
private string _catalog;
private List
_columns = new List (); private bool _exists = false; - private bool _hascheck = false; private string _origSql = String.Empty; private List _indexes = new List (); private List _oldindexes = new List (); private List _fkeys = new List (); private List _oldfkeys = new List (); @@ -90,11 +89,10 @@ using (DataTable tbl = _connection.GetSchema("Tables", new string[] { Catalog, null, Name })) { if (tbl.Rows.Count > 0) { _exists = true; - _hascheck = (bool)tbl.Rows[0]["HAS_CHECKCONSTRAINTS"]; _origSql = tbl.Rows[0]["TABLE_DEFINITION"].ToString().Trim().TrimEnd(';'); } else { _exists = false; @@ -267,16 +265,10 @@ public string OriginalSql { get { return _origSql; } } - [Browsable(false)] - public bool HasCheck - { - get { return _hascheck; } - } - [Category("Storage")] [RefreshProperties(RefreshProperties.All)] [ParenthesizePropertyName(true)] public override string Name { Index: SQLite.Designer/SQLite.Designer.csproj ================================================================== --- SQLite.Designer/SQLite.Designer.csproj +++ SQLite.Designer/SQLite.Designer.csproj @@ -1,10 +1,10 @@ Debug AnyCPU -9.0.30428 +9.0.30703 2.0 {9B4A5CF6-5BE5-4926-ACC7-B729A8C05198} Library Properties SQLite.Designer @@ -68,10 +68,11 @@False ..\..\..\Program Files (x86)\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Common\Assemblies\2005\Microsoft.VisualStudio.Data.dll False False False @@ -203,10 +204,13 @@+ + Index: SQLite.Designer/SQLiteConnectionProperties.cs ================================================================== --- SQLite.Designer/SQLiteConnectionProperties.cs +++ SQLite.Designer/SQLiteConnectionProperties.cs @@ -15,71 +15,91 @@ /// /// Provides rudimentary connectionproperties support /// internal sealed class SQLiteConnectionProperties : AdoDotNetConnectionProperties { - public SQLiteConnectionProperties() : base("System.Data.SQLite") + public SQLiteConnectionProperties() + : this(null) { } - public SQLiteConnectionProperties(string connectionString) : base("System.Data.SQLite", connectionString) + public SQLiteConnectionProperties(string connectionString) + : base("System.Data.SQLite", connectionString) { } public override string[] GetBasicProperties() { - return new string[] { "Data Source" }; + return new string[] { "data source" }; + } + + protected override bool ShouldPersistProperty(string propertyName) + { + if (String.Compare(propertyName, "Database", StringComparison.OrdinalIgnoreCase) == 0) return false; + + return base.ShouldPersistProperty(propertyName); + } + + public override bool Contains(string propertyName) + { + if (String.Compare(propertyName, "Database", StringComparison.OrdinalIgnoreCase) == 0) + return (base.Contains("data source") || base.Contains("uri")); + + return base.Contains(propertyName); + } + + public override object this[string propertyName] + { + get + { + if (String.Compare(propertyName, "Database", StringComparison.OrdinalIgnoreCase) == 0) + return System.IO.Path.GetFileNameWithoutExtension(GetDatabaseFile()); + + return base[propertyName]; + } + set + { + base[propertyName] = value; + } + } + + internal string GetDatabaseFile() + { + if (this["data source"] is string && ((string)this["data source"]).Length > 0) + return (string)this["data source"]; + else if (this["uri"] is string) + return MapUriPath((string)this["uri"]); + return String.Empty; } public override bool IsComplete { get { - return true; - } - } - - public override bool EquivalentTo(DataConnectionProperties connectionProperties) - { - SQLiteConnectionProperties props = connectionProperties as SQLiteConnectionProperties; - - if (props == null) return false; - - return (String.Compare((string)this["Data Source"], (string)props["Data Source"], true) == 0); - } - // Provides automatic locating and loading of the SQLite assembly if its not registered in the GAC. - // However, if it's not registered in the GAC, then certain design-time elements will fail. - // - //private static System.Reflection.Assembly _sqlite = null; - //static SQLiteConnectionProperties() - //{ - // AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); - //} - - //private static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) - //{ - // if (args.Name.StartsWith("System.Data.SQLite", StringComparison.InvariantCultureIgnoreCase)) - // { - // return SQLiteAssembly; - // } - // return null; - //} - - //internal static System.Reflection.Assembly SQLiteAssembly - //{ - // get - // { - // if (_sqlite == null) - // { - // using (RegistryKey key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\.NETFramework\\v2.0.50727\\AssemblyFoldersEx\\SQLite")) - // { - // if (key != null) - // { - // _sqlite = System.Reflection.Assembly.LoadFrom(System.IO.Path.Combine(key.GetValue(null).ToString(), "System.Data.SQLite.DLL")); - // } - // } - // } - // return _sqlite; - // } - //} + if (Contains("data source") == true) + { + if (this["data source"] is string && ((string)this["data source"]).Length > 0) + return true; + } + else if (Contains("uri") == true) + { + if (this["uri"] is string && MapUriPath((string)this["uri"]).Length > 0) + return true; + } + + return false; + } + } + + internal static string MapUriPath(string path) + { + if (path.StartsWith("file://")) + return path.Substring(7); + else if (path.StartsWith("file:")) + return path.Substring(5); + else if (path.StartsWith("/")) + return path; + else + return String.Empty; + } } } Index: SQLite.Designer/SQLiteConnectionUIControl.Designer.cs ================================================================== --- SQLite.Designer/SQLiteConnectionUIControl.Designer.cs +++ SQLite.Designer/SQLiteConnectionUIControl.Designer.cs @@ -47,10 +47,11 @@ this.browseButton = new System.Windows.Forms.Button(); this.newDatabase = new System.Windows.Forms.Button(); this.offRadioButton = new System.Windows.Forms.RadioButton(); this.normalRadioButton = new System.Windows.Forms.RadioButton(); this.fullRadioButton = new System.Windows.Forms.RadioButton(); + this.julianRadioButton = new System.Windows.Forms.RadioButton(); labelPassword = new System.Windows.Forms.Label(); securityGroup = new System.Windows.Forms.GroupBox(); encodingGroup = new System.Windows.Forms.GroupBox(); dateTimeGroup = new System.Windows.Forms.GroupBox(); databaseGroup = new System.Windows.Forms.GroupBox(); @@ -129,10 +130,11 @@ this.utf8RadioButton.UseVisualStyleBackColor = true; this.utf8RadioButton.CheckedChanged += new System.EventHandler(this.encoding_Changed); // // dateTimeGroup // + dateTimeGroup.Controls.Add(this.julianRadioButton); dateTimeGroup.Controls.Add(this.ticksRadioButton); dateTimeGroup.Controls.Add(this.iso8601RadioButton); dateTimeGroup.Location = new System.Drawing.Point(84, 159); dateTimeGroup.Name = "dateTimeGroup"; dateTimeGroup.Size = new System.Drawing.Size(113, 98); @@ -141,11 +143,11 @@ dateTimeGroup.Text = "Date/Time Format"; // // ticksRadioButton // this.ticksRadioButton.AutoSize = true; - this.ticksRadioButton.Location = new System.Drawing.Point(6, 44); + this.ticksRadioButton.Location = new System.Drawing.Point(7, 66); this.ticksRadioButton.Name = "ticksRadioButton"; this.ticksRadioButton.Size = new System.Drawing.Size(48, 17); this.ticksRadioButton.TabIndex = 1; this.ticksRadioButton.TabStop = true; this.ticksRadioButton.Text = "Ticks"; @@ -290,19 +292,31 @@ this.fullRadioButton.TabIndex = 0; this.fullRadioButton.Text = "Full"; this.fullRadioButton.UseVisualStyleBackColor = true; this.fullRadioButton.CheckedChanged += new System.EventHandler(this.sync_Changed); // + // julianRadioButton + // + this.julianRadioButton.AutoSize = true; + this.julianRadioButton.Location = new System.Drawing.Point(7, 44); + this.julianRadioButton.Name = "julianRadioButton"; + this.julianRadioButton.Size = new System.Drawing.Size(74, 17); + this.julianRadioButton.TabIndex = 2; + this.julianRadioButton.TabStop = true; + this.julianRadioButton.Text = "Julian Day"; + this.julianRadioButton.UseVisualStyleBackColor = true; + this.julianRadioButton.CheckedChanged += new System.EventHandler(this.datetime_Changed); + // // SQLiteConnectionUIControl // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.Controls.Add(syncGroup); this.Controls.Add(databaseGroup); this.Controls.Add(dateTimeGroup); this.Controls.Add(encodingGroup); this.Controls.Add(securityGroup); - this.Font = new System.Drawing.Font("MS Shell Dlg 2", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Name = "SQLiteConnectionUIControl"; this.Size = new System.Drawing.Size(312, 322); securityGroup.ResumeLayout(false); securityGroup.PerformLayout(); encodingGroup.ResumeLayout(false); @@ -330,7 +344,8 @@ private System.Windows.Forms.TextBox pageSizeTextBox; private System.Windows.Forms.TextBox cacheSizeTextbox; private System.Windows.Forms.RadioButton offRadioButton; private System.Windows.Forms.RadioButton normalRadioButton; private System.Windows.Forms.RadioButton fullRadioButton; + private System.Windows.Forms.RadioButton julianRadioButton; } } Index: SQLite.Designer/SQLiteConnectionUIControl.cs ================================================================== --- SQLite.Designer/SQLiteConnectionUIControl.cs +++ SQLite.Designer/SQLiteConnectionUIControl.cs @@ -54,65 +54,70 @@ #region IDataConnectionUIControl Members public override void LoadProperties() { - fileTextBox.Text = ConnectionProperties["Data Source"] as string; - passwordTextBox.Text = ConnectionProperties["Password"] as string; + if (ConnectionProperties.Contains("data source")) + fileTextBox.Text = ConnectionProperties["data source"] as string; + + if (ConnectionProperties.Contains("password")) + passwordTextBox.Text = ConnectionProperties["password"] as string; } #endregion private void passwordTextBox_Leave(object sender, EventArgs e) { if (String.IsNullOrEmpty(passwordTextBox.Text)) - ConnectionProperties.Remove("Password"); + ConnectionProperties.Remove("password"); else - ConnectionProperties["Password"] = passwordTextBox.Text; + ConnectionProperties["password"] = passwordTextBox.Text; } private void encoding_Changed(object sender, EventArgs e) { if (utf8RadioButton.Checked == true) - ConnectionProperties.Remove("UseUTF16Encoding"); + ConnectionProperties.Remove("useutf16encoding"); else - ConnectionProperties["UseUTF16Encoding"] = utf16RadioButton.Checked; + ConnectionProperties["useutf16encoding"] = utf16RadioButton.Checked; } private void datetime_Changed(object sender, EventArgs e) { if (iso8601RadioButton.Checked == true) - ConnectionProperties.Remove("DateTimeFormat"); + ConnectionProperties.Remove("datetimeformat"); + else if (ticksRadioButton.Checked == true) + ConnectionProperties["datetimeformat"] = "Ticks"; else - ConnectionProperties["DateTimeFormat"] = "Ticks"; + ConnectionProperties["datetimeformat"] = "JulianDay"; } private void sync_Changed(object sender, EventArgs e) { string sync = "Normal"; if (fullRadioButton.Checked == true) sync = "Full"; else if (offRadioButton.Checked == true) sync = "Off"; if (sync == "Normal") - ConnectionProperties.Remove("Synchronous"); + ConnectionProperties.Remove("synchronous"); else - ConnectionProperties["Synchronous"] = sync; + ConnectionProperties["synchronous"] = sync; } private void pageSizeTextBox_Leave(object sender, EventArgs e) { int n = Convert.ToInt32(pageSizeTextBox.Text); - ConnectionProperties["Page Size"] = n; + ConnectionProperties["page size"] = n; } private void cacheSizeTextbox_Leave(object sender, EventArgs e) { int n = Convert.ToInt32(cacheSizeTextbox.Text); - ConnectionProperties["Cache Size"] = n; + ConnectionProperties["cache size"] = n; } private void fileTextBox_Leave(object sender, EventArgs e) { - ConnectionProperties["Data Source"] = fileTextBox.Text; + ConnectionProperties["data source"] = fileTextBox.Text; } } } Index: SQLite.Designer/SQLiteConnectionUIControl.resx ================================================================== --- SQLite.Designer/SQLiteConnectionUIControl.resx +++ SQLite.Designer/SQLiteConnectionUIControl.resx @@ -130,16 +130,10 @@False False - -False -- False -False False Index: SQLite.Designer/SQLitePackage.cs ================================================================== --- SQLite.Designer/SQLitePackage.cs +++ SQLite.Designer/SQLitePackage.cs @@ -26,12 +26,29 @@ protected override void Initialize() { IServiceContainer sc = (IServiceContainer)this; sc.AddService(typeof(SQLiteProviderObjectFactory), new ServiceCreatorCallback(CreateService), true); + + ToolboxInitialized += new EventHandler(SQLitePackage_ToolboxInitialized); + ToolboxUpgraded += new EventHandler(SQLitePackage_ToolboxUpgraded); base.Initialize(); } + + void SQLitePackage_ToolboxUpgraded(object sender, EventArgs e) + { + IVsToolbox vstbx = GetService(typeof(SVsToolbox)) as IVsToolbox; + + vstbx.RemoveTab("SQLite"); + + SQLitePackage_ToolboxInitialized(sender, e); + } + + void SQLitePackage_ToolboxInitialized(object sender, EventArgs e) + { + ParseToolboxResource(new System.IO.StringReader(VSPackage.ToolboxItems), null); + } private object CreateService(IServiceContainer container, Type serviceType) { if (serviceType == typeof(SQLiteProviderObjectFactory)) return new SQLiteProviderObjectFactory(); Index: SQLite.Designer/VSPackage.Designer.cs ================================================================== --- SQLite.Designer/VSPackage.Designer.cs +++ SQLite.Designer/VSPackage.Designer.cs @@ -100,7 +100,16 @@ internal static string ReEncrypt { get { return ResourceManager.GetString("ReEncrypt", resourceCulture); } } + + ///+ /// Looks up a localized string similar to . + /// + internal static string ToolboxItems { + get { + return ResourceManager.GetString("ToolboxItems", resourceCulture); + } + } } } Index: SQLite.Designer/VSPackage.resx ================================================================== --- SQLite.Designer/VSPackage.resx +++ SQLite.Designer/VSPackage.resx @@ -131,6 +131,9 @@Resources\info.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + +Resources\ToolboxItems.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + Index: bin/CompactFramework/System.Data.SQLite.DLL ================================================================== --- bin/CompactFramework/System.Data.SQLite.DLL +++ bin/CompactFramework/System.Data.SQLite.DLL cannot compute difference between binary files Index: bin/CompactFramework/System.Data.SQLite.lib ================================================================== --- bin/CompactFramework/System.Data.SQLite.lib +++ bin/CompactFramework/System.Data.SQLite.lib cannot compute difference between binary files Index: bin/CompactFramework/testce.exe ================================================================== --- bin/CompactFramework/testce.exe +++ bin/CompactFramework/testce.exe cannot compute difference between binary files Index: bin/Designer/SQLite.Designer.dll ================================================================== --- bin/Designer/SQLite.Designer.dll +++ bin/Designer/SQLite.Designer.dll cannot compute difference between binary files Index: bin/Designer/SQLite.Designer.pdb ================================================================== --- bin/Designer/SQLite.Designer.pdb +++ bin/Designer/SQLite.Designer.pdb cannot compute difference between binary files Index: bin/Designer/install.exe ================================================================== --- bin/Designer/install.exe +++ bin/Designer/install.exe cannot compute difference between binary files Index: bin/Designer/install.pdb ================================================================== --- bin/Designer/install.pdb +++ bin/Designer/install.pdb cannot compute difference between binary files Index: bin/System.Data.SQLite.XML ================================================================== --- bin/System.Data.SQLite.XML +++ bin/System.Data.SQLite.XML @@ -2,10 +2,59 @@System.Data.SQLite + + ++ The connection pool object + ++ ++ The default version number new pools will get + ++ ++ Attempt to pull a pooled connection out of the queue for active duty + + The filename for a desired connection + The maximum size the connection pool for the filename can be + The pool version the returned connection will belong to +Returns NULL if no connections were available. Even if none are, the poolversion will still be a valid pool version ++ ++ Clears out all pooled connections and rev's up the default pool version to force all old active objects + not in the pool to get discarded rather than returned to their pools. + ++ ++ Clear a given pool for a given filename. Discards anything in the pool for the given file, and revs the pool + version so current active objects on the old version of the pool will get discarded rather than be returned to the pool. + + The filename of the pool to clear ++ ++ Return a connection to the pool for someone else to use. + + The filename of the pool to use + The connection handle to pool + The pool version the handle was created under ++ If the version numbers don't match between the connection and the pool, then the handle is discarded. + ++ + Keeps track of connections made on a specified file. The PoolVersion dictates whether old objects get + returned to the pool or discarded when no longer in use. + +SQLite implentation of DbConnection. @@ -97,11 +146,11 @@ Legacy Format True - Use the more compatible legacy 3.x database format
False - Use the newer 3.3x database format which compresses numbers more effectivelyN -True +False Default Timeout {time in seconds}
The default command timeoutN @@ -111,10 +160,28 @@Journal Mode Delete - Delete the journal file after a commit
Persist - Zero out and leave the journal file on disk after a commit
Off - Disable the rollback journal entirelyN Delete - +
+Read Only +True - Open the database for read only access +
False - Open the database for normal read/write accessN +False +- +
+Max Pool Size +The maximum number of connections for the given connection string that can be in the connection pool +N +100 +- +
Default IsolationLevel +The default transaciton isolation level +N +Serializable +@@ -128,10 +195,15 @@ Nesting level of the transactions open on the connection ++ + The default isolation level for new transactions + Whether or not the connection is enlisted in a distrubuted transaction @@ -218,32 +290,41 @@ The new state. If it is different from the previous state, an event is raised.- Creates a new SQLiteTransaction if one isn't already active on the connection. + OBSOLETE. Creates a new SQLiteTransaction if one isn't already active on the connection. - SQLite doesn't support varying isolation levels, so this parameter is ignored. + This parameter is ignored. When TRUE, SQLite defers obtaining a write lock until a write operation is requested. When FALSE, a writelock is obtained immediately. The default is TRUE, but in a multi-threaded multi-writer environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.Returns a SQLiteTransaction object. - Creates a new SQLiteTransaction if one isn't already active on the connection. + OBSOLETE. Creates a new SQLiteTransaction if one isn't already active on the connection. When TRUE, SQLite defers obtaining a write lock until a write operation is requested. - When FALSE, a writelock is obtained immediately. The default is TRUE, but in a multi-threaded multi-writer + When FALSE, a writelock is obtained immediately. The default is false, but in a multi-threaded multi-writer environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.Returns a SQLiteTransaction object. Creates a new SQLiteTransaction if one isn't already active on the connection. - SQLite supports only serializable transactions. + Supported isolation levels are Serializable, ReadCommitted and Unspecified. ++ Unspecified will use the default isolation level specified in the connection string. If no isolation level is specified in the + connection string, Serializable is used. + Serializable transactions are the default. In this mode, the engine gets an immediate lock on the database, and no other threads + may begin a transaction. Other threads may read from the database, but not write. + With a ReadCommitted isolation level, locks are deferred and elevated as needed. It is possible for multiple threads to start + a transaction in ReadCommitted mode, but if a thread attempts to commit a transaction while another thread + has a ReadCommitted lock, it may timeout or cause a deadlock on both threads until both threads' CommandTimeout's are reached. + Returns a SQLiteTransaction object. Creates a new SQLiteTransaction if one isn't already active on the connection. @@ -252,11 +333,11 @@ Forwards to the local BeginTransaction() function - + Supported isolation levels are Unspecified, Serializable, and ReadCommittedNot implemented @@ -265,10 +346,22 @@ When the database connection is closed, all commands linked to this connection are automatically reset. ++ ++ Clears the connection pool associated with the connection. Any other active connections using the same database file + will be discarded instead of returned to the pool when they are closed. + + ++ + Clears all connection pools. Any active connections will be discarded instead of sent to the pool when they are closed. + Create a new SQLiteCommand and associate it with this connection. @@ -278,14 +371,15 @@Forwards to the local CreateCommand() function + Parses the connection string into component parts + The connection string to parseAn array of key-value pairs representing each parameter of the connection string Manual distributed transaction enlistment support @@ -587,11 +681,11 @@ Legacy Format True - Use the more compatible legacy 3.x database format
False - Use the newer 3.3x database format which compresses numbers more effectivelyN -True +False Default Timeout {time in seconds}
The default command timeoutN @@ -601,10 +695,28 @@Journal Mode Delete - Delete the journal file after a commit
Persist - Zero out and leave the journal file on disk after a commit
Off - Disable the rollback journal entirelyN Delete - +
+Read Only +True - Open the database for read only access +
False - Open the database for normal read/write accessN +False +- +
+Max Pool Size +The maximum number of connections for the given connection string that can be in the connection pool +N +100 +- +
Default IsolationLevel +The default transaciton isolation level +N +Serializable +@@ -724,127 +836,10 @@ Gets/sets the delete command for this DataAdapter - -- 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. - -- -- Not used - -- -- All integers in SQLite default to Int64 - -- -- All floating point numbers in SQLite default to double - -- -- The default data type of SQLite is text - -- -- Typically blob types are only seen when returned from a function - -- -- Null types can be returned from functions - -- -- Used internally by this provider - -- -- Used internally - -- -- This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of three formats. Ticks, ISO8601 - and JulianDay. - Ticks is inherently more accurate, but less compatible with 3rd party tools that query the database, and renders the DateTime field - unreadable as text without post-processing. - ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second. - JulianDay is the numeric format the SQLite uses internally and is arguably the most compatible with 3rd party tools. It is - not readable as text without post-processing. - -- -- Using ticks is more accurate but less compatible with other viewers and utilities that access your database. - -- -- The default format for this provider. - -- -- JulianDay format, which is what SQLite uses internally - -- -- This enum determines how SQLite treats its journal file. - -- By default SQLite will create and delete the journal file when needed during a transaction. - However, for some computers running certain filesystem monitoring tools, the rapid - creation and deletion of the journal file can cause those programs to fail, or to interfere with SQLite. - - If a program or virus scanner is interfering with SQLite's journal file, you may receive errors like "unable to open database file" - when starting a transaction. If this is happening, you may want to change the default journal mode to Persist. - -- -- The default mode, this causes SQLite to create and destroy the journal file as-needed. - -- -- When this is set, SQLite will keep the journal file even after a transaction has completed. It's contents will be erased, - and the journal re-used as often as needed. If it is deleted, it will be recreated the next time it is needed. - -- -- This option disables the rollback journal entirely. Interrupted transactions or a program crash can cause database - corruption in this mode! - -- -- Struct used internally to determine the datatype of a column in a resultset - -- -- The DbType of the column, or DbType.Object if it cannot be determined - -- - The affinity of a column, used for expressions or when Type is DbType.Object - -This base class provides datatype conversion services for the SQLite provider. A string array of the split up elements ++ ++ Convert a value to true or false. + + A string or number representing true or false ++ + + Convert a string to true or false. + + A string representing true or false ++ + "yes", "no", "y", "n", "0", "1", "on", "off" as well as Boolean.FalseString and Boolean.TrueString will all be + converted to a proper boolean value. + Determines the data type of a column in a statement @@ -1027,10 +1040,131 @@For a given type name, return a closest-match .NET type The name of the type to matchThe .NET DBType the text evaluates to. ++ ++ 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. + ++ ++ Not used + ++ ++ All integers in SQLite default to Int64 + ++ ++ All floating point numbers in SQLite default to double + ++ ++ The default data type of SQLite is text + ++ ++ Typically blob types are only seen when returned from a function + ++ ++ Null types can be returned from functions + ++ ++ Used internally by this provider + ++ ++ Used internally + ++ ++ This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of three formats. Ticks, ISO8601 + and JulianDay. + ++ ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second. + JulianDay is the numeric format the SQLite uses internally and is arguably the most compatible with 3rd party tools. It is + not readable as text without post-processing. + Ticks less compatible with 3rd party tools that query the database, and renders the DateTime field unreadable as text without post-processing. + + The preferred order of choosing a datetime format is JulianDay, ISO8601, and then Ticks. Ticks is mainly present for legacy + code support. + ++ ++ Using ticks is not recommended and is not well supported with LINQ. + ++ ++ The default format for this provider. + ++ ++ JulianDay format, which is what SQLite uses internally + ++ ++ This enum determines how SQLite treats its journal file. + ++ By default SQLite will create and delete the journal file when needed during a transaction. + However, for some computers running certain filesystem monitoring tools, the rapid + creation and deletion of the journal file can cause those programs to fail, or to interfere with SQLite. + + If a program or virus scanner is interfering with SQLite's journal file, you may receive errors like "unable to open database file" + when starting a transaction. If this is happening, you may want to change the default journal mode to Persist. + ++ ++ The default mode, this causes SQLite to create and destroy the journal file as-needed. + ++ ++ When this is set, SQLite will keep the journal file even after a transaction has completed. It's contents will be erased, + and the journal re-used as often as needed. If it is deleted, it will be recreated the next time it is needed. + ++ ++ This option disables the rollback journal entirely. Interrupted transactions or a program crash can cause database + corruption in this mode! + ++ ++ Struct used internally to determine the datatype of a column in a resultset + ++ ++ The DbType of the column, or DbType.Object if it cannot be determined + ++ + The affinity of a column, used for expressions or when Type is DbType.Object + SQLite implementation of DbTransaction. @@ -1124,52 +1258,10 @@A single sub-query for a given table/database. - -- The type of user-defined function to declare - -- -- Scalar functions are designed to be called and return a result immediately. Examples include ABS(), Upper(), Lower(), etc. - -- -- Aggregate functions are designed to accumulate data until the end of a call and then return a result gleaned from the accumulated data. - Examples include SUM(), COUNT(), AVG(), etc. - -- -- Collation sequences are used to sort textual data in a custom manner, and appear in an ORDER BY clause. Typically text in an ORDER BY is - sorted using a straight case-insensitive comparison function. Custom collating sequences can be used to alter the behavior of text sorting - in a user-defined manner. - -- -- An internal callback delegate declaration. - - Raw context pointer for the user function - Count of arguments to the function - A pointer to the array of argument pointers -- - Internal callback delegate for implementing collation sequences - - Length of the string pv1 - Pointer to the first string to compare - Length of the string pv2 - Pointer to the second string to compare -Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater - than the second. -This abstract class is designed to handle user-defined functions easily. An instance of the derived class is made for each connection to the database. @@ -1189,15 +1281,10 @@The base connection this function is attached to - - Used internally to keep track of memory allocated for aggregate functions - -Internal array used to keep track of aggregate function context data Holds a reference to the callback function for collation sequences ++ + Current context of the current callback. Only valid during a callback + This static list contains all the user-defined functions declared using the proper attributes. @@ -1308,14 +1400,15 @@ A raw context pointer Number of arguments passed in A pointer to the array of arguments+ Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. + Not used Length of the string pv1 Pointer to the first string to compare Length of the string pv2 Pointer to the second string to compareReturns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater @@ -1332,17 +1425,15 @@ A raw context pointer Number of arguments passed in A pointer to the array of arguments + +An internal aggregate Final function callback, which wraps the context pointer and calls the virtual Final() method. A raw context pointer - Not used, always zero - Not used, always zeroPlaceholder for a user-defined disposal routine @@ -1372,11 +1463,11 @@ Called by SQLiteBase derived classes, this function binds all user-defined functions to a connection. It is done this way so that all user-defined functions will access the database using the same encoding scheme as the connection (UTF-8 or UTF-16).- The wrapper functions that interop with SQLite will create a unique cooke value, which internally is a pointer to + The wrapper functions that interop with SQLite will create a unique cookie value, which internally is a pointer to all the wrapped callback functions. The interop function uses it to map CDecl callbacks to StdCall callbacks. The base object on which the functions are to bindReturns an array of functions which the connection object should retain until the connection is closed. 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. + ++ Extends SQLiteFunction and allows an inherited class to obtain the collating sequence associated with a function call. + ++ User-defined functions can call the GetCollationSequence() method in this class and use it to compare strings and char arrays. + ++ ++ Obtains the collating sequence in effect for the given function. + ++ As an optimization, SQLite does not fill in this information when calling functions, unless the NeedCollationSequence + boolean value is set to true in the SQLiteFunctionAttribute. + ++ + ++ The type of user-defined function to declare + ++ ++ Scalar functions are designed to be called and return a result immediately. Examples include ABS(), Upper(), Lower(), etc. + ++ ++ Aggregate functions are designed to accumulate data until the end of a call and then return a result gleaned from the accumulated data. + Examples include SUM(), COUNT(), AVG(), etc. + ++ ++ Collation sequences are used to sort textual data in a custom manner, and appear in an ORDER BY clause. Typically text in an ORDER BY is + sorted using a straight case-insensitive comparison function. Custom collating sequences can be used to alter the behavior of text sorting + in a user-defined manner. + ++ ++ An internal callback delegate declaration. + + Raw context pointer for the user function + Count of arguments to the function + A pointer to the array of argument pointers ++ ++ An internal final callback delegate declaration. + + Raw context pointer for the user function ++ ++ Internal callback delegate for implementing collation sequences + + Not used + Length of the string pv1 + Pointer to the first string to compare + Length of the string pv2 + Pointer to the second string to compare +Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater + than the second. ++ ++ The type of collating sequence + ++ ++ The built-in BINARY collating sequence + ++ ++ The built-in NOCASE collating sequence + ++ ++ The built-in REVERSE collating sequence + ++ ++ A custom user-defined collating sequence + ++ ++ The encoding type the collation sequence uses + ++ ++ The collation sequence is UTF8 + ++ ++ The collation sequence is UTF16 little-endian + ++ ++ The collation sequence is UTF16 big-endian + ++ ++ A struct describing the collating sequence a function is executing in + ++ ++ The name of the collating sequence + ++ ++ The type of collating sequence + ++ ++ The text encoding of the collation sequence + ++ ++ Context of the function that requested the collating sequence + ++ ++ Calls the base collating sequence to compare two strings + + The first string to compare + The second string to compare +-1 if s1 is less than s2, 0 if s1 is equal to s2, and 1 if s1 is greater than s2 ++ + Calls the base collating sequence to compare two character arrays + + The first array to compare + The second array to compare +-1 if c1 is less than c2, 0 if c1 is equal to c2, and 1 if c1 is greater than c2 +SQLite implementation of DbDataReader. Returns foreign key information for the given catalog ++ + Returns the triggers on the database + SQLite implementation of DbCommand. @@ -2251,20 +2500,22 @@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. + Opens a database. - If true, the connection can be pulled from the connection poolImplementers should call SQLiteFunction.BindFunctions() and save the array after opening a connection to bind all attributed user-defined functions and collating sequences to the new connection. The filename of the database to open. SQLite automatically creates it if it doesn't exist. + The open flags to use when creating the connection + The maximum size of the pool for the given filename + If true, the connection can be pulled from the connection poolCloses the currently-open database. @@ -2282,10 +2533,15 @@Returns the text of the last error issued by SQLite + + + When pooling is enabled, force this connection to be disposed rather than returned to the pool + Prepares a SQL statement for execution. @@ -2389,10 +2645,15 @@Gets/Sets the filename to open on the connection string. ++ + An alternate to the data source property + Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible. @@ -2413,10 +2674,15 @@ If enabled, uses the legacy 3.xx format for maximum compatibility, but results in larger database sizes. ++ + When enabled, the database will be opened for read-only access and writing will be disabled. + Gets/sets the database encryption password @@ -2438,10 +2704,20 @@Gets/Sets the datetime format for the connection. ++ ++ Determines how SQLite handles the transaction journal file. + ++ + Sets the default isolation level for transactions on the connection. + This class implements SQLiteBase completely, and is the guts of the code that interop's SQLite with .NET Index: bin/System.Data.SQLite.dll ================================================================== --- bin/System.Data.SQLite.dll +++ bin/System.Data.SQLite.dll cannot compute difference between binary files Index: bin/System.Data.SQLite.lib ================================================================== --- bin/System.Data.SQLite.lib +++ bin/System.Data.SQLite.lib cannot compute difference between binary files Index: bin/itanium/System.Data.SQLite.DLL ================================================================== --- bin/itanium/System.Data.SQLite.DLL +++ bin/itanium/System.Data.SQLite.DLL cannot compute difference between binary files Index: bin/itanium/System.Data.SQLite.lib ================================================================== --- bin/itanium/System.Data.SQLite.lib +++ bin/itanium/System.Data.SQLite.lib cannot compute difference between binary files Index: bin/test.exe ================================================================== --- bin/test.exe +++ bin/test.exe cannot compute difference between binary files Index: bin/x64/System.Data.SQLite.DLL ================================================================== --- bin/x64/System.Data.SQLite.DLL +++ bin/x64/System.Data.SQLite.DLL cannot compute difference between binary files Index: bin/x64/System.Data.SQLite.lib ================================================================== --- bin/x64/System.Data.SQLite.lib +++ bin/x64/System.Data.SQLite.lib cannot compute difference between binary files