Version History
-1.0.98.0 - August 18, 2015
+1.0.98.0 - August XX, 2015 (release scheduled)
- Updated to SQLite 3.8.11.1.
- Add full support for Visual Studio 2015 and the .NET Framework 4.6. -
- Add support for creating custom SQL functions using delegates.
- Implement the Substring method for LINQ using the "substr" core SQL function. ** Potentially Incompatible Change ** -
- Prevent encrypted connections from being used with the connection pool. Pursuant to [89d3a159f1]. ** Potentially Incompatible Change **
- Honor the second argument to Math.Round when using LINQ. ** Potentially Incompatible Change **
- Honor the pre-existing flags for connections during the Open method. Fix for [964063da16]. ** Potentially Incompatible Change **
- Remove errant semi-colons from the SQL used by LINQ to INSERT and then SELECT rows with composite primary keys. Fix for [9d353b0bd8]. -
- Refactor INSERT/UPDATE handling (in the LINQ assembly) so it can handle composite and non-integer primary keys. Fix for [41aea496e0].
- Change the base type for the SQLiteConnectionFlags enumeration to long integer. ** Potentially Incompatible Change **
- Add extended return codes to the SQLiteErrorCode enumeration. Pursuant to [71bedaca19]. ** Potentially Incompatible Change **
- Improve exception handling in all native callbacks implemented in the SQLiteConnection class.
- Add Progress event and ProgressOps connection string property to enable raising progress events during long-running queries.
- Add "Recursive Triggers" connection string property to enable or disable the recursive trigger capability. Pursuant to [3a82ee635b]. Index: Doc/SQLite.NET.chm ================================================================== --- Doc/SQLite.NET.chm +++ Doc/SQLite.NET.chm cannot compute difference between binary files Index: Externals/Eagle/bin/Eagle.dll ================================================================== --- Externals/Eagle/bin/Eagle.dll +++ Externals/Eagle/bin/Eagle.dll cannot compute difference between binary files Index: Externals/Eagle/bin/EagleShell.exe ================================================================== --- Externals/Eagle/bin/EagleShell.exe +++ Externals/Eagle/bin/EagleShell.exe cannot compute difference between binary files Index: Externals/Eagle/bin/EagleShell32.exe ================================================================== --- Externals/Eagle/bin/EagleShell32.exe +++ Externals/Eagle/bin/EagleShell32.exe cannot compute difference between binary files Index: Externals/Eagle/bin/x64/Spilornis.dll ================================================================== --- Externals/Eagle/bin/x64/Spilornis.dll +++ Externals/Eagle/bin/x64/Spilornis.dll cannot compute difference between binary files Index: Externals/Eagle/bin/x86/Spilornis.dll ================================================================== --- Externals/Eagle/bin/x86/Spilornis.dll +++ Externals/Eagle/bin/x86/Spilornis.dll cannot compute difference between binary files Index: Externals/Eagle/lib/Eagle1.0/init.eagle ================================================================== --- Externals/Eagle/lib/Eagle1.0/init.eagle +++ Externals/Eagle/lib/Eagle1.0/init.eagle @@ -2035,11 +2035,11 @@ } upvar 1 $a array if {![array exists array]} { - error [appendArgs \" $a "\" isn't an array"] + error "\"$a\" isn't an array" } set names [lsort [eval array names array $args]] set maxLength 0 @@ -2157,155 +2157,18 @@ } return [uplevel 1 [list $command $name $description] $args] } - proc isObjectHandle { value } { - set pattern [string map [list \\ \\\\ \[ \\\[ \] \\\]] $value] - set objects [info objects $pattern] - - if {[llength $objects] == 1 && [lindex $objects 0] eq $value} then { - return true - } - - return false - } - - proc isManagedType { name } { - if {[llength [info commands object]] > 0} then { - if {![isObjectHandle $name]} then { - if {[catch { - object members -matchnameonly -nameonly -pattern Equals $name - } result] == 0 && $result eq "Equals"} then { - return true - } - } - } - - return false - } - - proc canGetManagedType { name {varName ""} } { - if {[llength [info commands object]] > 0} then { - if {![isObjectHandle $name]} then { - set cultureInfo [object invoke Interpreter.GetActive CultureInfo] - set type null - - set code [object invoke -create -alias -flags +NonPublic \ - Value GetType "" $name null null None $cultureInfo type] - - if {[$code ToString] eq "Ok"} then { - if {[string length $varName] > 0} then { - upvar 1 $varName typeName - } - - set typeName [$type AssemblyQualifiedName] - - if {[isManagedType $typeName]} then { - return true - } - } - } - } - - return false - } - - proc unknownObjectInvoke { level name args } { - # - # NOTE: This is an [unknown] procedure that attempts to lookup the - # name as a CLR type and then attempts to use [object invoke] - # with it, merging options and arguments as necessary. - # - if {[llength [info commands object]] > 0 && \ - ([isManagedType $name] || [canGetManagedType $name name])} then { - # - # NOTE: Get possible options for the [object invoke] sub-command. - # - set options [object invoke Utility GetInvokeOptions Invoke] - - # - # NOTE: Create argument list for the artificial [object invoke] - # alias. This always has two arguments. - # - set arguments1 [object create ArgumentList object invoke] - - # - # NOTE: Create argument list for the entire command being handled. - # There may be options right after the command name itself. - # - set arguments2 [eval \ - object create ArgumentList [concat [list $name] $args]] - - # - # NOTE: Setup output arguments needed for the MergeArguments method. - # - set arguments3 null; set error null - - # - # NOTE: Attempt to merge the option and non-option arguments into a - # single list of arguments. - # - set code [object invoke -alias -flags +NonPublic \ - Interpreter.GetActive MergeArguments $options $arguments1 \ - $arguments2 2 1 false false arguments3 error] - - # - # NOTE: Was the argument merging process successful? - # - if {$code eq "Ok"} then { - # - # NOTE: Jump up from our call frame (and optionally that of our - # caller) and attempt to invoke the specified static object - # method with the final list of merged arguments. - # - return [uplevel [expr {$level + 1}] [$arguments3 ToString]] - } else { - # - # NOTE: Failed to merge the arguments, raise an error. - # - error [$error ToString] - } - } - - continue; # NOTE: Not handled. - } - proc unknown { name args } { # - # NOTE: This is an [unknown] procedure that normally produces an - # appropriate error message; however, it can optionally try - # to invoke a static object method. + # NOTE: This is a stub unknown procedure that simply produces an + # appropriate error message. # # TODO: Add support for auto-loading packages here in the future? # - if {[hasRuntimeOption unknownObjectInvoke] && \ - [llength [info commands object]] > 0} then { - # - # NOTE: In the context of the caller, attempt to invoke a static - # object method using the specified arguments (which may - # contain variable names). - # - if {[catch { - eval unknownObjectInvoke 1 [list $name] $args - } result] == 0} then { - # - # NOTE: The static object method was invoked successfully. - # Return its result. - # - return -code ok $result - } elseif {[string length $result] > 0} then { - # - # NOTE: Attempting to invoke the static object method raised - # an error. Re-raise it now. If no error message was - # provided, fallback on the default (below). - # - return -code error $result - } - } - - return -code error [appendArgs "invalid command name \"" $name \"] + return -code error "invalid command name \"$name\"" } namespace eval ::tcl::tm { # # NOTE: Ideally, this procedure should be created in the "::tcl::tm" @@ -2333,20 +2196,10 @@ # NOTE: This should work properly in both Tcl and Eagle. # catch {puts stderr $string} } - proc makeProcedureFast { name fast } { - # - # NOTE: This should work properly in Eagle only. - # - catch { - uplevel 1 [list object invoke -flags +NonPublic \ - Interpreter.GetActive MakeProcedureFast $name $fast] - } - } - proc makeVariableFast { name fast } { # # NOTE: This should work properly in Eagle only. # catch { @@ -2389,58 +2242,10 @@ foreach dir [split [exec -unicode $::env(ComSpec) /u /c dir \ /ahd /b [appendArgs \" [file nativename $pattern] \"]] \n] { set dir [string trim $dir] - if {[string length $dir] > 0} then { - set dir [getDirResultPath $pattern $dir] - - if {[lsearch -variable -exact -nocase result $dir] == -1} then { - lappend result $dir - } - } - } - - return $result - } - - proc findDirectoriesRecursive { pattern } { - # - # NOTE: Block non-Windows platforms since this is Windows specific. - # - if {![isWindows]} then { - error "not supported on this operating system" - } - - # - # NOTE: This should work properly in Eagle only. - # - set dir ""; set result [list] - - # - # HACK: Optimize the variable access in this procedure to be - # as fast as possible. - # - makeVariableFast dir true; makeVariableFast result true - - foreach dir [split [exec -unicode $::env(ComSpec) /u /c dir \ - /ad /s /b [appendArgs \" [file nativename $pattern] \"]] \n] { - set dir [string trim $dir] - - if {[string length $dir] > 0} then { - set dir [getDirResultPath $pattern $dir] - - if {[lsearch -variable -exact -nocase result $dir] == -1} then { - lappend result $dir - } - } - } - - foreach dir [split [exec -unicode $::env(ComSpec) /u /c dir \ - /ahd /s /b [appendArgs \" [file nativename $pattern] \"]] \n] { - set dir [string trim $dir] - if {[string length $dir] > 0} then { set dir [getDirResultPath $pattern $dir] if {[lsearch -variable -exact -nocase result $dir] == -1} then { lappend result $dir @@ -2591,78 +2396,10 @@ [file normalize $pattern]] return $result } - proc findDirectoriesRecursive { pattern } { - # - # NOTE: Block non-Windows platforms since this is Windows specific. - # - if {![isWindows]} then { - error "not supported on this operating system" - } - - # - # NOTE: This should work properly in Tcl only. - # - set result [list] - - catch { - foreach dir [split [exec $::env(ComSpec) /c dir /ad /s /b \ - [file nativename $pattern]] \n] { - set dir [string trim $dir] - - if {[string length $dir] > 0} then { - set dir [getDirResultPath $pattern $dir] - - # - # HACK: The -nocase option to [lsearch] is only available - # starting with Tcl 8.5. - # - if {$::tcl_version >= 8.5} then { - if {[lsearch -exact -nocase $result $dir] == -1} then { - lappend result $dir - } - } else { - if {[lsearch -exact [string tolower $result] \ - [string tolower $dir]] == -1} then { - lappend result $dir - } - } - } - } - } - - catch { - foreach dir [split [exec $::env(ComSpec) /c dir /ahd /s /b \ - [file nativename $pattern]] \n] { - set dir [string trim $dir] - - if {[string length $dir] > 0} then { - set dir [getDirResultPath $pattern $dir] - - # - # HACK: The -nocase option to [lsearch] is only available - # starting with Tcl 8.5. - # - if {$::tcl_version >= 8.5} then { - if {[lsearch -exact -nocase $result $dir] == -1} then { - lappend result $dir - } - } else { - if {[lsearch -exact [string tolower $result] \ - [string tolower $dir]] == -1} then { - lappend result $dir - } - } - } - } - } - - return $result - } - proc findFiles { pattern } { # # NOTE: This should work properly in Tcl only. # eval lappend result [glob -nocomplain -types {f} \ @@ -2693,23 +2430,12 @@ set fileName [string trim $fileName] if {[string length $fileName] > 0} then { set fileName [getDirResultPath $pattern $fileName] - # - # HACK: The -nocase option to [lsearch] is only available - # starting with Tcl 8.5. - # - if {$::tcl_version >= 8.5} then { - if {[lsearch -exact -nocase $result $fileName] == -1} then { - lappend result $fileName - } - } else { - if {[lsearch -exact [string tolower $result] \ - [string tolower $fileName]] == -1} then { - lappend result $fileName - } + if {[lsearch -exact -nocase $result $fileName] == -1} then { + lappend result $fileName } } } } @@ -2719,23 +2445,12 @@ set fileName [string trim $fileName] if {[string length $fileName] > 0} then { set fileName [getDirResultPath $pattern $fileName] - # - # HACK: The -nocase option to [lsearch] is only available - # starting with Tcl 8.5. - # - if {$::tcl_version >= 8.5} then { - if {[lsearch -exact -nocase $result $fileName] == -1} then { - lappend result $fileName - } - } else { - if {[lsearch -exact [string tolower $result] \ - [string tolower $fileName]] == -1} then { - lappend result $fileName - } + if {[lsearch -exact -nocase $result $fileName] == -1} then { + lappend result $fileName } } } } @@ -2797,13 +2512,12 @@ getDictionaryValue getColumnValue getRowColumnValue tqputs tqlog \ readFile readSharedFile writeFile appendFile appendLogFile \ appendSharedFile appendSharedLogFile readAsciiFile writeAsciiFile \ readUnicodeFile writeUnicodeFile getDirResultPath addToPath \ removeFromPath execShell lshuffle ldifference filter map reduce \ - getLengthModifier debug findDirectories findDirectoriesRecursive \ - findFiles findFilesRecursive exportAndImportPackageCommands] false \ - false + getLengthModifier debug findDirectories findFiles findFilesRecursive \ + exportAndImportPackageCommands] false false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } Index: Externals/Eagle/lib/Eagle1.0/shell.eagle ================================================================== --- Externals/Eagle/lib/Eagle1.0/shell.eagle +++ Externals/Eagle/lib/Eagle1.0/shell.eagle @@ -28,116 +28,12 @@ # # NOTE: Commands specific to initializing the Eagle interactive shell # environment should be placed here. # proc help { args } { - host result Break [appendArgs \ - "\nFor interactive help please use: #help " $args \ - "\nFor commercial support, please use: #support\n"] - - catch { - object invoke Interpreter.GetActive Host.WriteLine \ - "\nPlease press any key to continue...\n" - - set key null; object invoke Interpreter.GetActive \ - Host.ReadKey true key - } - eval lappend command #help $args; debug icommand $command - } - - proc #support {} { - #
-
///
Cache Size - ///- /// If the argument N is positive then the suggested cache size is set to N. - /// If the argument N is negative, then the number of cache pages is adjusted - /// to use approximately abs(N*1024) bytes of memory. Backwards compatibility - /// note: The behavior of cache_size with a negative N was different in SQLite - /// versions prior to 3.7.10. In version 3.7.9 and earlier, the number of - /// pages in the cache was set to the absolute value of N. - /// + ///{size in bytes} ///N ///2000 ///
/// -
///
Synchronous @@ -812,11 +805,10 @@ : this(connectionString, false) { // do nothing. } -#if INTEROP_VIRTUAL_TABLE ////// Initializes the connection with a pre-existing native connection handle. /// This constructor overload is intended to be used only by the private /// @@ -842,11 +834,10 @@ _connectionState = (db != IntPtr.Zero) ? ConnectionState.Open : ConnectionState.Closed; _connectionString = null; /* unknown */ } -#endif ///method. /// /// Initializes the connection with the specified connection string. /// /// @@ -888,11 +879,11 @@ SQLiteConnectionHandle.closeConnection = SQLiteBase.CloseConnectionV2; } } #endif -#if USE_INTEROP_DLL && INTEROP_LOG +#if INTEROP_LOG if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok) { UnsafeNativeMethods.sqlite3_log( SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized.")); } @@ -936,11 +927,11 @@ if (String.Compare(str, "main", StringComparison.OrdinalIgnoreCase) != 0 && String.Compare(str, "temp", StringComparison.OrdinalIgnoreCase) != 0) { using (SQLiteCommand cmd = CreateCommand()) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "ATTACH DATABASE '{0}' AS [{1}]", row[1], row[0]); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "ATTACH DATABASE '{0}' AS [{1}]", row[1], row[0]); cmd.ExecuteNonQuery(); } } } } @@ -1169,11 +1160,11 @@ } catch (Exception e) { if ((_flags & SQLiteConnectionFlags.LogBackup) == SQLiteConnectionFlags.LogBackup) { - SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat( + SQLiteLog.LogMessage(String.Format( CultureInfo.CurrentCulture, "Caught exception while backing up database: {0}", e)); } throw; @@ -1390,15 +1381,15 @@ ////// Attempts to bind the specified /// - /// Theobject /// instance to this connection. /// object instance containing + /// The object instance containing /// the metadata for the function to be bound. /// /// - /// The object instance that implements the + /// The object instance that implements the /// function to be bound. /// public void BindFunction( SQLiteFunctionAttribute functionAttribute, SQLiteFunction function @@ -1413,56 +1404,16 @@ _sql.BindFunction(functionAttribute, function, _flags); } /////////////////////////////////////////////////////////////////////////////////////////////// - /// - /// Attempts to bind the specified - /// - /// Theobject - /// instance to this connection. - /// object instance containing - /// the metadata for the function to be bound. - /// - /// - /// A object instance that helps implement the - /// function to be bound. For scalar functions, this corresponds to the - /// type. For aggregate functions, - /// this corresponds to the type. For - /// collation functions, this corresponds to the - /// type. - /// - /// - /// A object instance that helps implement the - /// function to be bound. For aggregate functions, this corresponds to the - /// type. For other callback types, it - /// is not used and must be null. - /// - public void BindFunction( - SQLiteFunctionAttribute functionAttribute, - Delegate callback1, - Delegate callback2 - ) - { - CheckDisposed(); - - if (_sql == null) - throw new InvalidOperationException( - "Database connection not valid for binding functions."); - - _sql.BindFunction(functionAttribute, - new SQLiteDelegateFunction(callback1, callback2), _flags); - } - - /////////////////////////////////////////////////////////////////////////////////////////////// - /// /// Attempts to unbind the specified /// - /// Theobject /// instance to this connection. /// object instance containing + /// The object instance containing /// the metadata for the function to be unbound. /// /// Non-zero if the function was unbound. public bool UnbindFunction( SQLiteFunctionAttribute functionAttribute @@ -1635,24 +1586,18 @@ #endif } /////////////////////////////////////////////////////////////////////////////////////////////// - ///- /// Cleans up resources (native and managed) associated with the current instance. - /// - /// - /// Zero when being disposed via garbage collection; otherwise, non-zero. - /// protected override void Dispose(bool disposing) { #if !NET_COMPACT_20 && TRACE_WARNING if ((_flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { if (_noDispose) { - System.Diagnostics.Trace.WriteLine(UnsafeNativeMethods.StringFormat( + System.Diagnostics.Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Disposing of connection \"{0}\" with the no-dispose flag set.", _connectionString)); } } @@ -2089,12 +2034,11 @@ else arParts = SQLiteConvert.NewSplit(s, ';', true, ref error); if (arParts == null) { - throw new ArgumentException(UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Invalid ConnectionString format, cannot parse: {0}", (error != null) ? error : "could not split connection string into properties")); } int x = (arParts != null) ? arParts.Length : 0; @@ -2114,11 +2058,11 @@ if (indexOf != -1) ls.Add(UnwrapString(arParts[n].Substring(0, indexOf).Trim()), UnwrapString(arParts[n].Substring(indexOf + 1).Trim())); else if (allowNameOnly) ls.Add(UnwrapString(arParts[n].Trim()), String.Empty); else - throw new ArgumentException(UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, "Invalid ConnectionString format for part \"{0}\", no equal sign found", arParts[n])); + throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Invalid ConnectionString format for part \"{0}\", no equal sign found", arParts[n])); } return ls; } ///@@ -2314,11 +2258,11 @@ ) { CheckDisposed(); if (_sql == null) - throw new InvalidOperationException(UnsafeNativeMethods.StringFormat( + throw new InvalidOperationException(String.Format( CultureInfo.CurrentCulture, "Database connection not valid for {0} extensions.", enable ? "enabling" : "disabling")); if ((_flags & SQLiteConnectionFlags.NoLoadExtension) == SQLiteConnectionFlags.NoLoadExtension) @@ -2437,13 +2381,11 @@ int length = array.Length; for (int index = 0; index < length; index++) #if NET_COMPACT_20 - result.Append(UnsafeNativeMethods.StringFormat( - CultureInfo.InvariantCulture, - "{0:x2}", array[index])); + result.Append(String.Format("{0:x2}", array[index])); #else result.AppendFormat("{0:x2}", array[index]); #endif return result.ToString(); @@ -2489,11 +2431,11 @@ string value = text.Substring(index, 2); if (!TryParseByte(value, NumberStyles.HexNumber, out result[index / 2])) { - error = UnsafeNativeMethods.StringFormat( + error = String.Format( CultureInfo.CurrentCulture, "string contains \"{0}\", which cannot be converted to a byte value", value); return null; @@ -2645,11 +2587,11 @@ #endif bool fullUri = false; string fileName; if (Convert.ToInt32(FindKey(opts, "Version", DefaultVersion.ToString()), CultureInfo.InvariantCulture) != DefaultVersion) - throw new NotSupportedException(UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, "Only SQLite Version {0} is supported at this time", DefaultVersion)); + throw new NotSupportedException(String.Format(CultureInfo.CurrentCulture, "Only SQLite Version {0} is supported at this time", DefaultVersion)); #if INTEROP_INCLUDE_ZIPVFS bool useZipVfs = false; string zipVfsVersion = FindKey(opts, "ZipVfsVersion", DefaultZipVfsVersion); @@ -2669,11 +2611,11 @@ UnsafeNativeMethods.zipvfsInit_v3(0); useZipVfs = true; } else { - throw new NotSupportedException(UnsafeNativeMethods.StringFormat( + throw new NotSupportedException(String.Format( CultureInfo.CurrentCulture, "Only ZipVFS versions {0}, {1}, and {2} are supported at this time", ZipVfs_Automatic, ZipVfs_V2, ZipVfs_V3)); } } #endif @@ -2685,11 +2627,11 @@ fileName = FindKey(opts, "Uri", DefaultUri); if (String.IsNullOrEmpty(fileName)) { fileName = FindKey(opts, "FullUri", DefaultFullUri); if (String.IsNullOrEmpty(fileName)) - throw new ArgumentException(UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, "Data Source cannot be empty. Use {0} to open an in-memory database", MemoryFileName)); + throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Data Source cannot be empty. Use {0} to open an in-memory database", MemoryFileName)); else fullUri = true; } else { @@ -2707,11 +2649,11 @@ { if (!uri && !fullUri && !isMemory && !String.IsNullOrEmpty(fileName) && fileName.StartsWith("\\", StringComparison.OrdinalIgnoreCase) && !fileName.StartsWith("\\\\", StringComparison.OrdinalIgnoreCase)) { - System.Diagnostics.Trace.WriteLine(UnsafeNativeMethods.StringFormat( + System.Diagnostics.Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Detected a possibly malformed UNC database file name \"{0}\" that " + "may have originally started with two backslashes; however, four leading " + "backslashes may be required, e.g.: \"Data Source=\\\\\\{0};\"", fileName)); @@ -2789,11 +2731,11 @@ string error = null; byte[] hexPasswordBytes = FromHexString(hexPassword, ref error); if (hexPasswordBytes == null) { - throw new FormatException(UnsafeNativeMethods.StringFormat( + throw new FormatException(String.Format( CultureInfo.CurrentCulture, "Cannot parse 'HexPassword' property value into byte values: {0}", error)); } @@ -2833,11 +2775,11 @@ { using (SQLiteCommand cmd = CreateCommand()) { if (_busyTimeout != DefaultBusyTimeout) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA busy_timeout={0}", _busyTimeout); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA busy_timeout={0}", _busyTimeout); cmd.ExecuteNonQuery(); } int intValue; @@ -2845,44 +2787,44 @@ { strValue = FindKey(opts, "Page Size", DefaultPageSize.ToString()); intValue = Convert.ToInt32(strValue, CultureInfo.InvariantCulture); if (intValue != DefaultPageSize) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA page_size={0}", intValue); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA page_size={0}", intValue); cmd.ExecuteNonQuery(); } } strValue = FindKey(opts, "Max Page Count", DefaultMaxPageCount.ToString()); intValue = Convert.ToInt32(strValue, CultureInfo.InvariantCulture); if (intValue != DefaultMaxPageCount) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA max_page_count={0}", intValue); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA max_page_count={0}", intValue); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Legacy Format", DefaultLegacyFormat.ToString()); boolValue = SQLiteConvert.ToBoolean(strValue); if (boolValue != DefaultLegacyFormat) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA legacy_file_format={0}", boolValue ? "ON" : "OFF"); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA legacy_file_format={0}", boolValue ? "ON" : "OFF"); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Synchronous", DefaultSynchronous.ToString()); enumValue = TryParseEnum(typeof(SQLiteSynchronousEnum), strValue, true); if (!(enumValue is SQLiteSynchronousEnum) || ((SQLiteSynchronousEnum)enumValue != DefaultSynchronous)) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA synchronous={0}", strValue); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA synchronous={0}", strValue); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Cache Size", DefaultCacheSize.ToString()); intValue = Convert.ToInt32(strValue, CultureInfo.InvariantCulture); if (intValue != DefaultCacheSize) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA cache_size={0}", intValue); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA cache_size={0}", intValue); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Journal Mode", DefaultJournalMode.ToString()); enumValue = TryParseEnum(typeof(SQLiteJournalModeEnum), strValue, true); @@ -2893,27 +2835,27 @@ #if INTEROP_INCLUDE_ZIPVFS if (useZipVfs) pragmaStr = "PRAGMA zipvfs_journal_mode={0}"; #endif - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, pragmaStr, strValue); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, pragmaStr, strValue); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Foreign Keys", DefaultForeignKeys.ToString()); boolValue = SQLiteConvert.ToBoolean(strValue); if (boolValue != DefaultForeignKeys) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA foreign_keys={0}", boolValue ? "ON" : "OFF"); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA foreign_keys={0}", boolValue ? "ON" : "OFF"); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Recursive Triggers", DefaultRecursiveTriggers.ToString()); boolValue = SQLiteConvert.ToBoolean(strValue); if (boolValue != DefaultRecursiveTriggers) { - cmd.CommandText = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA recursive_triggers={0}", boolValue ? "ON" : "OFF"); + cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA recursive_triggers={0}", boolValue ? "ON" : "OFF"); cmd.ExecuteNonQuery(); } } } @@ -3292,11 +3234,10 @@ /// /// /// A standard SQLite return code (i.e. zero for success and non-zero /// for failure). /// - #pragma warning disable 3001 public static SQLiteErrorCode ReleaseMemory( int nBytes, bool reset, bool compact, ref int nFree, @@ -3305,11 +3246,10 @@ ) { return SQLite3.StaticReleaseMemory( nBytes, reset, compact, ref nFree, ref resetOk, ref nLargest); } - #pragma warning restore 3001 ////// Sets the status of the memory usage tracking subsystem in the SQLite core library. By default, this is enabled. /// If this is disabled, memory usage tracking will not be performed. This is not really a per-connection value, it is /// global to the process. @@ -3446,13 +3386,11 @@ sourceId = "0000000000000000000000000000000000000000"; if (sourceTimeStamp == null) sourceTimeStamp = "0000-00-00 00:00:00 UTC"; - return UnsafeNativeMethods.StringFormat( - CultureInfo.InvariantCulture, - "{0} {1}", sourceId, sourceTimeStamp); + return String.Format("{0} {1}", sourceId, sourceTimeStamp); } else { return null; } @@ -3522,11 +3460,11 @@ _sql.Close(true); /* NOTE: MUST be closed before shutdown. */ SQLiteErrorCode rc = _sql.Shutdown(); #if !NET_COMPACT_20 && TRACE_CONNECTION if (rc != SQLiteErrorCode.Ok) - System.Diagnostics.Trace.WriteLine(UnsafeNativeMethods.StringFormat( + System.Diagnostics.Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Shutdown (Instance) Failed: {0}", rc)); #endif return rc; @@ -3552,11 +3490,11 @@ SQLiteErrorCode rc = SQLite3.StaticShutdown(directories); if (rc != SQLiteErrorCode.Ok) { #if !NET_COMPACT_20 && TRACE_CONNECTION - System.Diagnostics.Trace.WriteLine(UnsafeNativeMethods.StringFormat( + System.Diagnostics.Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Shutdown (Static) Failed: {0}", rc)); #endif if (!noThrow) @@ -4136,20 +4074,20 @@ if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; - using (SQLiteCommand cmdTables = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table' OR [type] LIKE 'view'", strCatalog, master), this)) + using (SQLiteCommand cmdTables = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table' OR [type] LIKE 'view'", strCatalog, master), this)) using (SQLiteDataReader rdTables = cmdTables.ExecuteReader()) { while (rdTables.Read()) { if (String.IsNullOrEmpty(strTable) || String.Compare(strTable, rdTables.GetString(2), StringComparison.OrdinalIgnoreCase) == 0) { try { - using (SQLiteCommand cmd = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", strCatalog, rdTables.GetString(2)), this)) + using (SQLiteCommand cmd = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rd = (SQLiteDataReader)cmd.ExecuteReader(CommandBehavior.SchemaOnly)) using (DataTable tblSchema = rd.GetSchemaTable(true, true)) { foreach (DataRow schemaRow in tblSchema.Rows) { @@ -4239,11 +4177,11 @@ if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; - using (SQLiteCommand cmdTables = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) + using (SQLiteCommand cmdTables = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) using (SQLiteDataReader rdTables = cmdTables.ExecuteReader()) { while (rdTables.Read()) { maybeRowId = false; @@ -4252,11 +4190,11 @@ { // First, look for any rowid indexes -- which sqlite defines are INTEGER PRIMARY KEY columns. // Such indexes are not listed in the indexes list but count as indexes just the same. try { - using (SQLiteCommand cmdTable = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, rdTables.GetString(2)), this)) + using (SQLiteCommand cmdTable = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rdTable = cmdTable.ExecuteReader()) { while (rdTable.Read()) { if (rdTable.GetInt32(5) != 0) @@ -4279,11 +4217,11 @@ row["TABLE_CATALOG"] = strCatalog; row["TABLE_NAME"] = rdTables.GetString(2); row["INDEX_CATALOG"] = strCatalog; row["PRIMARY_KEY"] = true; - row["INDEX_NAME"] = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "{1}_PK_{0}", rdTables.GetString(2), master); + row["INDEX_NAME"] = String.Format(CultureInfo.InvariantCulture, "{1}_PK_{0}", rdTables.GetString(2), master); row["UNIQUE"] = true; if (String.Compare((string)row["INDEX_NAME"], strIndex, StringComparison.OrdinalIgnoreCase) == 0 || strIndex == null) { @@ -4294,11 +4232,11 @@ } // Now fetch all the rest of the indexes. try { - using (SQLiteCommand cmd = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_list([{1}])", strCatalog, rdTables.GetString(2)), this)) + using (SQLiteCommand cmd = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_list([{1}])", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rd = (SQLiteDataReader)cmd.ExecuteReader()) { while (rd.Read()) { if (String.Compare(rd.GetString(1), strIndex, StringComparison.OrdinalIgnoreCase) == 0 @@ -4312,11 +4250,11 @@ row["INDEX_NAME"] = rd.GetString(1); row["UNIQUE"] = SQLiteConvert.ToBoolean(rd.GetValue(2), CultureInfo.InvariantCulture, false); row["PRIMARY_KEY"] = false; // get the index definition - using (SQLiteCommand cmdIndexes = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{2}] WHERE [type] LIKE 'index' AND [name] LIKE '{1}'", strCatalog, rd.GetString(1).Replace("'", "''"), master), this)) + using (SQLiteCommand cmdIndexes = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{2}] WHERE [type] LIKE 'index' AND [name] LIKE '{1}'", strCatalog, rd.GetString(1).Replace("'", "''"), master), this)) using (SQLiteDataReader rdIndexes = cmdIndexes.ExecuteReader()) { while (rdIndexes.Read()) { if (rdIndexes.IsDBNull(4) == false) @@ -4328,11 +4266,11 @@ // Now for the really hard work. Figure out which index is the primary key index. // The only way to figure it out is to check if the index was an autoindex and if we have a non-rowid // primary key, and all the columns in the given index match the primary key columns if (primaryKeys.Count > 0 && rd.GetString(1).StartsWith("sqlite_autoindex_" + rdTables.GetString(2), StringComparison.InvariantCultureIgnoreCase) == true) { - using (SQLiteCommand cmdDetails = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, rd.GetString(1)), this)) + using (SQLiteCommand cmdDetails = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, rd.GetString(1)), this)) using (SQLiteDataReader rdDetails = cmdDetails.ExecuteReader()) { int nMatches = 0; while (rdDetails.Read()) { @@ -4385,11 +4323,11 @@ if (String.IsNullOrEmpty(table)) table = null; if (String.IsNullOrEmpty(catalog)) catalog = "main"; string master = (String.Compare(catalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; - using (SQLiteCommand cmd = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT [type], [name], [tbl_name], [rootpage], [sql], [rowid] FROM [{0}].[{1}] WHERE [type] LIKE 'trigger'", catalog, master), this)) + using (SQLiteCommand cmd = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT [type], [name], [tbl_name], [rootpage], [sql], [rowid] FROM [{0}].[{1}] WHERE [type] LIKE 'trigger'", catalog, master), this)) using (SQLiteDataReader rd = (SQLiteDataReader)cmd.ExecuteReader()) { while (rd.Read()) { if (String.Compare(rd.GetString(1), triggerName, StringComparison.OrdinalIgnoreCase) == 0 @@ -4440,11 +4378,11 @@ if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; - using (SQLiteCommand cmd = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT [type], [name], [tbl_name], [rootpage], [sql], [rowid] FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) + using (SQLiteCommand cmd = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT [type], [name], [tbl_name], [rootpage], [sql], [rowid] FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) using (SQLiteDataReader rd = (SQLiteDataReader)cmd.ExecuteReader()) { while (rd.Read()) { strItem = rd.GetString(0); @@ -4506,11 +4444,11 @@ if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; - using (SQLiteCommand cmd = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'view'", strCatalog, master), this)) + using (SQLiteCommand cmd = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'view'", strCatalog, master), this)) using (SQLiteDataReader rd = (SQLiteDataReader)cmd.ExecuteReader()) { while (rd.Read()) { if (String.Compare(rd.GetString(1), strView, StringComparison.OrdinalIgnoreCase) == 0 @@ -4655,11 +4593,11 @@ string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); - using (SQLiteCommand cmdTables = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) + using (SQLiteCommand cmdTables = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) using (SQLiteDataReader rdTables = cmdTables.ExecuteReader()) { while (rdTables.Read()) { maybeRowId = false; @@ -4666,11 +4604,11 @@ primaryKeys.Clear(); if (String.IsNullOrEmpty(strTable) || String.Compare(rdTables.GetString(2), strTable, StringComparison.OrdinalIgnoreCase) == 0) { try { - using (SQLiteCommand cmdTable = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, rdTables.GetString(2)), this)) + using (SQLiteCommand cmdTable = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].table_info([{1}])", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rdTable = cmdTable.ExecuteReader()) { while (rdTable.Read()) { if (rdTable.GetInt32(5) == 1) // is a primary key @@ -4689,11 +4627,11 @@ // This is a rowid row if (primaryKeys.Count == 1 && maybeRowId == true) { row = tbl.NewRow(); row["CONSTRAINT_CATALOG"] = strCatalog; - row["CONSTRAINT_NAME"] = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "{1}_PK_{0}", rdTables.GetString(2), master); + row["CONSTRAINT_NAME"] = String.Format(CultureInfo.InvariantCulture, "{1}_PK_{0}", rdTables.GetString(2), master); row["TABLE_CATALOG"] = strCatalog; row["TABLE_NAME"] = rdTables.GetString(2); row["COLUMN_NAME"] = primaryKeys[0].Value; row["INDEX_NAME"] = row["CONSTRAINT_NAME"]; row["ORDINAL_POSITION"] = 0; // primaryKeys[0].Key; @@ -4703,21 +4641,21 @@ if (String.IsNullOrEmpty(strIndex) || String.Compare(strIndex, (string)row["INDEX_NAME"], StringComparison.OrdinalIgnoreCase) == 0) tbl.Rows.Add(row); } - using (SQLiteCommand cmdIndexes = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{2}] WHERE [type] LIKE 'index' AND [tbl_name] LIKE '{1}'", strCatalog, rdTables.GetString(2).Replace("'", "''"), master), this)) + using (SQLiteCommand cmdIndexes = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{2}] WHERE [type] LIKE 'index' AND [tbl_name] LIKE '{1}'", strCatalog, rdTables.GetString(2).Replace("'", "''"), master), this)) using (SQLiteDataReader rdIndexes = cmdIndexes.ExecuteReader()) { while (rdIndexes.Read()) { int ordinal = 0; if (String.IsNullOrEmpty(strIndex) || String.Compare(strIndex, rdIndexes.GetString(1), StringComparison.OrdinalIgnoreCase) == 0) { try { - using (SQLiteCommand cmdIndex = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, rdIndexes.GetString(1)), this)) + using (SQLiteCommand cmdIndex = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, rdIndexes.GetString(1)), this)) using (SQLiteDataReader rdIndex = cmdIndex.ExecuteReader()) { while (rdIndex.Read()) { row = tbl.NewRow(); @@ -4813,18 +4751,18 @@ string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); - using (SQLiteCommand cmdViews = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'view'", strCatalog, master), this)) + using (SQLiteCommand cmdViews = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'view'", strCatalog, master), this)) using (SQLiteDataReader rdViews = cmdViews.ExecuteReader()) { while (rdViews.Read()) { if (String.IsNullOrEmpty(strView) || String.Compare(strView, rdViews.GetString(2), StringComparison.OrdinalIgnoreCase) == 0) { - using (SQLiteCommand cmdViewSelect = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", strCatalog, rdViews.GetString(2)), this)) + using (SQLiteCommand cmdViewSelect = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}]", strCatalog, rdViews.GetString(2)), this)) { strSql = rdViews.GetString(4).Replace('\r', ' ').Replace('\n', ' ').Replace('\t', ' '); n = CultureInfo.InvariantCulture.CompareInfo.IndexOf(strSql, " AS ", CompareOptions.IgnoreCase); if (n < 0) continue; @@ -4918,28 +4856,28 @@ string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); - using (SQLiteCommand cmdTables = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) + using (SQLiteCommand cmdTables = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[{1}] WHERE [type] LIKE 'table'", strCatalog, master), this)) using (SQLiteDataReader rdTables = cmdTables.ExecuteReader()) { while (rdTables.Read()) { if (String.IsNullOrEmpty(strTable) || String.Compare(strTable, rdTables.GetString(2), StringComparison.OrdinalIgnoreCase) == 0) { try { using (SQLiteCommandBuilder builder = new SQLiteCommandBuilder()) - using (SQLiteCommand cmdKey = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].foreign_key_list([{1}])", strCatalog, rdTables.GetString(2)), this)) + 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"] = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "FK_{0}_{1}_{2}", rdTables[2], rdKey.GetInt32(0), rdKey.GetInt32(1)); + row["CONSTRAINT_NAME"] = String.Format(CultureInfo.InvariantCulture, "FK_{0}_{1}_{2}", rdTables[2], rdKey.GetInt32(0), rdKey.GetInt32(1)); 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; @@ -5089,11 +5027,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Progress\" method: {1}", e)); /* throw */ } } catch @@ -5142,11 +5080,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Authorize\" method: {1}", e)); /* throw */ } } catch @@ -5191,11 +5129,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Update\" method: {1}", e)); /* throw */ } } catch @@ -5282,11 +5220,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Trace\" method: {1}", e)); /* throw */ } } catch @@ -5344,11 +5282,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Commit\" method: {1}", e)); /* throw */ } } catch @@ -5386,11 +5324,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Rollback\" method: {1}", e)); /* throw */ } } catch @@ -5545,13 +5483,10 @@ ); #endregion /////////////////////////////////////////////////////////////////////////////////////////////// - /// + public SQLiteFunctionAttribute() + : this(String.Empty, -1, FunctionType.Scalar) + { + // do nothing. + } + + ///- /// The event data associated with progress reporting events. - /// public class ProgressEventArgs : EventArgs { ////// The user-defined native data associated with this event. Currently, /// this will always contain the value of /// The type of the function to register public static void RegisterFunction(Type typ) { - object[] arAtt = typ.GetCustomAttributes( - typeof(SQLiteFunctionAttribute), false); - - for (int y = 0; y < arAtt.Length; y++) - { - SQLiteFunctionAttribute at = arAtt[y] as SQLiteFunctionAttribute; - - if (at == null) - continue; - - RegisterFunction( - at.Name, at.Arguments, at.FuncType, typ, - at.Callback1, at.Callback2); - } - } - - ///. Index: System.Data.SQLite/SQLiteConvert.cs ================================================================== --- System.Data.SQLite/SQLiteConvert.cs +++ System.Data.SQLite/SQLiteConvert.cs @@ -1150,11 +1150,11 @@ case TypeCode.String: return viaFramework ? Convert.ToBoolean(obj, provider) : ToBoolean(ToStringWithProvider(obj, provider)); default: - throw new SQLiteException(UnsafeNativeMethods.StringFormat( + throw new SQLiteException(String.Format( CultureInfo.CurrentCulture, "Cannot convert type {0} to boolean", typeCode)); } } @@ -1441,11 +1441,11 @@ string typeName ) { if ((flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Type mapping failed, returning default name \"{0}\" for type {1}.", typeName, dbType)); } } @@ -1470,11 +1470,11 @@ ) { if (!String.IsNullOrEmpty(typeName) && ((flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning)) { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Type mapping failed, returning default type {0} for name \"{1}\".", dbType, typeName)); } } Index: System.Data.SQLite/SQLiteDataAdapter.cs ================================================================== --- System.Data.SQLite/SQLiteDataAdapter.cs +++ System.Data.SQLite/SQLiteDataAdapter.cs @@ -137,16 +137,10 @@ #endif } /////////////////////////////////////////////////////////////////////////////////////////////// - /// - /// Cleans up resources (native and managed) associated with the current instance. - /// - /// - /// Zero when being disposed via garbage collection; otherwise, non-zero. - /// protected override void Dispose(bool disposing) { try { if (!disposed) Index: System.Data.SQLite/SQLiteDataReader.cs ================================================================== --- System.Data.SQLite/SQLiteDataReader.cs +++ System.Data.SQLite/SQLiteDataReader.cs @@ -1078,11 +1078,11 @@ } if (wantDefaultValue) { // Determine the default value for the column, which sucks because we have to query the schema for each column - using (SQLiteCommand cmdTable = new SQLiteCommand(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "PRAGMA [{0}].TABLE_INFO([{1}])", + using (SQLiteCommand cmdTable = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].TABLE_INFO([{1}])", row[SchemaTableOptionalColumn.BaseCatalogName], row[SchemaTableColumn.BaseTableName] ), _command.Connection)) using (DbDataReader rdTable = cmdTable.ExecuteReader()) { Index: System.Data.SQLite/SQLiteEnlistment.cs ================================================================== --- System.Data.SQLite/SQLiteEnlistment.cs +++ System.Data.SQLite/SQLiteEnlistment.cs @@ -94,11 +94,11 @@ // isolation level specified by the caller. // if (throwOnUnsupported) { throw new InvalidOperationException( - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.InvariantCulture, "unsupported isolation level {0}", isolationLevel)); } return defaultIsolationLevel; } Index: System.Data.SQLite/SQLiteException.cs ================================================================== --- System.Data.SQLite/SQLiteException.cs +++ System.Data.SQLite/SQLiteException.cs @@ -7,11 +7,10 @@ namespace System.Data.SQLite { using System; using System.Data.Common; - using System.Globalization; #if !PLATFORM_COMPACTFRAMEWORK using System.Reflection; using System.Runtime.Serialization; using System.Security.Permissions; @@ -181,13 +180,11 @@ private static string GetStockErrorMessage( SQLiteErrorCode errorCode, string message ) { - return UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, - "{0}{1}{2}", + return String.Format("{0}{1}{2}", GetErrorString(errorCode), #if !NET_COMPACT_20 Environment.NewLine, message).Trim(); #else "\r\n", message).Trim(); Index: System.Data.SQLite/SQLiteFactory.cs ================================================================== --- System.Data.SQLite/SQLiteFactory.cs +++ System.Data.SQLite/SQLiteFactory.cs @@ -28,13 +28,10 @@ } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable Members - ///- /// Cleans up resources (native and managed) associated with the current instance. - /// public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } @@ -75,13 +72,10 @@ #endregion /////////////////////////////////////////////////////////////////////////////////////////////// #region Destructor - ///- /// Cleans up resources associated with the current instance. - /// ~SQLiteFactory() { Dispose(false); } #endregion Index: System.Data.SQLite/SQLiteFunction.cs ================================================================== --- System.Data.SQLite/SQLiteFunction.cs +++ System.Data.SQLite/SQLiteFunction.cs @@ -65,11 +65,11 @@ ////// Holds a reference to the callback function for finalizing an aggregate function /// private SQLiteFinalCallback _FinalFunc; ///- /// Holds a reference to the callback function for collating sequences + /// Holds a reference to the callback function for collation sequences /// private SQLiteCollation _CompareFunc; private SQLiteCollation _CompareFunc16; @@ -199,13 +199,10 @@ #endregion /////////////////////////////////////////////////////////////////////////////////////////////// #region Destructor - ///- /// Cleans up resources associated with the current instance. - /// ~SQLiteFunction() { Dispose(false); } #endregion @@ -278,15 +275,15 @@ CheckDisposed(); return null; } ///- /// User-defined collating sequences override this method to provide a custom string sorting algorithm. + /// User-defined collation sequences override this method to provide a custom string sorting algorithm. /// - /// The first string to compare. - /// The second strnig to compare. - ///1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2. + /// The first string to compare + /// The second strnig to compare + ///1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2 public virtual int Compare(string param1, string param2) { CheckDisposed(); return 0; } @@ -418,11 +415,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Invoke\" method: {0}", e)); /* throw */ } } catch @@ -431,11 +428,11 @@ } } } ///- /// Internal collating sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. + /// Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. /// WARNING: Must not throw exceptions. /// /// Not used /// Length of the string pv1 /// Pointer to the first string to compare @@ -456,11 +453,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Compare\" (UTF8) method: {0}", e)); /* throw */ } } catch @@ -478,11 +475,11 @@ return 0; } ///- /// Internal collating sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. + /// Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. /// WARNING: Must not throw exceptions. /// /// Not used /// Length of the string pv1 /// Pointer to the first string to compare @@ -503,11 +500,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Compare\" (UTF16) method: {0}", e)); /* throw */ } } catch @@ -576,11 +573,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Step\" method: {1}", e)); /* throw */ } } catch @@ -631,11 +628,11 @@ { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Final\" method: {1}", e)); /* throw */ } } catch @@ -729,121 +726,23 @@ /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported. ///- /// Alternative method of registering a function. This method - /// does not require the specified type to be annotated with - /// - /// - /// The name of the function to register. - /// - /// - /// The number of arguments accepted by the function. - /// - /// - /// The type of SQLite function being resitered (e.g. scalar, - /// aggregate, or collating sequence). - /// - /// - /// The. - /// that actually implements the function. - /// This will only be used if the - /// and parameters are null. - /// - /// - /// The to be used for all calls into the - /// , - /// , - /// and virtual methods. - /// - /// - /// The to be used for all calls into the - /// virtual method. This - /// parameter is only necessary for aggregate functions. - /// - public static void RegisterFunction( - string name, - int argumentCount, - FunctionType functionType, - Type instanceType, - Delegate callback1, - Delegate callback2 - ) - { - SQLiteFunctionAttribute at = new SQLiteFunctionAttribute( - name, argumentCount, functionType); - - at.InstanceType = instanceType; - at.Callback1 = callback1; - at.Callback2 = callback2; - - _registeredFunctions.Add(at, null); - } - - /// - /// Creates a - /// - /// Theinstance based on the specified - /// . - /// containing the metadata about - /// the function to create. - /// - /// - /// The created function -OR- null if the function could not be created. - /// - /// - /// Non-zero if the function was created; otherwise, zero. - /// - private static bool CreateFunction( - SQLiteFunctionAttribute functionAttribute, - out SQLiteFunction function - ) - { - if (functionAttribute == null) - { - function = null; - return false; - } - else if ((functionAttribute.Callback1 != null) || - (functionAttribute.Callback2 != null)) - { - function = new SQLiteDelegateFunction( - functionAttribute.Callback1, - functionAttribute.Callback2); - - return true; - } - else if (functionAttribute.InstanceType != null) - { - function = (SQLiteFunction)Activator.CreateInstance( - functionAttribute.InstanceType); - - return true; - } - else - { - function = null; - return false; - } + object[] arAtt = typ.GetCustomAttributes(typeof(SQLiteFunctionAttribute), false); + int u = arAtt.Length; + SQLiteFunctionAttribute at; + + for (int y = 0; y < u; y++) + { + at = arAtt[y] as SQLiteFunctionAttribute; + if (at != null) + { + at.InstanceType = typ; + _registeredFunctions.Add(at, null); + } + } } ////// Called by the SQLiteBase derived classes, this method binds all registered (known) 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 @@ -870,21 +769,15 @@ SQLiteFunctionAttribute pr = pair.Key; if (pr == null) continue; - SQLiteFunction f; - - if (CreateFunction(pr, out f)) - { - BindFunction(sqlbase, pr, f, flags); - lFunctions[pr] = f; - } - else - { - lFunctions[pr] = null; - } + SQLiteFunction f = (SQLiteFunction)Activator.CreateInstance( + pr.InstanceType); + + BindFunction(sqlbase, pr, f, flags); + lFunctions[pr] = f; } return lFunctions; } @@ -966,11 +859,11 @@ return result; } /// Aggregate = 1, ///- /// This function binds a user-defined function to a connection. + /// This function binds a user-defined functions to a connection. /// /// /// Theobject instance associated with the /// that the function should be bound to. /// @@ -1092,608 +985,12 @@ name, null, null, false) == SQLiteErrorCode.Ok; } } } - ///////////////////////////////////////////////////////////////////////////// - - /// - /// This - /// - /// This is always the string literal "Invoke". - /// - /// - /// The arguments for the scalar function. - /// - ///type is used with the - /// method. - /// - /// The result of the scalar function. - /// - public delegate object SQLiteInvokeDelegate( - string param0, - object[] args - ); - - ///////////////////////////////////////////////////////////////////////////// - - ///- /// This - /// - /// This is always the string literal "Step". - /// - /// - /// The arguments for the aggregate function. - /// - /// - /// The step number (one based). This is incrememted each time the - ///type is used with the - /// method. - /// method is called. - /// - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - public delegate void SQLiteStepDelegate( - string param0, - object[] args, - int stepNumber, - ref object contextData - ); - - ///////////////////////////////////////////////////////////////////////////// - - /// - /// This - /// - /// This is always the string literal "Final". - /// - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - ///type is used with the - /// method. - /// - /// The result of the aggregate function. - /// - public delegate object SQLiteFinalDelegate( - string param0, - object contextData - ); - - ///////////////////////////////////////////////////////////////////////////// - - ///- /// This - /// - /// This is always the string literal "Compare". - /// - /// - /// The first string to compare. - /// - /// - /// The second strnig to compare. - /// - ///type is used with the - /// method. - /// - /// A positive integer if the - public delegate int SQLiteCompareDelegate( - string param0, - string param1, - string param2 - ); - - ///////////////////////////////////////////////////////////////////////////// - -#if !PLATFORM_COMPACTFRAMEWORK - ///parameter is - /// greater than the parameter, a negative - /// integer if the parameter is less than - /// the parameter, or zero if they are - /// equal. - /// - /// This class implements a SQLite function using a -#else - ///. - /// All the virtual methods of the class are - /// implemented using calls to the , - /// , , - /// and strongly typed delegate types - /// or via the method. - /// The arguments are presented in the same order they appear in - /// the associated methods with one exception: - /// the first argument is the name of the virtual method being implemented. - /// - /// This class implements a SQLite function using a -#endif - public class SQLiteDelegateFunction : SQLiteFunction - { - #region Private Constants - ///. - /// All the virtual methods of the class are - /// implemented using calls to the , - /// , , - /// and strongly typed delegate types. - /// The arguments are presented in the same order they appear in - /// the associated methods with one exception: - /// the first argument is the name of the virtual method being implemented. - /// - /// This error message is used by the overridden virtual methods when - /// a required - private const string NoCallbackError = "No \"{0}\" callback is set."; - - ///////////////////////////////////////////////////////////////////////// - - ///property (e.g. - /// or ) has not been - /// set. - /// - /// This error message is used by the overridden - private const string ResultInt32Error = "\"{0}\" result must be Int32."; - #endregion - - ///////////////////////////////////////////////////////////////////////// - - #region Public Constructors - ///- /// method when the result does not have a type of . - /// - /// Constructs an empty instance of this class. - /// - public SQLiteDelegateFunction() - : this(null, null) - { - // do nothing. - } - - ///////////////////////////////////////////////////////////////////////// - - ///- /// Constructs an instance of this class using the specified - /// - /// - /// Theas the - /// implementation. - /// to be used for all calls into the - /// , , and - /// virtual methods needed by the - /// base class. - /// - /// - /// The to be used for all calls into the - /// virtual methods needed by the - /// base class. - /// - public SQLiteDelegateFunction( - Delegate callback1, - Delegate callback2 - ) - { - this.callback1 = callback1; - this.callback2 = callback2; - } - #endregion - - ///////////////////////////////////////////////////////////////////////// - - #region Protected Methods - /// - /// Returns the list of arguments for the - /// - /// The original arguments received by themethod, - /// as an of . The first - /// argument is always the literal string "Invoke". - /// method. - /// - /// - /// Non-zero if the returned arguments are going to be used with the - /// type; otherwise, zero. - /// - /// - /// The arguments to pass to the configured - protected virtual object[] GetInvokeArgs( - object[] args, - bool earlyBound - ) - { - object[] newArgs = new object[] { "Invoke", args }; - - if (!earlyBound) - newArgs = new object[] { newArgs }; // WRAP - - return newArgs; - } - - ///////////////////////////////////////////////////////////////////////// - - ///. - /// - /// Returns the list of arguments for the - /// - /// The original arguments received by themethod, - /// as an of . The first - /// argument is always the literal string "Step". - /// method. - /// - /// - /// The step number (one based). This is incrememted each time the - /// method is called. - /// - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - /// - /// Non-zero if the returned arguments are going to be used with the - /// type; otherwise, zero. - /// - /// - /// The arguments to pass to the configured - protected virtual object[] GetStepArgs( - object[] args, - int stepNumber, - object contextData, - bool earlyBound - ) - { - object[] newArgs = new object[] { - "Step", args, stepNumber, contextData - }; - - if (!earlyBound) - newArgs = new object[] { newArgs }; // WRAP - - return newArgs; - } - - ///////////////////////////////////////////////////////////////////////// - - ///. - /// - /// Updates the output arguments for the - /// - /// The original arguments received by themethod, - /// using an of . The first - /// argument is always the literal string "Step". Currently, only the - /// parameter is updated. - /// method. - /// - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - /// - /// Non-zero if the returned arguments are going to be used with the - /// type; otherwise, zero. - /// - /// - /// The arguments to pass to the configured - protected virtual void UpdateStepArgs( - object[] args, - ref object contextData, - bool earlyBound - ) - { - object[] newArgs; - - if (earlyBound) - newArgs = args; - else - newArgs = args[0] as object[]; - - if (newArgs == null) - return; - - contextData = newArgs[newArgs.Length - 1]; - } - - ///////////////////////////////////////////////////////////////////////// - - ///. - /// - /// Returns the list of arguments for the - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - /// - /// Non-zero if the returned arguments are going to be used with the - ///method, - /// as an of . The first - /// argument is always the literal string "Final". - /// type; otherwise, zero. - /// - /// - /// The arguments to pass to the configured - protected virtual object[] GetFinalArgs( - object contextData, - bool earlyBound - ) - { - object[] newArgs = new object[] { "Final", contextData }; - - if (!earlyBound) - newArgs = new object[] { newArgs }; // WRAP - - return newArgs; - } - - ///////////////////////////////////////////////////////////////////////// - - ///. - /// - /// Returns the list of arguments for the - /// - /// The first string to compare. - /// - /// - /// The second strnig to compare. - /// - /// - /// Non-zero if the returned arguments are going to be used with the - ///method, - /// as an of . The first - /// argument is always the literal string "Compare". - /// type; otherwise, zero. - /// - /// - /// The arguments to pass to the configured - protected virtual object[] GetCompareArgs( - string param1, - string param2, - bool earlyBound - ) - { - object[] newArgs = new object[] { "Compare", param1, param2 }; - - if (!earlyBound) - newArgs = new object[] { newArgs }; // WRAP - - return newArgs; - } - #endregion - - ///////////////////////////////////////////////////////////////////////// - - #region Public Properties - private Delegate callback1; - ///. - /// - /// The - public virtual Delegate Callback1 - { - get { return callback1; } - set { callback1 = value; } - } - - ///////////////////////////////////////////////////////////////////////// - - private Delegate callback2; - ///to be used for all calls into the - /// , , and - /// virtual methods needed by the - /// base class. - /// - /// The - public virtual Delegate Callback2 - { - get { return callback2; } - set { callback2 = value; } - } - #endregion - - ///////////////////////////////////////////////////////////////////////// - - #region System.Data.SQLite.SQLiteFunction Overrides - ///to be used for all calls into the - /// virtual methods needed by the - /// base class. - /// - /// This virtual method is the implementation for scalar functions. - /// See the - /// - /// The arguments for the scalar function. - /// - ///method for more - /// details. - /// - /// The result of the scalar function. - /// - public override object Invoke( - object[] args /* in */ - ) - { - if (callback1 == null) - { - throw new InvalidOperationException( - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, - NoCallbackError, "Invoke")); - } - - SQLiteInvokeDelegate invokeDelegate = - callback1 as SQLiteInvokeDelegate; - - if (invokeDelegate != null) - { - return invokeDelegate.Invoke("Invoke", args); /* throw */ - } - else - { -#if !PLATFORM_COMPACTFRAMEWORK - return callback1.DynamicInvoke( - GetInvokeArgs(args, false)); /* throw */ -#else - throw new NotImplementedException(); -#endif - } - } - - ///////////////////////////////////////////////////////////////////////// - - ///- /// This virtual method is part of the implementation for aggregate - /// functions. See the - /// - /// The arguments for the aggregate function. - /// - /// - /// The step number (one based). This is incrememted each time the - ///method - /// for more details. - /// method is called. - /// - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - public override void Step( - object[] args, /* in */ - int stepNumber, /* in */ - ref object contextData /* in, out */ - ) - { - if (callback1 == null) - { - throw new InvalidOperationException( - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, - NoCallbackError, "Step")); - } - - SQLiteStepDelegate stepDelegate = callback1 as SQLiteStepDelegate; - - if (stepDelegate != null) - { - stepDelegate.Invoke( - "Step", args, stepNumber, ref contextData); /* throw */ - } - else - { -#if !PLATFORM_COMPACTFRAMEWORK - object[] newArgs = GetStepArgs( - args, stepNumber, contextData, false); - - /* IGNORED */ - callback1.DynamicInvoke(newArgs); /* throw */ - - UpdateStepArgs(newArgs, ref contextData, false); -#else - throw new NotImplementedException(); -#endif - } - } - - ///////////////////////////////////////////////////////////////////////// - - /// - /// This virtual method is part of the implementation for aggregate - /// functions. See the - /// - /// A placeholder for implementers to store contextual data pertaining - /// to the current context. - /// - ///method - /// for more details. - /// - /// The result of the aggregate function. - /// - public override object Final( - object contextData /* in */ - ) - { - if (callback2 == null) - { - throw new InvalidOperationException( - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, - NoCallbackError, "Final")); - } - - SQLiteFinalDelegate finalDelegate = callback2 as SQLiteFinalDelegate; - - if (finalDelegate != null) - { - return finalDelegate.Invoke("Final", contextData); /* throw */ - } - else - { -#if !PLATFORM_COMPACTFRAMEWORK - return callback1.DynamicInvoke(GetFinalArgs( - contextData, false)); /* throw */ -#else - throw new NotImplementedException(); -#endif - } - } - - ///////////////////////////////////////////////////////////////////////// - - ///- /// This virtual method is part of the implementation for collating - /// sequences. See the - /// - /// The first string to compare. - /// - /// - /// The second strnig to compare. - /// - ///method - /// for more details. - /// - /// A positive integer if the - public override int Compare( - string param1, /* in */ - string param2 /* in */ - ) - { - if (callback1 == null) - { - throw new InvalidOperationException( - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, - NoCallbackError, "Compare")); - } - - SQLiteCompareDelegate compareDelegate = - callback1 as SQLiteCompareDelegate; - - if (compareDelegate != null) - { - return compareDelegate.Invoke( - "Compare", param1, param2); /* throw */ - } - else - { -#if !PLATFORM_COMPACTFRAMEWORK - object result = callback1.DynamicInvoke(GetCompareArgs( - param1, param2, false)); /* throw */ - - if (result is int) - return (int)result; - - throw new InvalidOperationException( - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, - ResultInt32Error, "Compare")); -#else - throw new NotImplementedException(); -#endif - } - } - #endregion - } - - ///////////////////////////////////////////////////////////////////////////// + + ///parameter is - /// greater than the parameter, a negative - /// integer if the parameter is less than - /// the parameter, or zero if they are - /// equal. - /// /// Extends SQLiteFunction and allows an inherited class to obtain the collating sequence associated with a function call. /// ///@@ -1722,16 +1019,10 @@ #endif } /////////////////////////////////////////////////////////////////////////////////////////////// - /// - /// Cleans up resources (native and managed) associated with the current instance. - /// - /// - /// Zero when being disposed via garbage collection; otherwise, non-zero. - /// protected override void Dispose(bool disposing) { try { if (!disposed) @@ -1774,11 +1065,11 @@ /// 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. ///- /// Collating 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 + /// 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. /// Collation = 2, } @@ -1800,11 +1091,11 @@ #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif internal delegate void SQLiteFinalCallback(IntPtr context); ///- /// Internal callback delegate for implementing collating sequences + /// 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 Index: System.Data.SQLite/SQLiteFunctionAttribute.cs ================================================================== --- System.Data.SQLite/SQLiteFunctionAttribute.cs +++ System.Data.SQLite/SQLiteFunctionAttribute.cs @@ -1,66 +1,60 @@ /******************************************************** * 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; + ////// A simple custom attribute to enable us to easily find user-defined functions in /// the loaded assemblies and initialize them in SQLite as connections are made. /// [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] public sealed class SQLiteFunctionAttribute : Attribute { - private string _name; + private string _name; private int _argumentCount; private FunctionType _functionType; private Type _instanceType; - private Delegate _callback1; - private Delegate _callback2; ////// Default constructor, initializes the internal variables for the function. - /// - public SQLiteFunctionAttribute() - : this(null, -1, FunctionType.Scalar) - { - // do nothing. - } - - ///- /// Constructs an instance of this class. This sets the initial - /// - /// - /// The name of the function, as seen by the SQLite core library. - /// - /// - /// The number of arguments that the function will accept. - /// - /// - /// The type of function being declared. This will either be Scalar, - /// Aggregate, or Collation. - /// - public SQLiteFunctionAttribute( - string name, - int argumentCount, - FunctionType functionType - ) - { - _name = name; - _argumentCount = argumentCount; - _functionType = functionType; - _instanceType = null; - _callback1 = null; - _callback2 = null; + ///, , and - /// properties to null. - /// + /// Constructs an instance of this class. + /// + /// + /// The name of the function, as seen by the SQLite core library. + /// + /// + /// The number of arguments that the function will accept. + /// + /// + /// The type of function being declared. This will either be Scalar, + /// Aggregate, or Collation. + /// + public SQLiteFunctionAttribute( + string name, + int argumentCount, + FunctionType functionType + ) + { + _name = name; + _argumentCount = argumentCount; + _functionType = functionType; + _instanceType = null; } ////// The function's name as it will be used in SQLite command text. /// @@ -72,12 +66,12 @@ ////// The number of arguments this function expects. -1 if the number of arguments is variable. /// public int Arguments - { - get { return _argumentCount; } + { + get { return _argumentCount; } set { _argumentCount = value; } } ////// The type of function this implementation will be. @@ -86,40 +80,16 @@ { get { return _functionType; } set { _functionType = value; } } - /// - /// The + 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(); + } + + /////////////////////////////////////////////////////////////////////////////////////////////// + + #region IDisposable Members + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + #endregion + + /////////////////////////////////////////////////////////////////////////////////////////////// + + #region IDisposable "Pattern" Members + private bool disposed; + private void CheckDisposed() /* throw */ + { +#if THROW_ON_DISPOSED + if (disposed) + throw new ObjectDisposedException(typeof(KeyQuery).Name); +#endif + } + + /////////////////////////////////////////////////////////////////////////////////////////////// + + private void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + //////////////////////////////////// + // dispose managed resources here... + //////////////////////////////////// + + IsValid = false; + + if (_command != null) _command.Dispose(); + _command = null; + } + + ////////////////////////////////////// + // release unmanaged resources here... + ////////////////////////////////////// + + disposed = true; + } + } + #endregion + + /////////////////////////////////////////////////////////////////////////////////////////////// + + #region Destructor + ~KeyQuery() + { + Dispose(false); + } + #endregion } ///object instance that describes the class - /// containing the implementation for the associated function. The value of - /// this property will not be used if either the or - /// property values are set to non-null. + /// + /// The internal Type InstanceType - { - get { return _instanceType; } + { + get { return _instanceType; } set { _instanceType = value; } } - - ///object instance that describes the class + /// containing the implementation for the associated function. /// - /// The - internal Delegate Callback1 - { - get { return _callback1; } - set { _callback1 = value; } - } - - ///that refers to the implementation for the - /// associated function. If this property value is set to non-null, it will - /// be used instead of the property value. - /// - /// The - internal Delegate Callback2 - { - get { return _callback2; } - set { _callback2 = value; } - } } } Index: System.Data.SQLite/SQLiteKeyReader.cs ================================================================== --- System.Data.SQLite/SQLiteKeyReader.cs +++ System.Data.SQLite/SQLiteKeyReader.cs @@ -40,108 +40,108 @@ internal int column; } ///that refers to the implementation for the - /// associated function. If this property value is set to non-null, it will - /// be used instead of the property value. - /// /// A single sub-query for a given table/database. - /// - 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 = UnsafeNativeMethods.StringFormat(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(); - } - - /////////////////////////////////////////////////////////////////////////////////////////////// - - #region IDisposable Members - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - #endregion - - /////////////////////////////////////////////////////////////////////////////////////////////// - - #region IDisposable "Pattern" Members - private bool disposed; - private void CheckDisposed() /* throw */ - { -#if THROW_ON_DISPOSED - if (disposed) - throw new ObjectDisposedException(typeof(KeyQuery).Name); -#endif - } - - /////////////////////////////////////////////////////////////////////////////////////////////// - - private void Dispose(bool disposing) - { - if (!disposed) - { - if (disposing) - { - //////////////////////////////////// - // dispose managed resources here... - //////////////////////////////////// - - IsValid = false; - - if (_command != null) _command.Dispose(); - _command = null; - } - - ////////////////////////////////////// - // release unmanaged resources here... - ////////////////////////////////////// - - disposed = true; - } - } - #endregion - - /////////////////////////////////////////////////////////////////////////////////////////////// - - #region Destructor - ~KeyQuery() - { - Dispose(false); - } - #endregion + ////// This function does all the nasty work at determining what keys need to be returned for /// a given statement. @@ -307,75 +307,75 @@ // CommandBehavior.KeyInfo _keyInfo = new KeyInfo[keys.Count]; keys.CopyTo(_keyInfo); } - /////////////////////////////////////////////////////////////////////////////////////////////// - - #region IDisposable Members - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - #endregion - - /////////////////////////////////////////////////////////////////////////////////////////////// - - #region IDisposable "Pattern" Members - private bool disposed; - private void CheckDisposed() /* throw */ - { -#if THROW_ON_DISPOSED - if (disposed) - throw new ObjectDisposedException(typeof(SQLiteKeyReader).Name); -#endif - } - - /////////////////////////////////////////////////////////////////////////////////////////////// - - private void Dispose(bool disposing) - { - if (!disposed) - { - if (disposing) - { - //////////////////////////////////// - // dispose managed resources here... - //////////////////////////////////// - - _stmt = null; - - if (_keyInfo != null) - { - for (int n = 0; n < _keyInfo.Length; n++) - { - if (_keyInfo[n].query != null) - _keyInfo[n].query.Dispose(); - } - - _keyInfo = null; - } - } - - ////////////////////////////////////// - // release unmanaged resources here... - ////////////////////////////////////// - - disposed = true; - } - } - #endregion - - /////////////////////////////////////////////////////////////////////////////////////////////// - - #region Destructor - ~SQLiteKeyReader() - { - Dispose(false); - } - #endregion + /////////////////////////////////////////////////////////////////////////////////////////////// + + #region IDisposable Members + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + #endregion + + /////////////////////////////////////////////////////////////////////////////////////////////// + + #region IDisposable "Pattern" Members + private bool disposed; + private void CheckDisposed() /* throw */ + { +#if THROW_ON_DISPOSED + if (disposed) + throw new ObjectDisposedException(typeof(SQLiteKeyReader).Name); +#endif + } + + /////////////////////////////////////////////////////////////////////////////////////////////// + + private void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + //////////////////////////////////// + // dispose managed resources here... + //////////////////////////////////// + + _stmt = null; + + if (_keyInfo != null) + { + for (int n = 0; n < _keyInfo.Length; n++) + { + if (_keyInfo[n].query != null) + _keyInfo[n].query.Dispose(); + } + + _keyInfo = null; + } + } + + ////////////////////////////////////// + // release unmanaged resources here... + ////////////////////////////////////// + + disposed = true; + } + } + #endregion + + /////////////////////////////////////////////////////////////////////////////////////////////// + + #region Destructor + ~SQLiteKeyReader() + { + Dispose(false); + } + #endregion /////////////////////////////////////////////////////////////////////////////////////////////// /// /// How many additional columns of keyinfo we're holding Index: System.Data.SQLite/SQLiteLog.cs ================================================================== --- System.Data.SQLite/SQLiteLog.cs +++ System.Data.SQLite/SQLiteLog.cs @@ -102,11 +102,11 @@ /// private static SQLiteLogEventHandler _defaultHandler; /////////////////////////////////////////////////////////////////////// -#if !USE_INTEROP_DLL || !INTEROP_LOG +#if !INTEROP_LOG ////// The log callback passed to native SQLite engine. This must live /// as long as the SQLite library has a pointer to it. /// private static SQLiteLogCallback _callback; @@ -176,11 +176,11 @@ _domainUnload = new EventHandler(DomainUnload); AppDomain.CurrentDomain.DomainUnload += _domainUnload; } #endif -#if !USE_INTEROP_DLL || !INTEROP_LOG +#if !INTEROP_LOG // // NOTE: Create an instance of the SQLite wrapper class. // if (_sql == null) { @@ -243,11 +243,11 @@ // NOTE: Disable logging. If necessary, it can be re-enabled // later by the Initialize method. // _enabled = false; -#if !USE_INTEROP_DLL || !INTEROP_LOG +#if !INTEROP_LOG // // BUGBUG: This will cause serious problems if other AppDomains // have any open SQLite connections; however, there is // currently no way around this limitation. // @@ -557,19 +557,19 @@ } if ((errorCode != null) && !Object.ReferenceEquals(errorCode, String.Empty)) { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "SQLite {0} ({1}): {2}", type, errorCode, message)); } else { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "SQLite {0}: {1}", type, message)); } #endif } } } Index: System.Data.SQLite/SQLiteModule.cs ================================================================== --- System.Data.SQLite/SQLiteModule.cs +++ System.Data.SQLite/SQLiteModule.cs @@ -6165,12 +6165,11 @@ { if (LogExceptionsNoThrow) { /* throw */ SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"{0}\" method: {1}", destroy ? "xDestroy" : "xDisconnect", e)); } } catch @@ -6225,12 +6224,11 @@ try { if (logErrors) { SQLiteLog.LogMessage(SQLiteErrorCode.Error, - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Virtual table error: {0}", error)); /* throw */ } } catch { @@ -6273,12 +6271,11 @@ try { if (logExceptions) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"SetTableError\" method: {0}", e)); /* throw */ } } catch @@ -6675,11 +6672,11 @@ tables.TryGetValue(pVtab, out table)) { return table; } - SetTableError(pVtab, UnsafeNativeMethods.StringFormat( + SetTableError(pVtab, String.Format( CultureInfo.CurrentCulture, "managed table for {0} not found", pVtab)); return null; } @@ -6769,11 +6766,11 @@ cursors.TryGetValue(pCursor, out cursor)) { return cursor; } - SetTableError(pVtab, UnsafeNativeMethods.StringFormat( + SetTableError(pVtab, String.Format( CultureInfo.CurrentCulture, "managed cursor for {0} not found", pCursor)); return null; } @@ -6855,13 +6852,11 @@ int argumentCount, string name, SQLiteFunction function ) { - return UnsafeNativeMethods.StringFormat( - CultureInfo.InvariantCulture, - "{0}:{1}", argumentCount, name); + return String.Format("{0}:{1}", argumentCount, name); } #endregion /////////////////////////////////////////////////////////////////////// @@ -8682,12 +8677,11 @@ try { if (LogExceptionsNoThrow) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, - UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Dispose\" method: {0}", e)); /* throw */ } } catch Index: System.Data.SQLite/SQLiteModuleCommon.cs ================================================================== --- System.Data.SQLite/SQLiteModuleCommon.cs +++ System.Data.SQLite/SQLiteModuleCommon.cs @@ -21,14 +21,13 @@ #region Private Constants ////// The CREATE TABLE statement used to declare the schema for the /// virtual table. /// - private static readonly string declareSql = - UnsafeNativeMethods.StringFormat( - CultureInfo.InvariantCulture, "CREATE TABLE {0}(x);", - typeof(SQLiteModuleCommon).Name); + private static readonly string declareSql = String.Format( + CultureInfo.CurrentCulture, "CREATE TABLE {0}(x);", + typeof(SQLiteModuleCommon).Name); #endregion /////////////////////////////////////////////////////////////////////// #region Private Data @@ -117,13 +116,12 @@ Type type ) { if (type != null) { - SetCursorError(cursor, UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, "not a \"{0}\" cursor", - type)); + SetCursorError(cursor, + String.Format("not a \"{0}\" cursor", type)); } else { SetCursorError(cursor, "cursor type mismatch"); } Index: System.Data.SQLite/SQLiteModuleEnumerable.cs ================================================================== --- System.Data.SQLite/SQLiteModuleEnumerable.cs +++ System.Data.SQLite/SQLiteModuleEnumerable.cs @@ -501,12 +501,11 @@ { CheckDisposed(); if (!table.BestIndex(index)) { - SetTableError(table, UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + SetTableError(table, String.Format(CultureInfo.CurrentCulture, "failed to select best index for virtual table \"{0}\"", table.TableName)); return SQLiteErrorCode.Error; } @@ -829,12 +828,11 @@ ref long rowId ) { CheckDisposed(); - SetTableError(table, UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + SetTableError(table, String.Format(CultureInfo.CurrentCulture, "virtual table \"{0}\" is read-only", table.TableName)); return SQLiteErrorCode.Error; } @@ -859,12 +857,11 @@ { CheckDisposed(); if (!table.Rename(newName)) { - SetTableError(table, UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + SetTableError(table, String.Format(CultureInfo.CurrentCulture, "failed to rename virtual table from \"{0}\" to \"{1}\"", table.TableName, newName)); return SQLiteErrorCode.Error; } Index: System.Data.SQLite/SQLiteParameterCollection.cs ================================================================== --- System.Data.SQLite/SQLiteParameterCollection.cs +++ System.Data.SQLite/SQLiteParameterCollection.cs @@ -49,11 +49,11 @@ _command = cmd; _parameterList = new List(); _unboundFlag = true; } - /// + /// /// Returns false /// public override bool IsSynchronized { get { return false; } @@ -425,11 +425,11 @@ { y ++; s = p.ParameterName; if (s == null) { - s = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, ";{0}", nUnnamed); + s = String.Format(CultureInfo.InvariantCulture, ";{0}", nUnnamed); nUnnamed++; } int x; bool isMapped = false; @@ -454,11 +454,11 @@ // If the parameter has a name, but the SQL statement uses unnamed references, this can happen -- attempt to map // the parameter by its index in the collection if (isMapped == false) { - s = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, ";{0}", y); + s = String.Format(CultureInfo.InvariantCulture, ";{0}", y); stmt = activeStatement; for (n = 0; n < x; n++) { if (stmt == null) stmt = _command._statementList[n]; Index: System.Data.SQLite/SQLiteStatement.cs ================================================================== --- System.Data.SQLite/SQLiteStatement.cs +++ System.Data.SQLite/SQLiteStatement.cs @@ -1,9 +1,9 @@ /******************************************************** * 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 { @@ -83,11 +83,11 @@ for (x = 0; x < n; x++) { s = _sql.Bind_ParamName(this, _flags, x + 1); if (String.IsNullOrEmpty(s)) { - s = UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, ";{0}", nCmdStart); + s = String.Format(CultureInfo.InvariantCulture, ";{0}", nCmdStart); nCmdStart++; _unnamedParameters++; } _paramNames[x] = s; _paramValues[x] = null; @@ -202,11 +202,11 @@ /// The parameter name to map /// The parameter to assign it internal bool MapParameter(string s, SQLiteParameter p) { if (_paramNames == null) return false; - + int startAt = 0; if (s.Length > 0) { if (":$@;".IndexOf(s[0]) == -1) startAt = 1; @@ -256,12 +256,11 @@ if ((_flags & SQLiteConnectionFlags.LogPreBind) == SQLiteConnectionFlags.LogPreBind) { IntPtr handle = _sqlite_stmt; - SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat( - CultureInfo.CurrentCulture, + SQLiteLog.LogMessage(String.Format( "Binding statement {0} paramter #{1} with database type {2} and raw value {{{3}}}...", handle, index, objType, obj)); } if ((obj == null) || Convert.IsDBNull(obj)) Index: System.Data.SQLite/UnsafeNativeMethods.cs ================================================================== --- System.Data.SQLite/UnsafeNativeMethods.cs +++ System.Data.SQLite/UnsafeNativeMethods.cs @@ -121,82 +121,10 @@ { Initialize(); } ///////////////////////////////////////////////////////////////////////// - - ///- /// This type is only present when running on Mono. - /// - private static readonly string MonoRuntimeType = "Mono.Runtime"; - - ///- /// Keeps track of whether we are running on Mono. Initially null, it is - /// set by the - private static bool? isMono = null; - - ///method on its first call. Later, it - /// is returned verbatim by the method. - /// - /// Determines whether or not this assembly is running on Mono. - /// - ///- /// Non-zero if this assembly is running on Mono. - /// - private static bool IsMono() - { - try - { - lock (staticSyncRoot) - { - if (isMono == null) - isMono = (Type.GetType(MonoRuntimeType) != null); - - return (bool)isMono; - } - } - catch - { - // do nothing. - } - - return false; - } - - ///////////////////////////////////////////////////////////////////////// - - ///- /// This is a wrapper around the - /// - /// - /// This is used for culture-specific formatting. - /// - /// - /// The format string. - /// - /// - /// An array the objects to format. - /// - ///method. - /// On Mono, it has to call the method overload without the - /// parameter, due to a bug in Mono. - /// - /// The resulting string. - /// - internal static string StringFormat( - IFormatProvider provider, - string format, - params object[] args - ) - { - if (IsMono()) - return String.Format(format, args); - else - return String.Format(provider, format, args); - } - - ///////////////////////////////////////////////////////////////////////// ////// Attempts to initialize this class by pre-loading the native SQLite /// library for the processor architecture of the current process. /// internal static void Initialize() @@ -371,13 +299,12 @@ if (Environment.GetEnvironmentVariable("No_Expand") != null) { expand = false; } - else if (Environment.GetEnvironmentVariable(StringFormat( - CultureInfo.InvariantCulture, "No_Expand_{0}", - name)) != null) + else if (Environment.GetEnvironmentVariable(String.Format( + "No_Expand_{0}", name)) != null) { expand = false; } value = Environment.GetEnvironmentVariable(name); @@ -398,12 +325,11 @@ XmlDocument document = new XmlDocument(); document.Load(fileName); - XmlElement element = document.SelectSingleNode(StringFormat( - CultureInfo.InvariantCulture, + XmlElement element = document.SelectSingleNode(String.Format( "/configuration/appSettings/add[@key='{0}']", name)) as XmlElement; if (element != null) { @@ -426,11 +352,11 @@ #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to get setting " + "\"{0}\" value: {1}", name, e)); /* throw */ } catch @@ -542,11 +468,11 @@ if (File.Exists(xmlConfigFileName)) { #if !NET_COMPACT_20 && TRACE_DETECTION try { - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader found XML configuration file " + "via code base for currently executing assembly: \"{0}\"", xmlConfigFileName)); /* throw */ } @@ -565,11 +491,11 @@ if (CheckForArchitecturesAndPlatforms(directory, ref matches) > 0) { #if !NET_COMPACT_20 && TRACE_DETECTION try { - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader found native sub-directories " + "via code base for currently executing assembly: \"{0}\"", ListToString(matches))); /* throw */ } @@ -592,11 +518,11 @@ #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to check code base " + "for currently executing assembly: {0}", e)); /* throw */ } catch @@ -659,11 +585,11 @@ #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to get directory " + "for currently executing assembly: {0}", e)); /* throw */ } catch @@ -1029,11 +955,11 @@ { // // NOTE: Show that we hit a fairly unusual situation (i.e. // the "wrong" processor architecture was detected). // - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader detected {0}-bit pointer " + "size with processor architecture \"{1}\", using " + "processor architecture \"{2}\" instead...", IntPtr.Size * 8 /* bits */, savedProcessorArchitecture, @@ -1248,11 +1174,11 @@ { // // NOTE: Show exactly where we are trying to load the native // SQLite library from. // - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader is trying to load native " + "SQLite library \"{0}\"...", fileName)); /* throw */ } catch @@ -1288,11 +1214,11 @@ // // NOTE: Show where we failed to load the native SQLite // library from along with the Win32 error code and // exception information. // - Trace.WriteLine(StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to load native " + "SQLite library \"{0}\" (getLastError = {1}): {2}", fileName, lastError, e)); /* throw */ } @@ -3028,11 +2954,11 @@ #endif #if !NET_COMPACT_20 && TRACE_HANDLE try { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "CloseConnection: {0}", localHandle)); /* throw */ } catch { @@ -3063,11 +2989,11 @@ #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "CloseConnection: {0}, exception: {1}", handle, e)); /* throw */ } catch @@ -3216,11 +3142,11 @@ SQLiteBase.FinalizeStatement(cnn, localHandle); #if !NET_COMPACT_20 && TRACE_HANDLE try { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinalizeStatement: {0}", localHandle)); /* throw */ } catch { @@ -3251,11 +3177,11 @@ #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinalizeStatement: {0}, exception: {1}", handle, e)); /* throw */ } catch @@ -3389,11 +3315,11 @@ SQLiteBase.FinishBackup(cnn, localHandle); #if !NET_COMPACT_20 && TRACE_HANDLE try { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinishBackup: {0}", localHandle)); /* throw */ } catch { @@ -3424,11 +3350,11 @@ #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { - Trace.WriteLine(UnsafeNativeMethods.StringFormat( + Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinishBackup: {0}, exception: {1}", handle, e)); /* throw */ } catch Index: Targets/SQLite.NET.targets ================================================================== --- Targets/SQLite.NET.targets +++ Targets/SQLite.NET.targets @@ -116,11 +116,11 @@ Condition="Exists('$(TargetPath).config')" />+ Command=""$(DirForCloneAndMark32BitOnly)bin\CorFlags.exe" "$(TargetDir)$(TargetName)32$(TargetExt)" /32BIT+ /Force" /> @@ -149,11 +149,11 @@ Condition="Exists('$(TargetPath).config')" /> + Command=""$(TargetFrameworkSDKToolsDirectory)CorFlags.exe" "$(TargetDir)$(TargetName)32$(TargetExt)" /32BIT+ /Force" /> Index: Tests/authorizer.eagle ================================================================== --- Tests/authorizer.eagle +++ Tests/authorizer.eagle @@ -122,12 +122,11 @@ set result [lindex [split [string map [list \r\n \n] $result] \n] 0] lappend results [list $name $data $code $result] } lappend results [isTableInDb tDeny] - string map \ - [list "SQLiteException (0x80004005):" "SQLiteException:"] $results + set results } -cleanup { catch {object invoke $connection remove_Authorize $callback} catch {object removecallback $callback} cleanupDb $fileName @@ -160,11 +159,11 @@ BEGIN {} {} {}} {0 Transaction COMMIT {} {} {}}} 0 -1} {Savepoint {{0 Savepoint\ BEGIN s1 {} {}} {0 Savepoint RELEASE s1 {} {}}} 0 -1} {Attach {{0 Attach\ :memory: {} {} {}}} 0 -1} {Detach {{0 Detach d1 {} {} {}}} 0 -1} {CreateVtable\ {{0 CreateVtable t3 fts4 main {}}} 0 0} {DropVtable {{0 DropVtable t3 fts4 main\ {}}} 0 0} {CreateTable {{0 CreateTable tDeny {} main {}}} 1\ -{System.Data.SQLite.SQLiteException: authorization denied}} False}} +{System.Data.SQLite.SQLiteException (0x80004005): authorization denied}} False}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue Index: Tests/basic.eagle ================================================================== --- Tests/basic.eagle +++ Tests/basic.eagle @@ -1572,11 +1572,11 @@ cleanupDb $fileName freeDbConnection unset -nocomplain providerServices connection db fileName -} -constraints {eagle monoToDo command.object SQLite System.Data.SQLite\ +} -constraints {eagle command.object SQLite System.Data.SQLite\ System.Data.SQLite.Linq} -result {}} ############################################################################### runTest {test data-1.30 {EF6 ISQLiteSchemaExtensions.BuildTempSchema} -setup { @@ -1594,11 +1594,11 @@ cleanupDb $fileName freeDbConnection unset -nocomplain providerServices connection db fileName -} -constraints {eagle monoToDo command.object SQLite System.Data.SQLite\ +} -constraints {eagle command.object SQLite System.Data.SQLite\ System.Data.SQLite.EF6} -result {}} ############################################################################### runTest {test data-1.31 {VARCHAR / NVARCHAR types with spaces} -body { @@ -2381,15 +2381,14 @@ set result } -cleanup { cleanupDb $fileName unset -nocomplain output result db fileName -} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite SQLiteInterop\ -defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS} -match regexp \ --result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\ -SQL logic error or missing database.*?\} 0 1234123412341234$}} +} -constraints \ +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \ +regexp -result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException\ +\(0x80004005\): SQL logic error or missing database.*?\} 0 1234123412341234$}} ############################################################################### runTest {test data-1.50 {column name and index lookup} -setup { setupDb [set fileName data-1.50.db] @@ -2697,11 +2696,11 @@ cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite SQLiteInterop} -result {1 {} 1.01 {}}} +System.Data.SQLite} -result {1 {} 1.01 {}}} ############################################################################### runTest {test data-1.57 {regexp extension} -setup { setupDb [set fileName data-1.57.db] @@ -2757,12 +2756,12 @@ cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite SQLiteInterop} -result {0 1 1 {unmatched '('} 0 1 1\ -{unmatched '('} 0 0 1 {unmatched '('} 0 0 1 {unmatched '('}}} +System.Data.SQLite} -result {0 1 1 {unmatched '('} 0 1 1 {unmatched '('} 0 0 1\ +{unmatched '('} 0 0 1 {unmatched '('}}} ############################################################################### reportSQLiteResources $test_channel @@ -2839,11 +2838,11 @@ cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite SQLiteInterop} -result {0 4 -1 1.75}} +System.Data.SQLite} -result {0 4 -1 1.75}} ############################################################################### runTest {test data-1.60 {per-connection type mappings} -setup { setupDb [set fileName data-1.60.db] "" "" "" UseConnectionTypes @@ -3171,12 +3170,11 @@ freeDbConnection unset -nocomplain connection db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite} -match regexp -result \ -{^Default Default|LogCallbackException LogCallbackException$}} +System.Data.SQLite} -result {Default Default}} ############################################################################### runTest {test data-1.69 {set env(DefaultFlags_SQLiteConnection)} -setup { saveSQLiteConnectionEnvironment @@ -3280,13 +3278,13 @@ cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite SQLiteInterop} -match regexp -result \ -{^\{fts5: \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\}\ -\{\} \{\} \{rowid 3 x horse rowid 4 x house\}$}} +System.Data.SQLite} -match regexp -result {^\{fts5: \d{4}-\d{2}-\d{2}\ +\d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\} \{\} \{\} \{rowid 3 x horse\ +rowid 4 x house\}$}} ############################################################################### runTest {test data-1.72 {unbind function from a connection} -setup { set fileName data-1.72.db @@ -3590,277 +3588,14 @@ \{System\.Reflection\.TargetInvocationException: Exception has been thrown by\ the target of an invocation\. ---> System\.Data\.SQLite\.SQLiteException: SQL\ logic error or missing database no such function: MyRandom.*\} 0 \{\} 0 (?:-)?\d+ 0 \{\}$}]} -############################################################################### - -runTest {test data-1.74 {bind functions using delegate} -setup { - proc getMyFuncArgs { argumentCount } { - set result [list] - - for {set index 0} {$index < $argumentCount} {incr index} { - lappend result [appendArgs 'myFuncArg [expr {$index + 1}] '] - } - - return $result - } - - proc getHashCode { value } { - if {[isObjectHandle $value]} then { - if {$value eq "null"} then { - return 0 - } else { - return [object invoke $value GetHashCode] - } - } else { - if {[string length $value] == 0} then { - return 0 - } else { - set string [object create String $value] - - return [object invoke $string GetHashCode] - } - } - } - - proc hashManagedArray { array } { - set data "" - - if {[isObjectHandle $array] && $array ne "null"} then { - if {[object invoke $array GetType.IsArray]} then { - for {set index 0} {$index < [$array Length]} {incr index} { - set element [$array -create -alias GetValue $index] - - if {[string length $element] > 0} then { - append data [$element ToString] - } else { - append data null - } - } - } - } - - return [getHashCode [hash normal sha1 $data]] - } - - proc myFuncCallback { args } { - if {[llength $args] == 0} then { - error "no function arguments" - } - - set name [lindex $args 0] - - if {[isObjectHandle $name] && $name ne "null"} then { - set name [object invoke $name ToString] - } - - switch -exact -- $name { - Invoke { - return [hashManagedArray [lindex $args end]] - } - Step { - set varName [lindex $args end] - - if {[string length $varName] == 0} then { - error "invalid aggregate context variable name" - } - - upvar 1 $varName ctx - - if {![info exists ctx] || [string length $ctx] == 0} then { - set ctx [pid] - } - - set hashCtx [getHashCode $ctx] - set hashArgs [hashManagedArray [lindex $args end-2]] - - if {[info exists ::aggregateData($hashCtx)]} then { - incr ::aggregateData($hashCtx) $hashArgs - } else { - set ::aggregateData($hashCtx) $hashArgs - } - } - Final { - set ctx [lindex $args end] - - if {[string length $ctx] == 0} then { - error "invalid aggregate context" - } - - set hashCtx [getHashCode $ctx] - - if {[info exists ::aggregateData($hashCtx)]} then { - return $::aggregateData($hashCtx) - } else { - error "missing aggregate context data" - } - } - Compare { - lappend ::compareResults [object invoke -create \ - Int32 Parse [string compare -nocase [lindex \ - $args 1] [lindex $args 2]]] - - return [lindex $::compareResults end] - } - default { - error [appendArgs "unknown function callback \"" $name \"] - } - } - } - - proc myFuncInvokeCallback { param0 objs } { - return [myFuncCallback $param0 $objs] - } - - proc myFuncStepCallback { param0 objs stepNumber contextDataVarName } { - upvar 1 $contextDataVarName $contextDataVarName - return [myFuncCallback $param0 $objs $stepNumber $contextDataVarName] - } - - proc myFuncFinalCallback { param0 contextData } { - return [myFuncCallback $param0 $contextData ] - } - - proc myFuncCompareCallback { param0 param1 param2 } { - return [myFuncCallback $param0 $param1 $param2] - } - - setupDb [set fileName data-1.74.db] -} -body { - sql execute $db "CREATE TABLE t1(x);" - sql execute $db "INSERT INTO t1 (x) VALUES(1);" - sql execute $db "INSERT INTO t1 (x) VALUES(2);" - sql execute $db "INSERT INTO t1 (x) VALUES(3);" - sql execute $db "INSERT INTO t1 (x) VALUES('A');" - sql execute $db "INSERT INTO t1 (x) VALUES('a');" - sql execute $db "INSERT INTO t1 (x) VALUES('M');" - sql execute $db "INSERT INTO t1 (x) VALUES('m');" - sql execute $db "INSERT INTO t1 (x) VALUES('Z');" - sql execute $db "INSERT INTO t1 (x) VALUES('z');" - - set connection [getDbConnection] - - for {set argumentCount 0} {$argumentCount < 3} {incr argumentCount} { - set attribute(1,$argumentCount) [object create \ - System.Data.SQLite.SQLiteFunctionAttribute [appendArgs \ - myFunc1_74_1_ $argumentCount] $argumentCount Scalar] - - $connection -marshalflags \ - {-StrictMatchType +DynamicCallback ForceParameterType} \ - -parametertypes [list System.Data.SQLite.SQLiteFunctionAttribute \ - System.Data.SQLite.SQLiteInvokeDelegate Delegate] \ - BindFunction $attribute(1,$argumentCount) \ - myFuncInvokeCallback null - - set attribute(2,$argumentCount) [object create \ - System.Data.SQLite.SQLiteFunctionAttribute [appendArgs \ - myFunc1_74_2_ $argumentCount] $argumentCount Aggregate] - - $connection -marshalflags \ - {-StrictMatchType +DynamicCallback ForceParameterType} \ - -parametertypes [list System.Data.SQLite.SQLiteFunctionAttribute \ - System.Data.SQLite.SQLiteStepDelegate \ - System.Data.SQLite.SQLiteFinalDelegate] \ - BindFunction $attribute(2,$argumentCount) \ - myFuncStepCallback myFuncFinalCallback - } - - set attribute(3,0) [object create \ - System.Data.SQLite.SQLiteFunctionAttribute myFunc1_74_3 0 \ - Collation] - - $connection -marshalflags \ - {-StrictMatchType +DynamicCallback ForceParameterType} \ - -parametertypes [list System.Data.SQLite.SQLiteFunctionAttribute \ - System.Data.SQLite.SQLiteCompareDelegate Delegate] \ - BindFunction $attribute(3,0) \ - myFuncCompareCallback null - - for {set argumentCount 0} {$argumentCount < 3} {incr argumentCount} { - lappend result [catch { - sql execute $db [appendArgs \ - "SELECT " myFunc1_74_1_ $argumentCount ( \ - [join [getMyFuncArgs $argumentCount] ,] )\;] - } error] $error - - lappend result [catch { - sql execute $db [appendArgs \ - "SELECT " myFunc1_74_2_ $argumentCount ( \ - [join [getMyFuncArgs $argumentCount] ,] )\;] - } error] $error - } - - lappend result [catch { - sql execute -execute reader -format list $db \ - "SELECT x FROM t1 ORDER BY x COLLATE myFunc1_74_3;" - } error] $error - - lappend result [$connection UnbindAllFunctions false] - - for {set argumentCount 0} {$argumentCount < 3} {incr argumentCount} { - lappend result [catch { - sql execute $db [appendArgs \ - "SELECT " myFunc1_74_1_ $argumentCount ( \ - [join [getMyFuncArgs $argumentCount] ,] )\;] - } error] [expr {[string first [appendArgs \ - "no such function: myFunc1_74_1_" $argumentCount] $error] != -1}] - - lappend result [catch { - sql execute $db [appendArgs \ - "SELECT " myFunc1_74_2_ $argumentCount ( \ - [join [getMyFuncArgs $argumentCount] ,] )\;] - } error] [expr {[string first [appendArgs \ - "no such function: myFunc1_74_2_" $argumentCount] $error] != -1}] - } - - lappend result [catch { - sql execute -execute reader -format list $db \ - "SELECT x FROM t1 ORDER BY x COLLATE myFunc1_74_3;" - } error] [expr {[string first "no such collation sequence: myFunc1_74_3" \ - $error] != -1}] - - lappend result [array size aggregateData] - lappend result [testArrayGet aggregateData] - - set result -} -cleanup { - cleanupDb $fileName - - freeDbConnection - - catch {object removecallback myFuncCompareCallback} - catch {object removecallback myFuncFinalCallback} - catch {object removecallback myFuncStepCallback} - catch {object removecallback myFuncInvokeCallback} - - catch { - foreach compareResult $compareResults { - catch {object dispose $compareResult} - } - } - - unset -nocomplain result error compareResult compareResults \ - aggregateData argumentCount attribute connection db fileName - - rename myFuncCompareCallback "" - rename myFuncFinalCallback "" - rename myFuncStepCallback "" - rename myFuncInvokeCallback "" - rename myFuncCallback "" - rename hashManagedArray "" - rename getHashCode "" - rename getMyFuncArgs "" -} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ -System.Data.SQLite} -match regexp -result {^0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 \{1\ -2 3 A a M m Z z\} True 1 True 1 True 1 True 1 True 1 True 1 True 1 True 1\ -\{(?:-)?\d+ (?:-)?\d+\}$}} - ############################################################################### reportSQLiteResources $test_channel ############################################################################### runSQLiteTestFilesEpilogue runSQLiteTestEpilogue runTestEpilogue Index: Tests/linq.eagle ================================================================== --- Tests/linq.eagle +++ Tests/linq.eagle @@ -89,16 +89,15 @@ } set result } -cleanup { unset -nocomplain code output error result -} -constraints {eagle System.Data.SQLite.dll_v4.0.30319 monoToDo SQLite\ -file_System.Data.SQLite.dll testExec file_System.Data.SQLite.Linq.dll\ -file_testlinq.exe file_northwindEF.db} -result {0 {{ NewUnitPrice = 21.0 } {\ -NewUnitPrice = 21.1 } { NewUnitPrice = 21.05 } { NewUnitPrice = 23.0 } {\ -NewUnitPrice = 23.3 } { NewUnitPrice = 23.25 } { NewUnitPrice = 21.0 } {\ -NewUnitPrice = 21.4 } { NewUnitPrice = 21.35 }}}} +} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll testExec\ +file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} \ +-result {0 {{ NewUnitPrice = 21.0 } { NewUnitPrice = 21.1 } { NewUnitPrice =\ +21.05 } { NewUnitPrice = 23.0 } { NewUnitPrice = 23.3 } { NewUnitPrice = 23.25\ +} { NewUnitPrice = 21.0 } { NewUnitPrice = 21.4 } { NewUnitPrice = 21.35 }}}} ############################################################################### runSQLiteTestFilesEpilogue runSQLiteTestEpilogue Index: Tests/speed.eagle ================================================================== --- Tests/speed.eagle +++ Tests/speed.eagle @@ -174,11 +174,11 @@ set result } -cleanup { cleanupDb $fileName unset -nocomplain time sql table column result char db fileName -} -time true -constraints {eagle monoBug40 command.sql compile.DATA SQLite\ +} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {3 3 3 3}} ############################################################################### # Index: Tests/stress.eagle ================================================================== --- Tests/stress.eagle +++ Tests/stress.eagle @@ -1645,11 +1645,11 @@ unset -nocomplain result thread index workload priority noWorkload \ priorities srcDb db fileName compiled options count times logFileName \ logListener event timeout connection indicators iterations exitOnFail \ coTaskMem noTrace failures status workloadNames workloadCallbacks -} -time true -constraints {eagle command.object monoBug40 command.sql\ +} -time true -constraints {eagle command.object monoBug28 command.sql\ compile.DATA SQLite System.Data.SQLite compileCSharp} -result {0}} ############################################################################### # DELETED Tests/tkt-41aea496e0.eagle Index: Tests/tkt-41aea496e0.eagle ================================================================== --- Tests/tkt-41aea496e0.eagle +++ /dev/null @@ -1,65 +0,0 @@ -############################################################################### -# -# tkt-41aea496e0.eagle -- -# -# Written by Joe Mistachkin. -# Released to the public domain, use at your own risk! -# -############################################################################### - -package require Eagle -package require Eagle.Library -package require Eagle.Test - -runTestPrologue - -############################################################################### - -package require System.Data.SQLite.Test -runSQLiteTestPrologue -runSQLiteTestFilesPrologue - -############################################################################### - -runTest {test tkt-41aea496e0-1.1 {LINQ non-rowid primary key support} -body { - # - # 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]] - - set result [list] - set output "" - - set code [catch { - testClrExec $testLinqExeFile [list -eventflags Wait -directory \ - [file dirname $testLinqExeFile] -nocarriagereturns -stdout output \ - -success 0] -complexprimarykey - } 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 -} -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll testExec\ -file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} \ --result {0 {inserted 2 -updated 2}}} - -############################################################################### - -runSQLiteTestFilesEpilogue -runSQLiteTestEpilogue -runTestEpilogue Index: Tests/tkt-47c6fa04d3.eagle ================================================================== --- Tests/tkt-47c6fa04d3.eagle +++ Tests/tkt-47c6fa04d3.eagle @@ -115,11 +115,11 @@ } result] : [set result ""]}] $result [getRowsFromDataTable $result] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName -} -constraints {eagle command.object monoBug40 command.sql compile.DATA SQLite\ +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 System#Data#DataTable#\d+\ \{\{\{id 2\} \{min 2\} \{max 3\} \{sum 5\}\} \{\{id 2\} \{min 1\} \{max 2\}\ \{sum 3\}\}\}$}} Index: Tests/tkt-4a791e70ab.eagle ================================================================== --- Tests/tkt-4a791e70ab.eagle +++ Tests/tkt-4a791e70ab.eagle @@ -69,11 +69,11 @@ } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName -} -constraints {eagle command.object monoBug40 command.sql compile.DATA SQLite\ +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}} ############################################################################### Index: Tests/tkt-56b42d99c1.eagle ================================================================== --- Tests/tkt-56b42d99c1.eagle +++ Tests/tkt-56b42d99c1.eagle @@ -97,11 +97,11 @@ } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName -} -constraints {eagle command.object monoBug40 command.sql compile.DATA SQLite\ +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 True$}} ############################################################################### @@ -174,11 +174,11 @@ } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName -} -constraints {eagle command.object monoBug40 command.sql compile.DATA SQLite\ +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 0$}} ############################################################################### @@ -405,11 +405,11 @@ } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName -} -constraints {eagle command.object monoBug40 command.sql compile.DATA SQLite\ +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 1$}} ############################################################################### Index: Tests/tkt-964063da16.eagle ================================================================== --- Tests/tkt-964063da16.eagle +++ Tests/tkt-964063da16.eagle @@ -27,12 +27,12 @@ $connection Open $connection Flags } -cleanup { unset -nocomplain connection -} -constraints {eagle command.object SQLite System.Data.SQLite} -match regexp \ --result {^Default|LogCallbackException$}} +} -constraints {eagle command.object SQLite System.Data.SQLite} -result \ +{Default}} ############################################################################### runTest {test tkt-964063da16-1.2 {pre-existing connection flags} -body { set connection [object create -alias \ @@ -55,13 +55,12 @@ $connection Flags NoExtensionFunctions; $connection Open $connection Flags } -cleanup { unset -nocomplain connection -} -constraints {eagle command.object SQLite System.Data.SQLite} -match regexp \ --result {^Default, NoExtensionFunctions|NoExtensionFunctions,\ -Default|LogCallbackException, NoExtensionFunctions$}} +} -constraints {eagle command.object SQLite System.Data.SQLite} -result \ +{NoExtensionFunctions, Default}} ############################################################################### runTest {test tkt-964063da16-1.4 {pre-existing connection flags} -body { set connection [object create -alias \ Index: Tests/tkt-aba4549801.eagle ================================================================== --- Tests/tkt-aba4549801.eagle +++ Tests/tkt-aba4549801.eagle @@ -64,11 +64,11 @@ System.Data.SQLite} -match regexp -result \ {^\{System#Data#SQLite#SQLiteConnection#\d+ Opening \{\} \{\} \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ ConnectionString \{\} \{\} \{\}\ -\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\ +\{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\ System#Data#SQLite#SQLiteConnectionHandle#\d+\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ @@ -75,11 +75,11 @@ \{System#Data#SQLite#SQLiteConnection#\d+ Opened \{\} \{\} \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ -\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\ +\{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\ System#Data#SQLite#SQLiteStatementHandle#\d+\}\ \{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ @@ -87,11 +87,11 @@ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ -\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\ +\{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\ System#Data#SQLite#SQLiteStatementHandle#\d+\}\ \{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ @@ -99,11 +99,11 @@ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ -\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\ +\{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\ System#Data#SQLite#SQLiteStatementHandle#\d+\}\ \{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ @@ -113,22 +113,22 @@ System#Data#SQLite#SQLiteTransaction#\d+ \{\} \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ -\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\ -System#Data#SQLite#SQLiteStatementHandle#\d+\} \{\{\} NewCriticalHandle \{\}\ -\{\} \{\} System#Data#SQLite#SQLiteStatementHandle#\d+\}\ +\{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\ +System#Data#SQLite#SQLiteStatementHandle#\d+\} \{System#Object#\d+\ +NewCriticalHandle \{\} \{\} \{\} System#Data#SQLite#SQLiteStatementHandle#\d+\}\ \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ -\{\}\} \{\{\} NewCriticalHandle \{\} \{\} \{\}\ +\{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\ System#Data#SQLite#SQLiteStatementHandle#\d+\}\ \{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ ClosingDataReader \{\}\ System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\ Index: Tests/tkt-ac47dd230a.eagle ================================================================== --- Tests/tkt-ac47dd230a.eagle +++ Tests/tkt-ac47dd230a.eagle @@ -25,12 +25,11 @@ set appDomain($i) [object invoke AppDomain CreateDomain \ [appendArgs tkt-ac47dd230a-1.1. $i]] set result null set interpreterHelper($i) [object invoke -alias InterpreterHelper \ - Create $appDomain($i) null Default Default Default null null null \ - result] + Create $appDomain($i) null Default Default null null null result] if {[string length $interpreterHelper($i)] == 0} then { error [object invoke $result ToString] } Index: Tests/tkt-e06c4caff3.eagle ================================================================== --- Tests/tkt-e06c4caff3.eagle +++ Tests/tkt-e06c4caff3.eagle @@ -29,11 +29,11 @@ [list param1 Double [set NaN [object invoke Double NaN]]] } -cleanup { cleanupDb $fileName unset -nocomplain NaN db fileName -} -constraints {eagle command.object monoBug40 command.sql compile.DATA SQLite\ +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -returnCodes 1 -match regexp -result [string map [list \n\ \r\n] {^System\.Data\.SQLite\.SQLiteException \(0x80004005\): constraint failed NOT NULL constraint failed: t1\.x .*$}]} Index: Tests/tkt-f8dbab8baf.eagle ================================================================== --- Tests/tkt-f8dbab8baf.eagle +++ Tests/tkt-f8dbab8baf.eagle @@ -129,11 +129,11 @@ } -cleanup { cleanupDb $fileName unset -nocomplain rows db fileName } -constraints \ -{eagle monoBug40 command.sql compile.DATA SQLite System.Data.SQLite} \ +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \ -returnCodes 1 -match regexp -result [string map [list \n \r\n] \ {^System\.Data\.SQLite\.SQLiteException \(0x80004005\): SQL logic error or\ missing database no such table: t1.*$}]} Index: data/exclude_bin.txt ================================================================== --- data/exclude_bin.txt +++ data/exclude_bin.txt @@ -8,6 +8,5 @@ *32.exe *32.exe.config *EntityFramework.* *EnvDTE.* *Microsoft.* -*stdole.* Index: lib/System.Data.SQLite/common.eagle ================================================================== --- lib/System.Data.SQLite/common.eagle +++ lib/System.Data.SQLite/common.eagle @@ -511,15 +511,10 @@ # if {$native} then { return true } - # - # NOTE: What is the architecture for this machine? - # - set architecture [machineToPlatform $::tcl_platform(machine) true] - # # NOTE: What is the platform for this machine? # set platform [machineToPlatform $::tcl_platform(machine)] @@ -526,17 +521,10 @@ # # NOTE: Build the fully qualified file name for the interop assembly # containing the System.Data.SQLite native components. If this # file exists, we should have everything we need. # - set fileName [file nativename [file join $directory \ - $architecture SQLite.Interop.dll]] - - if {[file exists $fileName]} then { - return true - } - set fileName [file nativename [file join $directory \ $platform SQLite.Interop.dll]] if {[file exists $fileName]} then { return true @@ -552,17 +540,10 @@ # # NOTE: Build the fully qualified file name for the SQLite core # library. If this file exists, we should have everything we # need. # - set fileName [file nativename [file join $directory \ - $architecture sqlite3.dll]] - - if {[file exists $fileName]} then { - return true - } - set fileName [file nativename [file join $directory \ $platform sqlite3.dll]] if {[file exists $fileName]} then { return true @@ -1218,11 +1199,11 @@ return [expr { [haveConstraint System.Data.SQLite] && [haveConstraint SQLite] }] } - proc matchPlatform { platform } { + proc matchMachine { platform } { # # NOTE: An empty string for the platform means that the build is not # [primarily] a native build; therefore, it always matches. # if {[string length $platform] == 0} then { @@ -1346,11 +1327,11 @@ # # NOTE: When in "select" mode, automatically select the first # available build of System.Data.SQLite and then return # immediately. # - if {$select && [matchPlatform $platform]} then { + if {$select && [matchMachine $platform]} then { # # NOTE: Manually override all the build directory selection # related test settings in order to force this build # of System.Data.SQLite to be used. # @@ -1407,11 +1388,11 @@ if {[isReleaseAvailable $directory platform]} then { if {[string length $platform] == 0} then { set platform unknown } - if {$select && [matchPlatform $platform]} then { + if {$select && [matchMachine $platform]} then { set ::build_directory $directory tputs $channel [appendArgs "yes, selected (" $platform ")\n"] return true @@ -1430,11 +1411,11 @@ if {[isReleaseAvailable $path platform]} then { if {[string length $platform] == 0} then { set platform unknown } - if {$select && [matchPlatform $platform]} then { + if {$select && [matchMachine $platform]} then { set ::build_directory $path tputs $channel [appendArgs "yes, selected (" $platform ")\n"] return true @@ -1540,25 +1521,15 @@ if {[string length $sourceId] == 0} then { set sourceId null } # - # NOTE: Before actually adding the test constraint, make sure the - # version is valid (i.e. not just that we could query it). - # - if {$version ne "null"} then { - # - # NOTE: Yes, the SQLite interop assembly appears to be available. - # - addConstraint SQLiteInterop - - set answer yes - } else { - set answer no - } - - tputs $channel [appendArgs $answer " (" $version " " $sourceId ")\n"] + # NOTE: Yes, the SQLite interop assembly appears to be available. + # + addConstraint SQLiteInterop + + tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"] } else { tputs $channel no\n } } Index: readme.htm ================================================================== --- readme.htm +++ readme.htm @@ -3,11 +3,11 @@ ADO.NET SQLite Data Provider
-Version 1.0.98.0 - August 18, 2015
+Version 1.0.98.0 - August XX, 2015 (release scheduled)
Using SQLite 3.8.11.1
Originally written by Robert Simpson
Released to the public domain, use at your own risk!
Official provider website: https://system.data.sqlite.org/
Legacy versions: http://sqlite.phxsoftware.com/
@@ -207,22 +207,19 @@Version History
- 1.0.98.0 - August 18, 2015 + 1.0.98.0 - August XX, 2015 (release scheduled)
- Updated to SQLite 3.8.11.1.
- Add full support for Visual Studio 2015 and the .NET Framework 4.6. -
- Add support for creating custom SQL functions using delegates.
- Implement the Substring method for LINQ using the "substr" core SQL function. ** Potentially Incompatible Change ** -
- Prevent encrypted connections from being used with the connection pool. Pursuant to [89d3a159f1]. ** Potentially Incompatible Change **
- Honor the second argument to Math.Round when using LINQ. ** Potentially Incompatible Change **
- Honor the pre-existing flags for connections during the Open method. Fix for [964063da16]. ** Potentially Incompatible Change **
- Remove errant semi-colons from the SQL used by LINQ to INSERT and then SELECT rows with composite primary keys. Fix for [9d353b0bd8]. -
- Refactor INSERT/UPDATE handling (in the LINQ assembly) so it can handle composite and non-integer primary keys. Fix for [41aea496e0].
- Change the base type for the SQLiteConnectionFlags enumeration to long integer. ** Potentially Incompatible Change **
- Add extended return codes to the SQLiteErrorCode enumeration. Pursuant to [71bedaca19]. ** Potentially Incompatible Change **
- Improve exception handling in all native callbacks implemented in the SQLiteConnection class.
- Add Progress event and ProgressOps connection string property to enable raising progress events during long-running queries.
- Add "Recursive Triggers" connection string property to enable or disable the recursive trigger capability. Pursuant to [3a82ee635b]. Index: test/TestCases.cs ================================================================== --- test/TestCases.cs +++ test/TestCases.cs @@ -21,11 +21,11 @@ private const int ThreadTimeout = 60000; private List
- Open a normal command prompt window with "cmd.exe".
- Change the current directory to "<root>\Setup". +
-
+ Enter the following command to set the environment variable used to pass
+ the necessary extra arguments to MSBuild:
+
+
+ SET MSBUILD_ARGS=/property:UseInteropDll=false /property:UseSqliteStandard=true +
+
+
+
-
Enter the following command to build the managed-only binaries for Mono:
- build_mono.bat + SET NOUSER=1 +
+ build.bat ReleaseManagedOnly
-
Index: www/downloads.wiki
==================================================================
--- www/downloads.wiki
+++ www/downloads.wiki
@@ -441,20 +441,20 @@
- sqlite-netFx-source-1.0.98.0.zip + sqlite-netFx-source-1.0.97.0.zip
- (0.00 MiB) + (5.16 MiB)This ZIP archive contains all current source code for System.Data.SQLite - 1.0.98.0 (3.8.11.1) combined into a single archive file. + 1.0.97.0 (3.8.10.2) combined into a single archive file.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: a2b071b74a9b8aa4530340e4654e82d17d4aa681)@@ -464,19 +464,19 @@ - sqlite-netFx20-setup-bundle-x86-2005-1.0.98.0.exe + sqlite-netFx20-setup-bundle-x86-2005-1.0.97.0.exe
- (0.00 MiB) + (5.10 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2005 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 is included. The .NET Framework 2.0 SP2 is required.
This is the only setup package that is capable of installing the design-time components for Visual Studio 2005. @@ -485,30 +485,30 @@ However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: daa0f42621b93769755fb7a6546eddd3d56b8e72)- sqlite-netFx20-setup-x86-2005-1.0.98.0.exe + sqlite-netFx20-setup-x86-2005-1.0.97.0.exe
- (0.00 MiB) + (5.09 MiB)This setup package will install all the necessary runtime components and - dependencies for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2005 SP1 runtime for x86 is included. + dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 is included. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 7e9b562ffedefb316fdff45e18a0817fb47f8e84)@@ -518,42 +518,42 @@ - sqlite-netFx20-setup-bundle-x64-2005-1.0.98.0.exe + sqlite-netFx20-setup-bundle-x64-2005-1.0.97.0.exe
- (0.00 MiB) + (5.69 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2005 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 is included. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: fb3dfb4c0295c9a6939c392cf9381fefbeebfe7b)- sqlite-netFx20-setup-x64-2005-1.0.98.0.exe + sqlite-netFx20-setup-x64-2005-1.0.97.0.exe
- (0.00 MiB) + (5.69 MiB)This setup package will install all the necessary runtime components and - dependencies for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2005 SP1 runtime for x64 is included. + dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 is included. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 59195a366b7546c4a37a65475f8fa2d11c7ff517)@@ -563,19 +563,19 @@ - sqlite-netFx35-setup-bundle-x86-2008-1.0.98.0.exe + sqlite-netFx35-setup-bundle-x86-2008-1.0.97.0.exe
- (0.00 MiB) + (7.14 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2008 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 is included. The .NET Framework 3.5 SP1 is required.
This is the only setup package that is capable of installing the design-time components for Visual Studio 2008. @@ -584,30 +584,30 @@ However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 03d86dba982e89dadfd19fc9bce775dcab040632)- sqlite-netFx35-setup-x86-2008-1.0.98.0.exe + sqlite-netFx35-setup-x86-2008-1.0.97.0.exe
- (0.00 MiB) + (7.13 MiB)This setup package will install all the necessary runtime components and - dependencies for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2008 SP1 runtime for x86 is included. + dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 is included. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: b2a7403c7cbe50482972a05ec953f7414ae0ceb1)@@ -617,42 +617,42 @@ - sqlite-netFx35-setup-bundle-x64-2008-1.0.98.0.exe + sqlite-netFx35-setup-bundle-x64-2008-1.0.97.0.exe
- (0.00 MiB) + (7.88 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2008 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 is included. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: a3a72d1368876f23f033968ff382d9907b8ca8f0)- sqlite-netFx35-setup-x64-2008-1.0.98.0.exe + sqlite-netFx35-setup-x64-2008-1.0.97.0.exe
- (0.00 MiB) + (7.87 MiB)This setup package will install all the necessary runtime components and - dependencies for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2008 SP1 runtime for x64 is included. + dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 is included. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 041f8018ef021b9515bd7c58b9615f235ffb66cb)@@ -662,19 +662,19 @@ - sqlite-netFx40-setup-bundle-x86-2010-1.0.98.0.exe + sqlite-netFx40-setup-bundle-x86-2010-1.0.97.0.exe
- (0.00 MiB) + (12.71 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2010 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 is included. The .NET Framework 4.0 is required.
This is the only setup package that is capable of installing the design-time components for Visual Studio 2010.
@@ -682,30 +682,30 @@ However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 182ae1db5c4747a4d24a8498a0c8ab14dfea3a55)- sqlite-netFx40-setup-x86-2010-1.0.98.0.exe + sqlite-netFx40-setup-x86-2010-1.0.97.0.exe
- (0.00 MiB) + (12.70 MiB)This setup package will install all the necessary runtime components and - dependencies for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2010 SP1 runtime for x86 is included. + dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 is included. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 74b67854e77baf3d0a83fe48248b1043ecf47730)@@ -715,41 +715,41 @@ - sqlite-netFx40-setup-bundle-x64-2010-1.0.98.0.exe + sqlite-netFx40-setup-bundle-x64-2010-1.0.97.0.exe
- (0.00 MiB) + (13.96 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2010 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 950ed58e2d57c7cdf91b238270e900cdfded5b56)- sqlite-netFx40-setup-x64-2010-1.0.98.0.exe + sqlite-netFx40-setup-x64-2010-1.0.97.0.exe
- (0.00 MiB) + (13.95 MiB)This setup package will install all the necessary runtime components and - dependencies for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2010 SP1 runtime for x64 is included. + dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 58355a70f6394919420cea4aaed3399d18362741)@@ -759,19 +759,19 @@ - sqlite-netFx45-setup-bundle-x86-2012-1.0.98.0.exe + sqlite-netFx45-setup-bundle-x86-2012-1.0.97.0.exe
- (0.00 MiB) + (10.14 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2012 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 is included. The .NET Framework 4.5 is required.
This is the only setup package that is capable of installing the design-time components for Visual Studio 2012. @@ -786,30 +786,30 @@ installing the Visual Studio 2012 "flavor" of the Entity Framework 6 Tools for Visual Studio 2012 & 2013.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: ff9df099dce5e3f0d478e33f587a2866cae9c8ab)- sqlite-netFx45-setup-x86-2012-1.0.98.0.exe + sqlite-netFx45-setup-x86-2012-1.0.97.0.exe
- (0.00 MiB) + (10.17 MiB)This setup package will install all the necessary runtime components and - dependencies for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2012 Update 4 runtime for x86 is + dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 is included. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: be380d4cfee55b375730ca83796ec536d8d7b86e)@@ -819,42 +819,42 @@ - sqlite-netFx45-setup-bundle-x64-2012-1.0.98.0.exe + sqlite-netFx45-setup-bundle-x64-2012-1.0.97.0.exe
- (0.00 MiB) + (10.79 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2012 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 is included. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: e7297d72638d5b4feaefb61ef600b4f40e226402)- sqlite-netFx45-setup-x64-2012-1.0.98.0.exe + sqlite-netFx45-setup-x64-2012-1.0.97.0.exe
- (0.00 MiB) + (10.84 MiB)This setup package will install all the necessary runtime components and - dependencies for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2012 Update 4 runtime for x64 is + dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 is included. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: edc0c92ed77d50b66ec27bdd38570cee9aaac754)@@ -864,19 +864,19 @@ - sqlite-netFx451-setup-bundle-x86-2013-1.0.98.0.exe + sqlite-netFx451-setup-bundle-x86-2013-1.0.97.0.exe
- (0.00 MiB) + (10.09 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2013 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x86 is included. The .NET Framework 4.5.1 is required.
This is the only setup package that is capable of installing the design-time components for Visual Studio 2013. @@ -891,30 +891,30 @@ installing the Visual Studio 2013 "flavor" of the Entity Framework 6 Tools for Visual Studio 2012 & 2013.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 15e31d48589c72d17e2269f72110c7e7a32cb6e3)- sqlite-netFx451-setup-x86-2013-1.0.98.0.exe + sqlite-netFx451-setup-x86-2013-1.0.97.0.exe
- (0.00 MiB) + (10.12 MiB)This setup package will install all the necessary runtime components and - dependencies for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2013 Update 2 runtime for x86 is + dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x86 is included. The .NET Framework 4.5.1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 3071f6d4b93f52fea67f07409c5e13ea8f8d60ee)@@ -924,147 +924,42 @@ - sqlite-netFx451-setup-bundle-x64-2013-1.0.98.0.exe + sqlite-netFx451-setup-bundle-x64-2013-1.0.97.0.exe
- (0.00 MiB) + (10.78 MiB)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.98.0 (3.8.11.1) package. The Visual C++ 2013 + the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x64 is included. The .NET Framework 4.5.1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 189a1279186423099603833c974f0c074098283f)- sqlite-netFx451-setup-x64-2013-1.0.98.0.exe - -
- (0.00 MiB) -- - This setup package will install all the necessary runtime components and - dependencies for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2013 Update 2 runtime for x64 is - included. The .NET Framework 4.5.1 is required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- Setups for 32-bit Windows (.NET Framework 4.6) - -- - -- - sqlite-netFx46-setup-bundle-x86-2015-1.0.98.0.exe - -
- (0.00 MiB) -- - 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.98.0 (3.8.11.1) package. The Visual C++ 2015 - RTM runtime for x86 is included. The .NET Framework 4.6 is - required. - -
- This is the only setup package that is capable of installing the - design-time components for Visual Studio 2015. -
-
- However, if you do not require the design-time components, please - consider downloading the associated "Precompiled Binaries" - instead. -
-
- Using Entity Framework 6 design-time support may require - installing the Visual Studio 2015 "flavor" of the - - Entity Framework 6 Tools for Visual Studio 2012 & 2015. -
-
- (sha1: 0000000000000000000000000000000000000000) -- - -- - sqlite-netFx46-setup-x86-2015-1.0.98.0.exe - -
- (0.00 MiB) -- - This setup package will install all the necessary runtime components and - dependencies for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2015 RTM runtime for x86 is - included. The .NET Framework 4.6 is required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- Setups for 64-bit Windows (.NET Framework 4.6) - -- - -- - sqlite-netFx46-setup-bundle-x64-2015-1.0.98.0.exe - -
- (0.00 MiB) -- - 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.98.0 (3.8.11.1) package. The Visual C++ 2015 - RTM runtime for x64 is included. The .NET Framework 4.6 is - required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - - sqlite-netFx46-setup-x64-2015-1.0.98.0.exe - -
- (0.00 MiB) -- - This setup package will install all the necessary runtime components and - dependencies for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2015 RTM runtime for x64 is - included. The .NET Framework 4.6 is required. - +
- (sha1: 0000000000000000000000000000000000000000) + sqlite-netFx451-setup-x64-2013-1.0.97.0.exe +
+ (10.83 MiB) ++ + This setup package will install all the necessary runtime components and + dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x64 is + included. The .NET Framework 4.5.1 is required. +
+ (sha1: ac38374fe3abaac5487081aa7c120a8a04dc84de)@@ -1074,40 +969,40 @@ - sqlite-netFx20-binary-bundle-Win32-2005-1.0.98.0.zip + sqlite-netFx20-binary-bundle-Win32-2005-1.0.97.0.zip
- (0.00 MiB) + (1.50 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2005 SP1 runtime for x86 and the .NET + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 and the .NET Framework 2.0 SP2 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: cc734b0a7054a9a982667faaf6faf86c94f37b6f)- sqlite-netFx20-binary-Win32-2005-1.0.98.0.zip + sqlite-netFx20-binary-Win32-2005-1.0.97.0.zip
- (0.00 MiB) + (1.49 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2005 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 and the .NET Framework 2.0 SP2 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 72574347632bf2aada0703142ccaac197135c1cc)@@ -1117,40 +1012,40 @@ - sqlite-netFx20-binary-bundle-x64-2005-1.0.98.0.zip + sqlite-netFx20-binary-bundle-x64-2005-1.0.97.0.zip
- (0.00 MiB) + (1.71 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2005 SP1 runtime for x64 and the .NET + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 and the .NET Framework 2.0 SP2 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 3214c23872b129b3d1d955708f5e755b73635cc8)- sqlite-netFx20-binary-x64-2005-1.0.98.0.zip + sqlite-netFx20-binary-x64-2005-1.0.97.0.zip
- (0.00 MiB) + (1.70 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2005 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 and the .NET Framework 2.0 SP2 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 3c56ff6cc15dd0c0f2883fade40a0a352c205c87)@@ -1160,40 +1055,40 @@ - sqlite-netFx35-binary-bundle-Win32-2008-1.0.98.0.zip + sqlite-netFx35-binary-bundle-Win32-2008-1.0.97.0.zip
- (0.00 MiB) + (1.95 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework 3.5 SP1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 68557106ccf5966c1b273e5d52e44203d0704d6e)- sqlite-netFx35-binary-Win32-2008-1.0.98.0.zip + sqlite-netFx35-binary-Win32-2008-1.0.97.0.zip
- (0.00 MiB) + (1.94 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2008 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework 3.5 SP1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 3b8e7799d1463458fa0dcf8ca35b28b57d30da9e)@@ -1203,40 +1098,40 @@ - sqlite-netFx35-binary-bundle-x64-2008-1.0.98.0.zip + sqlite-netFx35-binary-bundle-x64-2008-1.0.97.0.zip
- (0.00 MiB) + (2.03 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET Framework 3.5 SP1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 8b3197f83606afe6cc288da72a69310d5f797362)- sqlite-netFx35-binary-x64-2008-1.0.98.0.zip + sqlite-netFx35-binary-x64-2008-1.0.97.0.zip
- (0.00 MiB) + (2.02 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2008 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET Framework 3.5 SP1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: e30e32261f5003ca588eaaea789a0a49e0b20a08)@@ -1246,40 +1141,40 @@ - sqlite-netFx40-binary-bundle-Win32-2010-1.0.98.0.zip + sqlite-netFx40-binary-bundle-Win32-2010-1.0.97.0.zip
- (0.00 MiB) + (2.17 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: a6c4403b321b8bf64e4f6c629e1734564fc68646)- sqlite-netFx40-binary-Win32-2010-1.0.98.0.zip + sqlite-netFx40-binary-Win32-2010-1.0.97.0.zip
- (0.00 MiB) + (2.16 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2010 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: b1cd74abb20dd6f724cb25d34fab302c981fc46a)@@ -1289,40 +1184,40 @@ - sqlite-netFx40-binary-bundle-x64-2010-1.0.98.0.zip + sqlite-netFx40-binary-bundle-x64-2010-1.0.97.0.zip
- (0.00 MiB) + (2.19 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET Framework 4.0 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 65d4f10bcdf5ce4bf6831de50740c174f879cb64)- sqlite-netFx40-binary-x64-2010-1.0.98.0.zip + sqlite-netFx40-binary-x64-2010-1.0.97.0.zip
- (0.00 MiB) + (2.18 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2010 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET Framework 4.0 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: d3de79ff9101c370def18a69f2cd0902ccbcaef3)@@ -1332,40 +1227,40 @@ - sqlite-netFx45-binary-bundle-Win32-2012-1.0.98.0.zip + sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip
- (0.00 MiB) + (2.08 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2012 Update 4 runtime for x86 and + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 and the .NET Framework 4.5 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 1adff0b8f1c8c855f047972ca7be1a6ea99eee5c)- sqlite-netFx45-binary-Win32-2012-1.0.98.0.zip + sqlite-netFx45-binary-Win32-2012-1.0.97.0.zip
- (0.00 MiB) + (2.13 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2012 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 and the .NET Framework 4.5 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 7702faa724ec29a627ddea3cae5a69bd915320e2)@@ -1375,40 +1270,40 @@ - sqlite-netFx45-binary-bundle-x64-2012-1.0.98.0.zip + sqlite-netFx45-binary-bundle-x64-2012-1.0.97.0.zip
- (0.00 MiB) + (2.11 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2012 Update 4 runtime for x64 and + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 and the .NET Framework 4.5 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: e3d1c61f1d960b8535577fc62ebad8651cf39cc6)- sqlite-netFx45-binary-x64-2012-1.0.98.0.zip + sqlite-netFx45-binary-x64-2012-1.0.97.0.zip
- (0.00 MiB) + (2.19 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2012 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 and the .NET Framework 4.5 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: a4959439e8caec0a886c7a2758c336f3927df9a2)@@ -1418,40 +1313,40 @@ - sqlite-netFx451-binary-bundle-Win32-2013-1.0.98.0.zip + sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip
- (0.00 MiB) + (2.09 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2013 Update 2 runtime for x86 and the + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x86 and the .NET Framework 4.5.1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 1969fdc760e2b35633b9c5f33df17a7d9a37c656)- sqlite-netFx451-binary-Win32-2013-1.0.98.0.zip + sqlite-netFx451-binary-Win32-2013-1.0.97.0.zip
- (0.00 MiB) + (2.14 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2013 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x86 and the .NET Framework 4.5.1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: cc50caf9a77fe4559d58823849d953d8178603e9)@@ -1461,126 +1356,40 @@ - sqlite-netFx451-binary-bundle-x64-2013-1.0.98.0.zip + sqlite-netFx451-binary-bundle-x64-2013-1.0.97.0.zip
- (0.00 MiB) + (2.12 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2013 Update 2 runtime for x64 and the + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x64 and the .NET Framework 4.5.1 are required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: c945cd9013326d90dcb1b7473088b2d3b4a95d47)- sqlite-netFx451-binary-x64-2013-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2013 - Update 2 runtime for x64 and the .NET Framework 4.5.1 are required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- Precompiled Binaries for 32-bit Windows (.NET Framework 4.6) - -- - -- - sqlite-netFx46-binary-bundle-Win32-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2015 RTM runtime for x86 and the - .NET Framework 4.6 are required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- - sqlite-netFx46-binary-Win32-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2015 - RTM runtime for x86 and the .NET Framework 4.6 are required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- Precompiled Binaries for 64-bit Windows (.NET Framework 4.6) - -- - -- - sqlite-netFx46-binary-bundle-x64-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2015 RTM runtime for x64 and the - .NET Framework 4.6 are required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - - sqlite-netFx46-binary-x64-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2015 - RTM runtime for x64 and the .NET Framework 4.6 are required. - +
- (sha1: 0000000000000000000000000000000000000000) + sqlite-netFx451-binary-x64-2013-1.0.97.0.zip +
+ (2.19 MiB) ++ + This binary package contains all the binaries for the x64 version of the + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2013 + Update 2 runtime for x64 and the .NET Framework 4.5.1 are required. +
+ (sha1: 6faf09655f805ba76ab0909ad0d4acf2b1a23712)@@ -1590,41 +1399,41 @@ - sqlite-netFx20-static-binary-bundle-Win32-2005-1.0.98.0.zip + sqlite-netFx20-static-binary-bundle-Win32-2005-1.0.97.0.zip
- (0.00 MiB) + (1.71 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2005 SP1 runtime for x86 is statically + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 is statically linked. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 25577f16a03b9cebdf87de65590c8dcb10ec39c8)- sqlite-netFx20-static-binary-Win32-2005-1.0.98.0.zip + sqlite-netFx20-static-binary-Win32-2005-1.0.97.0.zip
- (0.00 MiB) + (1.70 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2005 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 is statically linked. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 6a53f04340d0f577c0902087f9ae14c953331272)@@ -1634,41 +1443,41 @@ - sqlite-netFx20-static-binary-bundle-x64-2005-1.0.98.0.zip + sqlite-netFx20-static-binary-bundle-x64-2005-1.0.97.0.zip
- (0.00 MiB) + (1.87 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2005 SP1 runtime for x64 is statically + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 is statically linked. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 1f15cd9479633f7698213f33280353a508674087)- sqlite-netFx20-static-binary-x64-2005-1.0.98.0.zip + sqlite-netFx20-static-binary-x64-2005-1.0.97.0.zip
- (0.00 MiB) + (1.86 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2005 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 is statically linked. The .NET Framework 2.0 SP2 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 712ae5e5d34b3eddd17b20d25ebe0764ea710272)@@ -1678,41 +1487,41 @@ - sqlite-netFx35-static-binary-bundle-Win32-2008-1.0.98.0.zip + sqlite-netFx35-static-binary-bundle-Win32-2008-1.0.97.0.zip
- (0.00 MiB) + (2.16 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2008 SP1 runtime for x86 is statically + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 is statically linked. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: b307177dde284527d6daf8d7625376ee3db35d76)- sqlite-netFx35-static-binary-Win32-2008-1.0.98.0.zip + sqlite-netFx35-static-binary-Win32-2008-1.0.97.0.zip
- (0.00 MiB) + (2.16 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2008 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 is statically linked. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: b5a820573ede8ee2d39e7539349e972d973eb32f)@@ -1722,41 +1531,41 @@ - sqlite-netFx35-static-binary-bundle-x64-2008-1.0.98.0.zip + sqlite-netFx35-static-binary-bundle-x64-2008-1.0.97.0.zip
- (0.00 MiB) + (2.20 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2008 SP1 runtime for x64 is statically + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 is statically linked. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: bbad7b401adc4ca39d11ddb994272fa4fa34d563)- sqlite-netFx35-static-binary-x64-2008-1.0.98.0.zip + sqlite-netFx35-static-binary-x64-2008-1.0.97.0.zip
- (0.00 MiB) + (2.20 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2008 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 is statically linked. The .NET Framework 3.5 SP1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 1f1ad2fedbcb24a31ccd786282e2cec738e03064)@@ -1766,41 +1575,41 @@ - sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.98.0.zip + sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.97.0.zip
- (0.00 MiB) + (2.38 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2010 SP1 runtime for x86 is statically + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 is statically linked. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: ddd78662fef2e9e9718bfcbd54c3a50b6668f5b7)- sqlite-netFx40-static-binary-Win32-2010-1.0.98.0.zip + sqlite-netFx40-static-binary-Win32-2010-1.0.97.0.zip
- (0.00 MiB) + (2.38 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2010 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 is statically linked. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 4bc249674a5fa43372e7a4dfcf025eafee1436a4)@@ -1810,41 +1619,41 @@ - sqlite-netFx40-static-binary-bundle-x64-2010-1.0.98.0.zip + sqlite-netFx40-static-binary-bundle-x64-2010-1.0.97.0.zip
- (0.00 MiB) + (2.38 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2010 SP1 runtime for x64 is statically + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 is statically linked. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 5dc31fa8bb58e25196654407d877c26ef841c468)- sqlite-netFx40-static-binary-x64-2010-1.0.98.0.zip + sqlite-netFx40-static-binary-x64-2010-1.0.97.0.zip
- (0.00 MiB) + (2.38 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2010 SP1 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 is statically linked. The .NET Framework 4.0 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 7b07e8e6015a4d455cb8fd832b19c453972092c4)@@ -1854,41 +1663,41 @@ - sqlite-netFx45-static-binary-bundle-Win32-2012-1.0.98.0.zip + sqlite-netFx45-static-binary-bundle-Win32-2012-1.0.97.0.zip
- (0.00 MiB) + (2.41 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2012 Update 4 runtime for x86 is + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 is statically linked. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 241f027ddb2f5496f98ffea9d9abb6158b6dd97b)- sqlite-netFx45-static-binary-Win32-2012-1.0.98.0.zip + sqlite-netFx45-static-binary-Win32-2012-1.0.97.0.zip
- (0.00 MiB) + (2.46 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2012 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 is statically linked. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: a0474dde94bcea51de93f1d944df44a728326f40)@@ -1898,41 +1707,41 @@ - sqlite-netFx45-static-binary-bundle-x64-2012-1.0.98.0.zip + sqlite-netFx45-static-binary-bundle-x64-2012-1.0.97.0.zip
- (0.00 MiB) + (2.37 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2012 Update 4 runtime for x64 is + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 is statically linked. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 8c2a819f4cb4ec30a8aa7559a4ec4fe86960f9ff)- sqlite-netFx45-static-binary-x64-2012-1.0.98.0.zip + sqlite-netFx45-static-binary-x64-2012-1.0.97.0.zip
- (0.00 MiB) + (2.45 MiB)This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2012 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 is statically linked. The .NET Framework 4.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 8e1505424513e9d3721172c582e3a8e900d88aab)@@ -1942,41 +1751,41 @@ - sqlite-netFx451-static-binary-bundle-Win32-2013-1.0.98.0.zip + sqlite-netFx451-static-binary-bundle-Win32-2013-1.0.97.0.zip
- (0.00 MiB) + (2.44 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2013 Update 2 runtime for x86 is + the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x86 is statically linked. The .NET Framework 4.5.1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: c71a13e48be86edd5679fcda601991d97ddbf5d7)- sqlite-netFx451-static-binary-Win32-2013-1.0.98.0.zip + sqlite-netFx451-static-binary-Win32-2013-1.0.97.0.zip
- (0.00 MiB) + (2.49 MiB)This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2013 + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x86 is statically linked. The .NET Framework 4.5.1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 62bad2092267770842b0da94e56d54bb21e14371)@@ -1986,129 +1795,41 @@ - sqlite-netFx451-static-binary-bundle-x64-2013-1.0.98.0.zip + sqlite-netFx451-static-binary-bundle-x64-2013-1.0.97.0.zip
- (0.00 MiB) + (2.42 MiB)This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2013 Update 2 runtime for x64 is + the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 + (3.8.10.2) package. The Visual C++ 2013 Update 2 runtime for x64 is statically linked. The .NET Framework 4.5.1 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 7884b038ffe7c913f31104cdca418c2b96eedfde)- sqlite-netFx451-static-binary-x64-2013-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2013 - Update 2 runtime for x64 is statically linked. The .NET Framework 4.5.1 - is required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.6) - -- - -- - sqlite-netFx46-static-binary-bundle-Win32-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package features the mixed-mode assembly and contains all - the binaries for the x86 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2015 RTM runtime for x86 is - statically linked. The .NET Framework 4.6 is required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- - sqlite-netFx46-static-binary-Win32-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package contains all the binaries for the x86 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2015 - RTM runtime for x86 is statically linked. The .NET Framework 4.6 - is required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - -- Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.6) - -- - -- - sqlite-netFx46-static-binary-bundle-x64-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package features the mixed-mode assembly and contains all - the binaries for the x64 version of the System.Data.SQLite 1.0.98.0 - (3.8.11.1) package. The Visual C++ 2015 RTM runtime for x64 is - statically linked. The .NET Framework 4.6 is required. - -
- (sha1: 0000000000000000000000000000000000000000) -- - - sqlite-netFx46-static-binary-x64-2015-1.0.98.0.zip - -
- (0.00 MiB) -- - This binary package contains all the binaries for the x64 version of the - System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The Visual C++ 2015 - RTM runtime for x64 is statically linked. The .NET Framework 4.6 - is required. - +
- (sha1: 0000000000000000000000000000000000000000) + sqlite-netFx451-static-binary-x64-2013-1.0.97.0.zip +
+ (2.49 MiB) ++ + This binary package contains all the binaries for the x64 version of the + System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2013 + Update 2 runtime for x64 is statically linked. The .NET Framework 4.5.1 + is required. +
+ (sha1: 0640bb7f4013b5276b5c78a34c90dee82ca9af1d)@@ -2118,59 +1839,59 @@ - sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.98.0.zip + sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.97.0.zip
- (0.00 MiB) + (1.10 MiB)This binary package contains all the binaries for the PocketPC version - of the System.Data.SQLite 1.0.98.0 (3.8.11.1) package. The included native + of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The included native binaries should work on all supported ARM versions of Windows CE prior to Windows Embedded Compact 2013. The .NET Compact Framework 3.5 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 9e51df082ed93ee0379b0ba656d8d3a0698690bc)- sqlite-netFx39-binary-WinCE-ARM-2012-1.0.98.0.zip + sqlite-netFx39-binary-WinCE-ARM-2012-1.0.97.0.zip
- (0.00 MiB) + (1.22 MiB)This binary package contains all the binaries for the Windows Embedded - Compact 2013 (ARM) version of the System.Data.SQLite 1.0.98.0 (3.8.11.1) + Compact 2013 (ARM) version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The .NET Compact Framework 3.9 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: f5f0c1480a39eee937b6aaab72e527275dd7c70b)- sqlite-netFx39-binary-WinCE-x86-2012-1.0.98.0.zip + sqlite-netFx39-binary-WinCE-x86-2012-1.0.97.0.zip
- (0.00 MiB) + (1.26 MiB)This binary package contains all the binaries for the Windows Embedded - Compact 2013 (x86) version of the System.Data.SQLite 1.0.98.0 (3.8.11.1) + Compact 2013 (x86) version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The .NET Compact Framework 3.9 is required.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 32c32545e144cbab0ee159559bf63c4641c378e8)@@ -2191,21 +1912,21 @@ - System.Data.SQLite.1.0.98.0.nupkg + System.Data.SQLite.1.0.97.0.nupkg
(0.00 MiB)This NuGet package includes all the binaries for both the x86 and x64 - versions of System.Data.SQLite 1.0.98.0 (3.8.11.1). The .NET Framework - 3.5 SP1, 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is required. For the included - native binaries, the version of the Visual C++ runtime corresponding to - the .NET Framework used by the associated managed assembly is statically + versions of System.Data.SQLite 1.0.97.0 (3.8.10.2). The .NET Framework + 3.5 SP1, 4.0, 4.5, or 4.5.1 is required. For the included native + binaries, the version of the Visual C++ runtime corresponding to the + .NET Framework used by the associated managed assembly is statically linked.
This package depends on the "EntityFramework" package.
@@ -2215,49 +1936,48 @@ depend on the "System.Data.SQLite.Core", "System.Data.SQLite.Linq", and "System.Data.SQLite.EF6" packages.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: e7399030d60d82c3f49ce891cc0015225709fd9e)- System.Data.SQLite.Core.1.0.98.0.nupkg + System.Data.SQLite.Core.1.0.97.0.nupkg
- (0.00 MiB) + (5.07 MiB)This NuGet package contains all the binaries for both the x86 and x64 - versions of System.Data.SQLite 1.0.98.0 (3.8.11.1), except those + versions of System.Data.SQLite 1.0.97.0 (3.8.10.2), except those needed to support LINQ and Entity Framework 6. The .NET - Framework 3.5 SP1, 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is required. For the - included native binaries, the version of the Visual C++ runtime - corresponding to the .NET Framework used by the associated managed - assembly is statically linked. + Framework 3.5 SP1, 4.0, 4.5, or 4.5.1 is required. For the included + native binaries, the version of the Visual C++ runtime corresponding to + the .NET Framework used by the associated managed assembly is statically + linked.
This package does not depend on any other package.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 1f6b891b926d10dc9644dbca1e03d7b65a156ff8)- System.Data.SQLite.Core.MSIL.1.0.98.0.nupkg + System.Data.SQLite.Core.MSIL.1.0.97.0.nupkg
- (0.00 MiB) + (0.70 MiB)This NuGet package contains the managed binaries for System.Data.SQLite - 1.0.98.0. The .NET Framework 3.5 SP1, 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is - required. + 1.0.97.0. The .NET Framework 3.5 SP1, 4.0, 4.5, or 4.5.1 is required.
This package does not depend on any other package.
This NuGet package does not include any code from the native @@ -2265,65 +1985,64 @@ assembly "SQLite.Interop.dll" compiled for the processor architecture of the host process being present in a directory in the native library search path.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 8d34b6d6966b00e9c0f9d7ab5f431db58fe0bc09)- System.Data.SQLite.EF6.1.0.98.0.nupkg + System.Data.SQLite.EF6.1.0.97.0.nupkg
- (0.00 MiB) + (0.14 MiB)This NuGet package contains just the binaries to support Entity - Framework 6 using System.Data.SQLite 1.0.98.0 (3.8.11.1). The .NET - Framework 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is required. + Framework 6 using System.Data.SQLite 1.0.97.0 (3.8.10.2). The .NET + Framework 4.0, 4.5, or 4.5.1 is required.
This package depends on the "EntityFramework" package.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 3af8ed2aa3826aa2bbd00ad1fb84cf09447e6300)- System.Data.SQLite.Linq.1.0.98.0.nupkg + System.Data.SQLite.Linq.1.0.97.0.nupkg
- (0.00 MiB) + (0.18 MiB)This NuGet package contains just the binaries to support LINQ using - System.Data.SQLite 1.0.98.0 (3.8.11.1). The .NET Framework 3.5 SP1, 4.0, - 4.5, 4.5.1, 4.5.2, or 4.6 is required. + System.Data.SQLite 1.0.97.0 (3.8.10.2). The .NET Framework 3.5 SP1, 4.0, + 4.5, or 4.5.1 is required.
This package does not depend on any other package.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 5e2ebc5a5a6dc28e8ef41a4583ecd2ad55a39463)- System.Data.SQLite.MSIL.1.0.98.0.nupkg + System.Data.SQLite.MSIL.1.0.97.0.nupkg
(0.00 MiB)This NuGet package contains the managed binaries for System.Data.SQLite - 1.0.98.0. The .NET Framework 3.5 SP1, 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is - required. + 1.0.97.0. The .NET Framework 3.5 SP1, 4.0, 4.5, or 4.5.1 is required.
This is a legacy package; if possible, please use either the "System.Data.SQLite" or "System.Data.SQLite.Core" package instead.
@@ -2340,59 +2059,57 @@ depend on the "System.Data.SQLite.Core.MSIL", "System.Data.SQLite.Linq", and "System.Data.SQLite.EF6" packages.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: eed15134efd238186fd1be88dde7f19892fceb04)- System.Data.SQLite.x86.1.0.98.0.nupkg + System.Data.SQLite.x86.1.0.97.0.nupkg
- (0.00 MiB) + (2.61 MiB)This NuGet package contains all the binaries for the x86 version of - System.Data.SQLite 1.0.98.0 (3.8.11.1). The .NET Framework 3.5 SP1, - 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is required. For the included native - binaries, the version of the Visual C++ runtime corresponding to the - .NET Framework used by the associated managed assembly is statically - linked. + System.Data.SQLite 1.0.97.0 (3.8.10.2). The .NET Framework 3.5 SP1, + 4.0, 4.5, or 4.5.1 is required. For the included native binaries, the + version of the Visual C++ runtime corresponding to the .NET Framework + used by the associated managed assembly is statically linked.
This is a legacy package; if possible, please use either the "System.Data.SQLite" or "System.Data.SQLite.Core" package instead.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 9924cf29aeb6fbfbe7a4b085295d55fc19817d76)- System.Data.SQLite.x64.1.0.98.0.nupkg + System.Data.SQLite.x64.1.0.97.0.nupkg
- (0.00 MiB) + (2.90 MiB)This NuGet package contains all the binaries for the x64 version of - System.Data.SQLite 1.0.98.0 (3.8.11.1). The .NET Framework 3.5 SP1, - 4.0, 4.5, 4.5.1, 4.5.2, or 4.6 is required. For the included native - binaries, the version of the Visual C++ runtime corresponding to the - .NET Framework used by the associated managed assembly is statically - linked. + System.Data.SQLite 1.0.97.0 (3.8.10.2). The .NET Framework 3.5 SP1, + 4.0, 4.5, or 4.5.1 is required. For the included native binaries, the + version of the Visual C++ runtime corresponding to the .NET Framework + used by the associated managed assembly is statically linked.
This is a legacy package; if possible, please use either the "System.Data.SQLite" or "System.Data.SQLite.Core" package instead.
- (sha1: 0000000000000000000000000000000000000000) + (sha1: 104d28413d2798d670c2d450db8d2016171dcad3)@@ -2453,11 +2170,11 @@ Templates (10) and (11) are used for the official NuGet packages. The framework in templates (3), (4), (5), (6), (7), and (8) will be - one of netFx20, netFx35, netFx40, netFx45, netFx451, netFx46. + one of netFx20, netFx35, netFx40, netFx45, netFx451.
The cpu in templates (3) and (4) will be one of x86, x64, arm, ia64.
@@ -2467,11 +2184,11 @@ Win32, x64, PocketPC, PocketPC-ARM, PocketPC-x86, WinCE-ARM, WinCE-x86.The year in templates (3), (4), (5), (6), (7), and (8) will be one of - 2005, 2008, 2010, 2012, 2013, 2015. + 2005, 2008, 2010, 2012, 2013.
The version in templates (1), (2), (3), (4), (5), (6), (7), and (8) is the dot-delimited version number of the primary System.Data.SQLite Index: www/news.wiki ================================================================== --- www/news.wiki +++ www/news.wiki @@ -1,22 +1,19 @@
News Version History- 1.0.98.0 - August 18, 2015 + 1.0.98.0 - August XX, 2015 (release scheduled)
- Updated to [https://www.sqlite.org/releaselog/3_8_11_1.html|SQLite 3.8.11.1].
- Add full support for Visual Studio 2015 and the .NET Framework 4.6. -
- Add support for creating custom SQL functions using delegates.
- Implement the Substring method for LINQ using the "substr" core SQL function. ** Potentially Incompatible Change ** -
- Prevent encrypted connections from being used with the connection pool. Pursuant to [89d3a159f1]. ** Potentially Incompatible Change **
- Honor the second argument to Math.Round when using LINQ. ** Potentially Incompatible Change **
- Honor the pre-existing flags for connections during the Open method. Fix for [964063da16]. ** Potentially Incompatible Change **
- Remove errant semi-colons from the SQL used by LINQ to INSERT and then SELECT rows with composite primary keys. Fix for [9d353b0bd8]. -
- Refactor INSERT/UPDATE handling (in the LINQ assembly) so it can handle composite and non-integer primary keys. Fix for [41aea496e0].
- Change the base type for the SQLiteConnectionFlags enumeration to long integer. ** Potentially Incompatible Change **
- Add extended return codes to the SQLiteErrorCode enumeration. Pursuant to [71bedaca19]. ** Potentially Incompatible Change **
- Improve exception handling in all native callbacks implemented in the SQLiteConnection class.
- Add Progress event and ProgressOps connection string property to enable raising progress events during long-running queries.
- Add "Recursive Triggers" connection string property to enable or disable the recursive trigger capability. Pursuant to [3a82ee635b].
droptables = new List (); private List maydroptable = new List (); -#if !USE_INTEROP_DLL || !INTEROP_LOG +#if !INTEROP_LOG private long logevents = 0; #endif internal TestCases() { @@ -1638,11 +1638,11 @@ cnn.Close(); } } -#if !USE_INTEROP_DLL || !INTEROP_LOG +#if !INTEROP_LOG //Logging EventHandler public void OnLogEvent(object sender, LogEventArgs logEvent) { object errorCode = logEvent.ErrorCode; string err_msg = logEvent.Message; Index: testce/TestCases.cs ================================================================== --- testce/TestCases.cs +++ testce/TestCases.cs @@ -290,15 +290,13 @@ total++; try { Int64Properties(cnn); frm.WriteLine("SUCCESS - Int64Properties"); passed++; } catch (Exception) { frm.WriteLine("FAIL - Int64Properties"); failed++; } -#if INTEROP_VIRTUAL_TABLE total++; try { ManagedVirtualTable(cnn); frm.WriteLine("SUCCESS - ManagedVirtualTable"); passed++; } catch (Exception) { frm.WriteLine("FAIL - ManagedVirtualTable"); failed++; } -#endif total++; try { MultipleThreadStress(cnn); frm.WriteLine("SUCCESS - MultipleThreadStress"); passed++; } catch (Exception) { frm.WriteLine("FAIL - MultipleThreadStress"); failed++; } @@ -1039,11 +1037,10 @@ } throw new NotSupportedException("not a SQLite connection"); } -#if INTEROP_VIRTUAL_TABLE // Make sure that managed virtual table support works on the .NET Compact Framework. internal void ManagedVirtualTable(DbConnection cnn) { SQLiteConnection cnn2 = cnn as SQLiteConnection; @@ -1100,11 +1097,10 @@ return; } throw new NotSupportedException("not a SQLite connection"); } -#endif private int nextId = 0; private const int MAX_THREADS = 3; private const int MAX_ITERATIONS = 100; private ManualResetEvent goEvent = new ManualResetEvent(false); Index: testce/testce.2005.csproj ================================================================== --- testce/testce.2005.csproj +++ testce/testce.2005.csproj @@ -103,11 +103,10 @@ {AC139951-261A-4463-B6FA-AEBC25283A66} System.Data.SQLite.Compact.2005 Index: testce/testce.2008.csproj ================================================================== --- testce/testce.2008.csproj +++ testce/testce.2008.csproj @@ -104,11 +104,10 @@ {AC139951-261A-4463-B6FA-AEBC25283A66} System.Data.SQLite.Compact.2008 Index: testce/testce.2012.csproj ================================================================== --- testce/testce.2012.csproj +++ testce/testce.2012.csproj @@ -88,11 +88,10 @@ {AC139951-261A-4463-B6FA-AEBC25283A66} System.Data.SQLite.Compact.2012 Index: testlinq/Program.cs ================================================================== --- testlinq/Program.cs +++ testlinq/Program.cs @@ -4,12 +4,10 @@ * * Released to the public domain, use at your own risk! ********************************************************/ using System; -using System.Collections.Generic; -using System.Data; using System.Data.Common; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; @@ -94,16 +92,14 @@ } case "substring": { return SubStringTest(); } -#if USE_INTEROP_DLL && INTEROP_EXTENSION_FUNCTIONS case "unionall": { return UnionAllTest(); } -#endif case "endswith": { string value = null; if (args.Length > 1) @@ -198,14 +194,10 @@ case "round": { return RoundTest(); } #endif - case "complexprimarykey": - { - return ComplexPrimaryKeyTest(); - } default: { Console.WriteLine("unknown test \"{0}\"", arg); return 1; } @@ -374,11 +366,10 @@ } return 0; } -#if USE_INTEROP_DLL && INTEROP_EXTENSION_FUNCTIONS // // NOTE: Used to test the fix for ticket [0a32885109]. // private static int UnionAllTest() { @@ -445,11 +436,10 @@ } } return 0; } -#endif // // NOTE: Used to test the fix for ticket [ccfa69fc32]. // private static int EFTransactionTest(bool add) @@ -567,14 +557,16 @@ // the SQL statement after the actual INSERT statement in // the follow-up SELECT statement). // private static int InsertTest() { + long[] orderIds = new long[] { + 0 + }; + using (northwindEFEntities db = new northwindEFEntities()) { - long orderId = 10248; - long productId = 1; int[] counts = { 0 }; // // NOTE: *REQUIRED* This is required so that the // Entity Framework is prevented from opening @@ -583,34 +575,18 @@ // IMMEDIATE transactions, thereby failing [later // on] with locking errors). // db.Connection.Open(); - KeyValuePair orderIdPair = - new KeyValuePair ("OrderID", orderId); - - KeyValuePair productIdPair = - new KeyValuePair ("ProductID", productId); - - ///////////////////////////////////////////////////////////////// - OrderDetails newOrderDetails = new OrderDetails(); - newOrderDetails.OrderID = orderId; - newOrderDetails.ProductID = productId; + newOrderDetails.OrderID = 10248; + newOrderDetails.ProductID = 1; newOrderDetails.UnitPrice = (decimal)1.23; newOrderDetails.Quantity = 1; newOrderDetails.Discount = 0.0f; - newOrderDetails.OrdersReference.EntityKey = new EntityKey( - "northwindEFEntities.Orders", - new KeyValuePair [] { orderIdPair }); - - newOrderDetails.ProductsReference.EntityKey = new EntityKey( - "northwindEFEntities.Products", - new KeyValuePair [] { productIdPair }); - db.AddObject("OrderDetails", newOrderDetails); try { db.SaveChanges(); @@ -773,116 +749,10 @@ return 0; } #endif - private static int ComplexPrimaryKeyTest() - { - using (northwindEFEntities db = new northwindEFEntities()) - { - long orderId = 10248; - long productId = 1; - int[] counts = { 0, 0 }; - - // - // NOTE: *REQUIRED* This is required so that the - // Entity Framework is prevented from opening - // multiple connections to the underlying SQLite - // database (i.e. which would result in multiple - // IMMEDIATE transactions, thereby failing [later - // on] with locking errors). - // - db.Connection.Open(); - - KeyValuePair orderIdPair = - new KeyValuePair ("OrderID", orderId); - - KeyValuePair productIdPair = - new KeyValuePair ("ProductID", productId); - - ///////////////////////////////////////////////////////////////// - - OrderDetails newOrderDetails = new OrderDetails(); - - newOrderDetails.OrderID = orderId; - newOrderDetails.ProductID = productId; - newOrderDetails.UnitPrice = (decimal)1.23; - newOrderDetails.Quantity = 1; - newOrderDetails.Discount = 0.0f; - - newOrderDetails.OrdersReference.EntityKey = new EntityKey( - "northwindEFEntities.Orders", - new KeyValuePair [] { orderIdPair }); - - newOrderDetails.ProductsReference.EntityKey = new EntityKey( - "northwindEFEntities.Products", - new KeyValuePair [] { productIdPair }); - - db.AddObject("OrderDetails", newOrderDetails); - - try - { - db.SaveChanges(); - counts[0]++; - } - catch (Exception e) - { - Console.WriteLine(e); - } - finally - { - db.AcceptAllChanges(); - } - - try - { - db.Refresh(RefreshMode.StoreWins, newOrderDetails); - counts[0]++; - } - catch (Exception e) - { - Console.WriteLine(e); - } - - Console.WriteLine("inserted {0}", counts[0]); - - ///////////////////////////////////////////////////////////////// - - newOrderDetails.UnitPrice = (decimal)2.34; - newOrderDetails.Quantity = 2; - newOrderDetails.Discount = 0.1f; - - try - { - db.SaveChanges(); - counts[1]++; - } - catch (Exception e) - { - Console.WriteLine(e); - } - finally - { - db.AcceptAllChanges(); - } - - try - { - db.Refresh(RefreshMode.StoreWins, newOrderDetails); - counts[1]++; - } - catch (Exception e) - { - Console.WriteLine(e); - } - - Console.WriteLine("updated {0}", counts[1]); - } - - return 0; - } - private static int DateTimeTest() { using (northwindEFEntities db = new northwindEFEntities()) { DateTime dateTime = new DateTime(1997, 1, 1, 0, 0, 0, DateTimeKind.Local); Index: www/build.wiki ================================================================== --- www/build.wiki +++ www/build.wiki @@ -395,15 +395,27 @@
@@ -269,16 +188,12 @@
/// Modification command tree
/// Translator used to produce DML SQL statement
/// for the tree
/// Returning expression. If null, the method returns
/// immediately without producing a SELECT statement.
- ///
- /// Non-zero if this method is being called as part of processing an INSERT;
- /// otherwise (e.g. UPDATE), zero.
- ///
private static void GenerateReturningSql(StringBuilder commandText, DbModificationCommandTree tree,
- ExpressionTranslator translator, DbExpression returning, bool wasInsert)
+ ExpressionTranslator translator, DbExpression returning)
{
// Nothing to do if there is no Returning expression
if (null == returning) { return; }
// select
@@ -295,128 +210,38 @@
#if USE_INTEROP_DLL && INTEROP_EXTENSION_FUNCTIONS
commandText.Append("WHERE last_rows_affected() > 0");
#else
commandText.Append("WHERE changes() > 0");
#endif
-
- EntitySetBase table = ((DbScanExpression)tree.Target.Expression).Target;
- ReadOnlyMetadataCollection keyMembers;
- EdmMember primaryKeyMember;
- EdmMember missingKeyMember;
-
- // Model Types can be (at the time of this implementation):
- // Binary, Boolean, Byte, DateTime, Decimal, Double, Guid, Int16,
- // Int32, Int64,Single, String
- if (IsIntegerPrimaryKey(table, out keyMembers, out primaryKeyMember))
- {
- //
- // NOTE: This must be an INTEGER PRIMARY KEY (i.e. "rowid") table.
- //
- commandText.Append(" AND ");
- commandText.Append(GenerateMemberTSql(primaryKeyMember));
- commandText.Append(" = ");
-
- DbParameter value;
-
- if (translator.MemberValues.TryGetValue(primaryKeyMember, out value))
- {
- //
- // NOTE: Use the integer primary key value that was specified as
- // part the associated INSERT/UPDATE statement.
- //
- commandText.Append(value.ParameterName);
- }
- else if (wasInsert)
- {
- //
- // NOTE: This was part of an INSERT statement and we know the table
- // has an integer primary key. This should not fail unless
- // something (e.g. a trigger) causes the last_insert_rowid()
- // function to return an incorrect result.
- //
- commandText.AppendLine("last_insert_rowid()");
- }
- else /* NOT-REACHED? */
- {
- //
- // NOTE: We cannot simply use the "rowid" at this point because:
- //
- // 1. The last_insert_rowid() function is only valid after
- // an INSERT and this was an UPDATE.
- //
- throw new NotSupportedException(String.Format(
- "Missing value for INSERT key member '{0}' in table '{1}'.",
- (primaryKeyMember != null) ? primaryKeyMember.Name : "",
- table.Name));
- }
- }
- else if (DoAllKeyMembersHaveValues(translator, keyMembers, out missingKeyMember))
- {
- foreach (EdmMember keyMember in keyMembers)
- {
- commandText.Append(" AND ");
- commandText.Append(GenerateMemberTSql(keyMember));
- commandText.Append(" = ");
-
- // Retrieve member value SQL. the translator remembers member values
- // as it constructs the DML statement (which precedes the "returning"
- // SQL).
- DbParameter value;
-
- if (translator.MemberValues.TryGetValue(keyMember, out value))
- {
- //
- // NOTE: Use the primary key value that was specified as part the
- // associated INSERT/UPDATE statement. This also applies
- // to composite primary keys.
- //
- commandText.Append(value.ParameterName);
- }
- else /* NOT-REACHED? */
- {
- //
- // NOTE: We cannot simply use the "rowid" at this point because:
- //
- // 1. This associated INSERT/UPDATE statement appeared to
- // have all the key members availab;e however, there
- // appears to be an inconsistency. This is an internal
- // error and should be thrown.
- //
- throw new NotSupportedException(String.Format(
- "Missing value for {0} key member '{1}' in table '{2}' " +
- "(internal).", wasInsert ? "INSERT" : "UPDATE",
- (keyMember != null) ? keyMember.Name : "",
- table.Name));
- }
- }
- }
- else if (wasInsert) /* NOT-REACHED? */
- {
- //
- // NOTE: This was part of an INSERT statement; try using the "rowid"
- // column to fetch the most recently inserted row. This may
- // still fail if the table is a WITHOUT ROWID table -OR-
- // something (e.g. a trigger) causes the last_insert_rowid()
- // function to return an incorrect result.
- //
- commandText.Append(" AND ");
- commandText.Append(SqlGenerator.QuoteIdentifier("rowid"));
- commandText.Append(" = ");
- commandText.AppendLine("last_insert_rowid()");
- }
- else /* NOT-REACHED? */
- {
- //
- // NOTE: We cannot simply use the "rowid" at this point because:
- //
- // 1. The last_insert_rowid() function is only valid after
- // an INSERT and this was an UPDATE.
- //
- throw new NotSupportedException(String.Format(
- "Missing value for UPDATE key member '{0}' in table '{1}'.",
- (missingKeyMember != null) ? missingKeyMember.Name : "",
- table.Name));
+ EntitySetBase table = ((DbScanExpression)tree.Target.Expression).Target;
+ bool identity = false;
+ foreach (EdmMember keyMember in table.ElementType.KeyMembers)
+ {
+ commandText.Append(" AND ");
+ commandText.Append(GenerateMemberTSql(keyMember));
+ commandText.Append(" = ");
+
+ // retrieve member value sql. the translator remembers member values
+ // as it constructs the DML statement (which precedes the "returning"
+ // SQL)
+ DbParameter value;
+ if (translator.MemberValues.TryGetValue(keyMember, out value))
+ {
+ commandText.Append(value.ParameterName);
+ }
+ else
+ {
+ // if no value is registered for the key member, it means it is an identity
+ // which can be retrieved using the scope_identity() function
+ if (identity)
+ {
+ // there can be only one server generated key
+ throw new NotSupportedException(string.Format("Server generated keys are only supported for identity columns. More than one key column is marked as server generated in table '{0}'.", table.Name));
+ }
+ commandText.AppendLine("last_insert_rowid()");
+ identity = true;
+ }
}
commandText.AppendLine(";");
}
///
Index: System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs
==================================================================
--- System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs
+++ System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs
@@ -41,11 +41,11 @@
{
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
UnsafeNativeMethods.Initialize();
#endif
-#if USE_INTEROP_DLL && INTEROP_LOG
+#if INTEROP_LOG
if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok)
{
UnsafeNativeMethods.sqlite3_log(
SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized."));
}
@@ -58,11 +58,11 @@
"4.0.0.0";
#else
"3.5.0.0";
#endif
- _dbProviderServicesType = Type.GetType(UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
+ _dbProviderServicesType = Type.GetType(String.Format(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
}
///
/// Will provide a object in .NET 3.5.
///
@@ -88,16 +88,16 @@
Version version = this.GetType().Assembly.GetName().Version;
if (typeName != null)
{
- typeName = UnsafeNativeMethods.StringFormat(
+ typeName = String.Format(
CultureInfo.InvariantCulture, typeName, version);
}
else
{
- typeName = UnsafeNativeMethods.StringFormat(
+ typeName = String.Format(
CultureInfo.InvariantCulture, DefaultTypeName, version);
}
Type type = Type.GetType(typeName, false);
Index: System.Data.SQLite/SQLite3.cs
==================================================================
--- System.Data.SQLite/SQLite3.cs
+++ System.Data.SQLite/SQLite3.cs
@@ -246,20 +246,20 @@
if (unbindFunctions)
{
if (SQLiteFunction.UnbindAllFunctions(this, _flags, false))
{
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"UnbindFunctions (Pool) Success: {0}",
HandleToString()));
#endif
}
else
{
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"UnbindFunctions (Pool) Failure: {0}",
HandleToString()));
#endif
}
@@ -275,20 +275,20 @@
SQLiteConnectionEventType.ClosedToPool, null, null,
null, null, _sql, _fileName, new object[] {
typeof(SQLite3), canThrow, _fileName, _poolVersion }));
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Close (Pool) Success: {0}",
HandleToString()));
#endif
}
#if !NET_COMPACT_20 && TRACE_CONNECTION
else
{
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Close (Pool) Failure: {0}",
HandleToString()));
}
#endif
@@ -298,20 +298,20 @@
if (unbindFunctions)
{
if (SQLiteFunction.UnbindAllFunctions(this, _flags, false))
{
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"UnbindFunctions Success: {0}",
HandleToString()));
#endif
}
else
{
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"UnbindFunctions Failure: {0}",
HandleToString()));
#endif
}
@@ -887,11 +887,11 @@
null, null, _sql, strFilename, new object[] {
typeof(SQLite3), strFilename, vfsName, connectionFlags,
openFlags, maxPoolSize, usePool, _poolVersion }));
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Open (Pool): {0}", HandleToString()));
#endif
}
@@ -918,11 +918,11 @@
{
n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), ref db, openFlags, ToUTF8(vfsName));
}
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Open: {0}", db));
#endif
if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null);
@@ -1243,15 +1243,15 @@
string baseSchemaName = (cnn != null) ? cnn._baseSchemaName : null;
if (!String.IsNullOrEmpty(baseSchemaName))
{
strSql = strSql.Replace(
- UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture,
+ String.Format(CultureInfo.InvariantCulture,
"[{0}].", baseSchemaName), String.Empty);
strSql = strSql.Replace(
- UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture,
+ String.Format(CultureInfo.InvariantCulture,
"{0}.", baseSchemaName), String.Empty);
}
}
SQLiteConnectionFlags flags =
@@ -1264,11 +1264,11 @@
((flags & SQLiteConnectionFlags.LogPrepare) == SQLiteConnectionFlags.LogPrepare))
{
if ((strSql == null) || (strSql.Length == 0) || (strSql.Trim().Length == 0))
SQLiteLog.LogMessage("Preparing {}...");
else
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
+ SQLiteLog.LogMessage(String.Format(
CultureInfo.CurrentCulture, "Preparing {{{0}}}...", strSql));
}
IntPtr stmt = IntPtr.Zero;
IntPtr ptr = IntPtr.Zero;
@@ -1311,11 +1311,11 @@
#endif
len = -1;
#endif
#if !NET_COMPACT_20 && TRACE_STATEMENT
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Prepare ({0}): {1}", n, stmt));
#endif
if ((n == SQLiteErrorCode.Ok) && (stmt != IntPtr.Zero))
@@ -1447,22 +1447,21 @@
protected static void LogBind(SQLiteStatementHandle handle, int index)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
+ SQLiteLog.LogMessage(String.Format(
CultureInfo.CurrentCulture,
"Binding statement {0} paramter #{1} as NULL...",
handleIntPtr, index));
}
protected static void LogBind(SQLiteStatementHandle handle, int index, ValueType value)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
- CultureInfo.CurrentCulture,
+ SQLiteLog.LogMessage(String.Format(
"Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...",
handleIntPtr, index, value.GetType(), value));
}
private static string FormatDateTime(DateTime value)
@@ -1480,22 +1479,20 @@
protected static void LogBind(SQLiteStatementHandle handle, int index, DateTime value)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
- CultureInfo.CurrentCulture,
+ SQLiteLog.LogMessage(String.Format(
"Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...",
handleIntPtr, index, typeof(DateTime), FormatDateTime(value)));
}
protected static void LogBind(SQLiteStatementHandle handle, int index, string value)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
- CultureInfo.CurrentCulture,
+ SQLiteLog.LogMessage(String.Format(
"Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...",
handleIntPtr, index, typeof(String), (value != null) ? value : ""));
}
private static string ToHexadecimalString(
@@ -1517,12 +1514,11 @@
protected static void LogBind(SQLiteStatementHandle handle, int index, byte[] value)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
- CultureInfo.CurrentCulture,
+ SQLiteLog.LogMessage(String.Format(
"Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...",
handleIntPtr, index, typeof(Byte[]), (value != null) ? ToHexadecimalString(value) : ""));
}
internal override void Bind_Double(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, double value)
@@ -1534,17 +1530,16 @@
LogBind(handle, index, value);
}
#if !PLATFORM_COMPACTFRAMEWORK
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double(handle, index, value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
#elif !SQLITE_STANDARD
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double_interop(handle, index, ref value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
#else
throw new NotImplementedException();
#endif
+ if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
}
internal override void Bind_Int32(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, int value)
{
SQLiteStatementHandle handle = stmt._sqlite_stmt;
@@ -1599,17 +1594,16 @@
{
LogBind(handle, index, value);
}
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
#elif !SQLITE_STANDARD
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
#else
throw new NotImplementedException();
#endif
+ if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
}
internal override void Bind_UInt64(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, ulong value)
{
SQLiteStatementHandle handle = stmt._sqlite_stmt;
@@ -1619,17 +1613,16 @@
{
LogBind(handle, index, value);
}
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_uint64(handle, index, value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
#elif !SQLITE_STANDARD
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_uint64_interop(handle, index, ref value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
#else
throw new NotImplementedException();
#endif
+ if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
}
internal override void Bind_Text(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, string value)
{
SQLiteStatementHandle handle = stmt._sqlite_stmt;
@@ -1689,19 +1682,17 @@
{
LogBind(handle, index, value);
}
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- break;
#elif !SQLITE_STANDARD
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- break;
#else
throw new NotImplementedException();
#endif
+ if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
+ break;
}
case SQLiteDateFormats.JulianDay:
{
double value = ToJulianDay(dt);
@@ -1710,19 +1701,17 @@
{
LogBind(handle, index, value);
}
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double(handle, index, value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- break;
#elif !SQLITE_STANDARD
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double_interop(handle, index, ref value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- break;
#else
throw new NotImplementedException();
#endif
+ if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
+ break;
}
case SQLiteDateFormats.UnixEpoch:
{
long value = Convert.ToInt64(dt.Subtract(UnixEpoch).TotalSeconds);
@@ -1731,19 +1720,17 @@
{
LogBind(handle, index, value);
}
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- break;
#elif !SQLITE_STANDARD
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value);
- if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- break;
#else
throw new NotImplementedException();
#endif
+ if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
+ break;
}
default:
{
byte[] b = ToUTF8(dt);
@@ -1798,11 +1785,11 @@
if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
+ SQLiteLog.LogMessage(String.Format(
CultureInfo.CurrentCulture,
"Statement {0} paramter count is {1}.",
handleIntPtr, value));
}
@@ -1823,11 +1810,11 @@
if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
+ SQLiteLog.LogMessage(String.Format(
CultureInfo.CurrentCulture,
"Statement {0} paramter #{1} name is {{{2}}}.",
handleIntPtr, index, name));
}
@@ -1841,11 +1828,11 @@
if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind)
{
IntPtr handleIntPtr = handle;
- SQLiteLog.LogMessage(UnsafeNativeMethods.StringFormat(
+ SQLiteLog.LogMessage(String.Format(
CultureInfo.CurrentCulture,
"Statement {0} paramter index of name {{{1}}} is #{2}.",
handleIntPtr, paramName, index));
}
@@ -1989,19 +1976,20 @@
autoIncrement = (nautoInc == 1);
}
internal override double GetDouble(SQLiteStatement stmt, int index)
{
+ double value;
#if !PLATFORM_COMPACTFRAMEWORK
- return UnsafeNativeMethods.sqlite3_column_double(stmt._sqlite_stmt, index);
+ value = UnsafeNativeMethods.sqlite3_column_double(stmt._sqlite_stmt, index);
#elif !SQLITE_STANDARD
- double value = 0.0;
+ value = 0.0;
UnsafeNativeMethods.sqlite3_column_double_interop(stmt._sqlite_stmt, index, ref value);
- return value;
#else
throw new NotImplementedException();
#endif
+ return value;
}
internal override sbyte GetSByte(SQLiteStatement stmt, int index)
{
return unchecked((sbyte)(GetInt32(stmt, index) & byte.MaxValue));
@@ -2032,19 +2020,20 @@
return unchecked((uint)GetInt32(stmt, index));
}
internal override long GetInt64(SQLiteStatement stmt, int index)
{
+ long value;
#if !PLATFORM_COMPACTFRAMEWORK
- return UnsafeNativeMethods.sqlite3_column_int64(stmt._sqlite_stmt, index);
+ value = UnsafeNativeMethods.sqlite3_column_int64(stmt._sqlite_stmt, index);
#elif !SQLITE_STANDARD
- long value = 0;
+ value = 0;
UnsafeNativeMethods.sqlite3_column_int64_interop(stmt._sqlite_stmt, index, ref value);
- return value;
#else
throw new NotImplementedException();
#endif
+ return value;
}
internal override ulong GetUInt64(SQLiteStatement stmt, int index)
{
return unchecked((ulong)GetInt64(stmt, index));
@@ -2262,37 +2251,39 @@
return nCopied;
}
internal override double GetParamValueDouble(IntPtr ptr)
{
+ double value;
#if !PLATFORM_COMPACTFRAMEWORK
- return UnsafeNativeMethods.sqlite3_value_double(ptr);
+ value = UnsafeNativeMethods.sqlite3_value_double(ptr);
#elif !SQLITE_STANDARD
- double value = 0.0;
+ value = 0.0;
UnsafeNativeMethods.sqlite3_value_double_interop(ptr, ref value);
- return value;
#else
throw new NotImplementedException();
#endif
+ return value;
}
internal override int GetParamValueInt32(IntPtr ptr)
{
return UnsafeNativeMethods.sqlite3_value_int(ptr);
}
internal override long GetParamValueInt64(IntPtr ptr)
{
+ Int64 value;
#if !PLATFORM_COMPACTFRAMEWORK
- return UnsafeNativeMethods.sqlite3_value_int64(ptr);
+ value = UnsafeNativeMethods.sqlite3_value_int64(ptr);
#elif !SQLITE_STANDARD
- Int64 value = 0;
+ value = 0;
UnsafeNativeMethods.sqlite3_value_int64_interop(ptr, ref value);
- return value;
#else
throw new NotImplementedException();
#endif
+ return value;
}
internal override string GetParamValueText(IntPtr ptr)
{
#if !SQLITE_STANDARD
@@ -2395,11 +2386,11 @@
if (_usePool)
{
_usePool = false;
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"CreateModule (Pool) Disabled: {0}",
HandleToString()));
#endif
}
@@ -2642,18 +2633,16 @@
#if INTEROP_CODEC || INTEROP_INCLUDE_SEE
internal override void SetPassword(byte[] passwordBytes)
{
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_key(_sql, passwordBytes, passwordBytes.Length);
if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- _usePool = false;
}
internal override void ChangePassword(byte[] newPasswordBytes)
{
SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_rekey(_sql, newPasswordBytes, (newPasswordBytes == null) ? 0 : newPasswordBytes.Length);
if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
- _usePool = false;
}
#endif
internal override void SetProgressHook(int nOps, SQLiteProgressCallback func)
{
Index: System.Data.SQLite/SQLite3_UTF16.cs
==================================================================
--- System.Data.SQLite/SQLite3_UTF16.cs
+++ System.Data.SQLite/SQLite3_UTF16.cs
@@ -10,16 +10,15 @@
using System;
using System.Collections.Generic;
#if !NET_COMPACT_20 && TRACE_CONNECTION
using System.Diagnostics;
-#endif
-
using System.Globalization;
+#endif
+
using System.IO;
using System.Runtime.InteropServices;
-
///
/// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode)
///
internal sealed class SQLite3_UTF16 : SQLite3
@@ -161,11 +160,11 @@
typeof(SQLite3_UTF16), strFilename, vfsName,
connectionFlags, openFlags, maxPoolSize, usePool,
_poolVersion }));
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Open16 (Pool): {0}",
HandleToString()));
#endif
}
@@ -200,20 +199,19 @@
if (((openFlags & SQLiteOpenFlagsEnum.Create) != SQLiteOpenFlagsEnum.Create) && !File.Exists(strFilename))
throw new SQLiteException(SQLiteErrorCode.CantOpen, strFilename);
if (vfsName != null)
{
- throw new SQLiteException(SQLiteErrorCode.CantOpen, UnsafeNativeMethods.StringFormat(
- CultureInfo.CurrentCulture,
+ throw new SQLiteException(SQLiteErrorCode.CantOpen, String.Format(
"cannot open using UTF-16 and VFS \"{0}\": need interop assembly", vfsName));
}
n = UnsafeNativeMethods.sqlite3_open16(strFilename, ref db);
}
#if !NET_COMPACT_20 && TRACE_CONNECTION
- Trace.WriteLine(UnsafeNativeMethods.StringFormat(
+ Trace.WriteLine(String.Format(
CultureInfo.CurrentCulture,
"Open16: {0}", db));
#endif
if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null);
Index: System.Data.SQLite/SQLiteBase.cs
==================================================================
--- System.Data.SQLite/SQLiteBase.cs
+++ System.Data.SQLite/SQLiteBase.cs
@@ -949,25 +949,22 @@
/// Prevent this object instance from
/// loading extensions.
///
NoLoadExtension = 0x200,
-#if INTEROP_VIRTUAL_TABLE
///
/// Prevent this object instance from
/// creating virtual table modules.
///
NoCreateModule = 0x400,
-#endif
///
/// Skip binding any functions provided by other managed assemblies when
/// opening the connection.
///
NoBindFunctions = 0x800,
-#if INTEROP_VIRTUAL_TABLE
///
/// Skip setting the logging related properties of the
/// object instance that was passed to
/// the method.
///
@@ -982,11 +979,10 @@
///
/// Enable logging of certain virtual table module exceptions that cannot
/// be easily discovered via other means.
///
LogModuleException = 0x4000,
-#endif
///
/// Enable tracing of potentially important [non-fatal] error conditions
/// that cannot be easily reported through other means.
///
@@ -1167,27 +1163,18 @@
ConvertAndBindInvariantText,
///
/// Enable all logging.
///
-#if INTEROP_VIRTUAL_TABLE
LogAll = LogPrepare | LogPreBind | LogBind |
LogCallbackException | LogBackup | LogModuleError |
LogModuleException,
-#else
- LogAll = LogPrepare | LogPreBind | LogBind |
- LogCallbackException | LogBackup,
-#endif
///
/// The default extra flags for new connections.
///
-#if INTEROP_VIRTUAL_TABLE
Default = LogCallbackException | LogModuleException,
-#else
- Default = LogCallbackException,
-#endif
///
/// The default extra flags for new connections with all logging enabled.
///
DefaultAndLogAll = Default | LogAll
Index: System.Data.SQLite/SQLiteCommandBuilder.cs
==================================================================
--- System.Data.SQLite/SQLiteCommandBuilder.cs
+++ System.Data.SQLite/SQLiteCommandBuilder.cs
@@ -48,16 +48,10 @@
#endif
}
///////////////////////////////////////////////////////////////////////////////////////////////
- ///
- /// Cleans up resources (native and managed) associated with the current instance.
- ///
- ///
- /// Zero when being disposed via garbage collection; otherwise, non-zero.
- ///
protected override void Dispose(bool disposing)
{
try
{
if (!disposed)
@@ -106,21 +100,21 @@
///