Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From 259a5463663557b0 To fc9062d656ada8a6
2015-08-19
| ||
14:32 | Fix compilation issue with EF6. check-in: 9a71005d4e user: mistachkin tags: preRelease | |
04:52 | Fix the exclusion file syntax for use by the command line 'zip' tool. check-in: 259a546366 user: mistachkin tags: preRelease | |
04:31 | Refactor INSERT/UPDATE handling (in the LINQ assembly) so it can handle composite and non-integer primary keys. Fix for [41aea496e0]. check-in: c1baff799b user: mistachkin tags: preRelease | |
2015-08-08
| ||
01:28 | Prevent encrypted connections from being used with the connection pool. Pursuant to [89d3a159f1]. check-in: 661e488237 user: mistachkin tags: trunk | |
2015-08-04
| ||
22:54 | Experimental changes to support implementing a SQLiteFunction using a generic delegate. check-in: d1cfa62cb0 user: mistachkin tags: delegateFunction | |
2015-07-31
| ||
01:16 | Merge updates from trunk. check-in: e670692d90 user: mistachkin tags: preRelease | |
2015-07-30
| ||
18:30 | Update release procedures wiki page. check-in: fc9062d656 user: mistachkin tags: trunk | |
18:13 | Further improvements to the download page update script. check-in: 872bd8c9ee user: mistachkin tags: trunk | |
Changes to Doc/Extra/Provider/version.html.
︙ | ︙ | |||
39 40 41 42 43 44 45 | </td> </tr> </table> </div> <div id="mainSection"> <div id="mainBody"> <h1 class="heading">Version History</h1> | | < < < | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | </td> </tr> </table> </div> <div id="mainSection"> <div id="mainBody"> <h1 class="heading">Version History</h1> <p><b>1.0.98.0 - August XX, 2015 <font color="red">(release scheduled)</font></b></p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_8_11_1.html">SQLite 3.8.11.1</a>.</li> <li>Add full support for Visual Studio 2015 and the .NET Framework 4.6.</li> <li>Implement the Substring method for LINQ using the "substr" core SQL function. <b>** Potentially Incompatible Change **</b></li> <li>Honor the second argument to Math.Round when using LINQ. <b>** Potentially Incompatible Change **</b></li> <li>Honor the pre-existing flags for connections during the Open method. Fix for <a href="https://system.data.sqlite.org/index.html/info/964063da16">[964063da16]</a>. <b>** Potentially Incompatible Change **</b></li> <li>Remove errant semi-colons from the SQL used by LINQ to INSERT and then SELECT rows with composite primary keys. Fix for <a href="https://system.data.sqlite.org/index.html/info/9d353b0bd8">[9d353b0bd8]</a>.</li> <li>Change the base type for the SQLiteConnectionFlags enumeration to long integer. <b>** Potentially Incompatible Change **</b></li> <li>Add extended return codes to the SQLiteErrorCode enumeration. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/71bedaca19">[71bedaca19]</a>. <b>** Potentially Incompatible Change **</b></li> <li>Improve exception handling in all native callbacks implemented in the SQLiteConnection class.</li> <li>Add Progress event and ProgressOps connection string property to enable raising progress events during long-running queries.</li> <li>Add "Recursive Triggers" connection string property to enable or disable the recursive trigger capability. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/3a82ee635b">[3a82ee635b]</a>.</li> <li>Add NoDefaultFlags connection string property to prevent the default connection flags from being used. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/964063da16">[964063da16]</a>.</li> <li>Add VfsName connection string property to allow a non-default VFS to be used by the SQLite core library.</li> |
︙ | ︙ |
Changes to Doc/SQLite.NET.chm.
cannot compute difference between binary files
Changes to Externals/Eagle/bin/Eagle.dll.
cannot compute difference between binary files
Changes to Externals/Eagle/bin/EagleShell.exe.
cannot compute difference between binary files
Changes to Externals/Eagle/bin/EagleShell32.exe.
cannot compute difference between binary files
Changes to Externals/Eagle/bin/x64/Spilornis.dll.
cannot compute difference between binary files
Changes to Externals/Eagle/bin/x86/Spilornis.dll.
cannot compute difference between binary files
Changes to Externals/Eagle/lib/Eagle1.0/init.eagle.
︙ | ︙ | |||
2033 2034 2035 2036 2037 2038 2039 | if {[llength $args] > 2} then { error "wrong # args: should be \"parray a ?pattern?\"" } upvar 1 $a array if {![array exists array]} { | | | 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 | if {[llength $args] > 2} then { error "wrong # args: should be \"parray a ?pattern?\"" } upvar 1 $a array if {![array exists array]} { error "\"$a\" isn't an array" } set names [lsort [eval array names array $args]] set maxLength 0 foreach name $names { set length [string length $name] |
︙ | ︙ | |||
2155 2156 2157 2158 2159 2160 2161 | # set command test1 } return [uplevel 1 [list $command $name $description] $args] } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < | < < < < | 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 | # set command test1 } return [uplevel 1 [list $command $name $description] $args] } proc unknown { name args } { # # 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? # return -code error "invalid command name \"$name\"" } namespace eval ::tcl::tm { # # NOTE: Ideally, this procedure should be created in the "::tcl::tm" # namespace. # |
︙ | ︙ | |||
2331 2332 2333 2334 2335 2336 2337 | proc tclLog { string } { # # NOTE: This should work properly in both Tcl and Eagle. # catch {puts stderr $string} } | < < < < < < < < < < | 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 | proc tclLog { string } { # # NOTE: This should work properly in both Tcl and Eagle. # catch {puts stderr $string} } proc makeVariableFast { name fast } { # # NOTE: This should work properly in Eagle only. # catch { uplevel 1 [list object invoke -flags +NonPublic \ Interpreter.GetActive MakeVariableFast $name $fast] |
︙ | ︙ | |||
2387 2388 2389 2390 2391 2392 2393 | } } foreach dir [split [exec -unicode $::env(ComSpec) /u /c dir \ /ahd /b [appendArgs \" [file nativename $pattern] \"]] \n] { set dir [string trim $dir] | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 | } } 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 } } |
︙ | ︙ | |||
2589 2590 2591 2592 2593 2594 2595 | eval lappend result [glob -nocomplain -types {d hidden} \ [file normalize $pattern]] return $result } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 | eval lappend result [glob -nocomplain -types {d hidden} \ [file normalize $pattern]] return $result } proc findFiles { pattern } { # # NOTE: This should work properly in Tcl only. # eval lappend result [glob -nocomplain -types {f} \ [file normalize $pattern]] |
︙ | ︙ | |||
2691 2692 2693 2694 2695 2696 2697 | foreach fileName [split [exec $::env(ComSpec) /c dir /a-d /s /b \ [file nativename $pattern]] \n] { set fileName [string trim $fileName] if {[string length $fileName] > 0} then { set fileName [getDirResultPath $pattern $fileName] | < < < < < | | < < < < < < < < < < < | | < < < < < < | 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 | foreach fileName [split [exec $::env(ComSpec) /c dir /a-d /s /b \ [file nativename $pattern]] \n] { set fileName [string trim $fileName] if {[string length $fileName] > 0} then { set fileName [getDirResultPath $pattern $fileName] if {[lsearch -exact -nocase $result $fileName] == -1} then { lappend result $fileName } } } } catch { foreach fileName [split [exec $::env(ComSpec) /c dir /ah-d /s /b \ [file nativename $pattern]] \n] { set fileName [string trim $fileName] if {[string length $fileName] > 0} then { set fileName [getDirResultPath $pattern $fileName] if {[lsearch -exact -nocase $result $fileName] == -1} then { lappend result $fileName } } } } return $result } |
︙ | ︙ | |||
2795 2796 2797 2798 2799 2800 2801 | isSameFileName getEnvironmentVariable combineFlags getCompileInfo \ getPlatformInfo getPluginPath appendArgs lappendArgs \ 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 \ | | | < | 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 | isSameFileName getEnvironmentVariable combineFlags getCompileInfo \ getPlatformInfo getPluginPath appendArgs lappendArgs \ 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 findFiles findFilesRecursive \ exportAndImportPackageCommands] false false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } # # NOTE: Provide the Eagle library package to the interpreter. # package provide Eagle.Library \ [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}] } |
Changes to Externals/Eagle/lib/Eagle1.0/shell.eagle.
︙ | ︙ | |||
26 27 28 29 30 31 32 | ########################################################################### # # NOTE: Commands specific to initializing the Eagle interactive shell # environment should be placed here. # proc help { args } { | < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ########################################################################### # # NOTE: Commands specific to initializing the Eagle interactive shell # environment should be placed here. # proc help { args } { eval lappend command #help $args; debug icommand $command error "for interactive help please use: #help $args" } ########################################################################### ############################# END Eagle ONLY ############################## ########################################################################### } else { ########################################################################### |
︙ | ︙ |
Changes to Externals/Eagle/lib/Eagle1.0/test.eagle.
︙ | ︙ | |||
233 234 235 236 237 238 239 | } } proc testArrayGet { varName {integer false} } { # # NOTE: Returns the results of [array get] in a well-defined order. # | < < < < | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | } } proc testArrayGet { varName {integer false} } { # # NOTE: Returns the results of [array get] in a well-defined order. # upvar 1 $varName array # # NOTE: Build the command that will sort the array names into order. # set command [list lsort] if {$integer} then {lappend command -integer} |
︙ | ︙ | |||
481 482 483 484 485 486 487 | tputs $::test_channel [appendArgs \ "---- skipped " $type " file: \"" $fileName \ "\", it does not exist\n"] } } } | | < < < < < < | | | < | | | | | < | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | tputs $::test_channel [appendArgs \ "---- skipped " $type " file: \"" $fileName \ "\", it does not exist\n"] } } } proc processTestArguments { varName args } { # # NOTE: We are going to place the configured options in the variable # identified by the name provided by the caller. # upvar 1 $varName array # # TODO: Add more support for standard tcltest options here. # set options [list \ -breakOnLeak -configuration -constraints -exitOnComplete -file \ -logFile -machine -match -no -notFile -platform -postTest -preTest \ -postWait -preWait -randomOrder -skip -startFile -stopFile \ -stopOnFailure -stopOnLeak -suffix -suite -tclsh -threshold] set length [llength $args] for {set index 0} {$index < $length} {incr index} { # # NOTE: Grab the current list element, which should be the name of # the test option. |
︙ | ︙ | |||
547 548 549 550 551 552 553 | # NOTE: Is there another list element available for the value? If # not, it does not conform to the standard command line name # and value pattern. # if {$index + 1 < $length} then { incr index; set value [lindex $args $index] | < < < < | < < < < < < < | | < < < | < < < < < < < < < < < < < < < < < < < < < < < < | | | < < | | < < < < < < < | | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | # NOTE: Is there another list element available for the value? If # not, it does not conform to the standard command line name # and value pattern. # if {$index + 1 < $length} then { incr index; set value [lindex $args $index] tqputs $::test_channel [appendArgs \ "---- unknown test option \"" $name "\" with value \"" \ $value "\" ignored\n"] } else { tqputs $::test_channel [appendArgs \ "---- no value for unknown test option \"" $name \ "\" ignored\n"] } } else { # # NOTE: This is not an option of *any* kind that we know about. # Ignore it and issue a warning. # tqputs $::test_channel [appendArgs \ "---- unknown argument \"" $name "\" ignored\n"] } } # # NOTE: Now, attempt to flush the test log queue, if available. # tlog "" } proc getTclShellFileName { automatic kits } { # # NOTE: Start out with an empty list of candiate Tcl shells. # set shells [list] # # NOTE: Check all environment variables we know about that # may contain the path where the Tcl shell is located. # foreach name [list Eagle_Tcl_Shell Tcl_Shell] { set value [getEnvironmentVariable $name] # # TODO: Possibly add a check if the file actually exists # here. # if {[string length $value] > 0} then { |
︙ | ︙ | |||
1351 1352 1353 1354 1355 1356 1357 | if {![info exists ::no(epilogue.eagle)] && [info exists ::path]} then { unset ::path } } proc hookPuts {} { # | | | | 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 | if {![info exists ::no(epilogue.eagle)] && [info exists ::path]} then { unset ::path } } proc hookPuts {} { # # NOTE: This code was stolen from tcltest and heavily modified to work # with Eagle. # proc [namespace current]::testPuts { args } { switch [llength $args] { 1 { # # NOTE: Only the string to be printed is specified (stdout). # |
︙ | ︙ | |||
2373 2374 2375 2376 2377 2378 2379 | # # NOTE: Return non-zero if the test suite appears to be running. # return [expr {[info exists ::test_suite_running] && \ $::test_suite_running}] } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 | # # NOTE: Return non-zero if the test suite appears to be running. # return [expr {[info exists ::test_suite_running] && \ $::test_suite_running}] } proc configureTcltest { match skip constraints imports force } { if {[isEagle]} then { # # HACK: Flag the "test" and "runTest" script library procedures so # that they use the script location of their caller and not # their own. # # BUGBUG: Even this does not yet fix the script location issues in # the test suite: # # debug procedureflags test +ScriptLocation # debug procedureflags runTest +ScriptLocation # # NOTE: Setup the necessary compatibility shims for the test suite. # namespace eval ::tcltest {}; # HACK: Force namespace creation now. setupTestShims true [expr {![isTestSuiteRunning]}] # # NOTE: Fake having the tcltest package. # package provide tcltest 2.2.10; # Tcl 8.4 } else { # # NOTE: Attempt to detect if the tcltest package is already loaded. # set loaded [expr {[catch {package present tcltest}] == 0}] # # NOTE: Always attempt to load the tcltest package. # package require tcltest # # NOTE: Configure tcltest for our use (only when it was not loaded). # if {!$loaded} then { ::tcltest::configure -verbose bpste } # # NOTE: We need to copy the Eagle test names to match over to Tcl. |
︙ | ︙ | |||
2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 | set eagle_tests(Constraints) [getEnvironmentVariable testConstraints] if {[info exists test_flags(-constraints)]} then { eval lappend eagle_tests(Constraints) $test_flags(-constraints) } } } proc setupTestShims { setup {quiet false} } { if {$setup} then { # # HACK: Compatibility shim(s) for use with various tests in the Tcl # test suite. Make sure these commands do not already exist # prior to attempt to adding them. | > > > > > > > > | 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 | set eagle_tests(Constraints) [getEnvironmentVariable testConstraints] if {[info exists test_flags(-constraints)]} then { eval lappend eagle_tests(Constraints) $test_flags(-constraints) } } } proc getTestChannelOrDefault {} { if {[info exists ::test_channel]} then { return $::test_channel } return stdout; # TODO: Good default? } proc setupTestShims { setup {quiet false} } { if {$setup} then { # # HACK: Compatibility shim(s) for use with various tests in the Tcl # test suite. Make sure these commands do not already exist # prior to attempt to adding them. |
︙ | ︙ | |||
3387 3388 3389 3390 3391 3392 3393 | object unimport -importpattern System.Windows.Forms.Layout object unimport -importpattern System.Windows.Forms.PropertyGridInternal object unimport -importpattern System.Windows.Forms.VisualStyles } proc getTestLibraryDirectory {} { # | | < | > | | | | | | | | | | | | | | > > > > > > > > > > > > | > > > > > > > > > > | | > > | > > > > > > > > > | > > > > > > > | | > > > | > > > > > > > > > > > | > > > > > > > > > > > > > | > > | > > > > > > > > > | > | | 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 | object unimport -importpattern System.Windows.Forms.Layout object unimport -importpattern System.Windows.Forms.PropertyGridInternal object unimport -importpattern System.Windows.Forms.VisualStyles } proc getTestLibraryDirectory {} { # # NOTE: First, query the location of the script library. # set result [info library] # # NOTE: Next, If the script library is embedded within the core # library itself (i.e. the script library location refers # to a file, not a directory), strip off the file name. # if {[file exists $result] && [file isfile $result]} then { set result [file dirname $result] } # # NOTE: Finally, return the resulting script library directory. # return $result } # # NOTE: Setup the test path relative to the library path. # if {![interp issafe] && ![info exists ::test_path]} then { # # NOTE: Try the source release directory structure. For this case, # the final test path would be: # # $library/../../Library/Tests # set ::test_path [file join [file normalize [file dirname \ [file dirname [getTestLibraryDirectory]]]] Library Tests] if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Try the source release directory structure again; this time, # assume only the embedded script library was used. For this # case, the final test path would be: # # $base/Library/Tests # set ::test_path [file join [info base] Library Tests] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Try for the test package directory. For this case, the final # test path would be: # # $script/../Test1.0 # set ::test_path [file join [file normalize [file dirname \ [file dirname [info script]]]] [appendArgs Test \ [info engine Version]]] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Try for the test package directory again; this time, use the # base path and assume the source release directory structure. # For this case, the final test path would be: # # $base/lib/Test1.0 # set ::test_path [file join [info base] lib [appendArgs Test \ [info engine Version]]] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Try for the test package directory again; this time, use the # base path. For this case, the final test path would be: # # $base/Test1.0 # set ::test_path [file join [info base] [appendArgs Test \ [info engine Version]]] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: This must be a binary release, no "Library" directory then. # Also, binary releases have an upper-case "Tests" directory # name that originates from the "update.bat" tool. This must # match the casing used in "update.bat". For this case, the # final test path would be: # # $library/../../Tests # set ::test_path [file join [file normalize [file dirname \ [file dirname [getTestLibraryDirectory]]]] Tests] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Fallback to using the base directory and checking for a # "Tests" directory beneath it. For this case, the final # test path would be: # # $base/Tests # set ::test_path [file join [info base] Tests] } } # # NOTE: Fake having the tcltest package unless we are prevented. # if {![info exists ::no(configureTcltest)]} then { configureTcltest [list] [list] [list] [list] false } ########################################################################### ############################# END Eagle ONLY ############################## |
︙ | ︙ | |||
3455 3456 3457 3458 3459 3460 3461 | double($::tcltest::numTests(Total)))}] } return 0; # no tests were run, etc. } # | | > > > > > > > | > > | > > > | > | > > > > > > > > > > | | | > | | | 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 | double($::tcltest::numTests(Total)))}] } return 0; # no tests were run, etc. } # # NOTE: Setup the test path relative to the path of this file. # if {![interp issafe] && ![info exists ::test_path]} then { # # NOTE: Try the source release directory structure. # set ::test_path [file join [file normalize [file dirname \ [file dirname [file dirname [info script]]]]] Library Tests] if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: Try for the test package directory. # set ::test_path [file join [file normalize [file dirname \ [file dirname [info script]]]] Test1.0] } if {![file exists $::test_path] || \ ![file isdirectory $::test_path]} then { # # NOTE: This must be a binary release, no "Library" directory then. # Also, binary releases have an upper-case "Tests" directory # name that originates from the "update.bat" tool. This must # match the casing used in "update.bat". # set ::test_path [file join [file normalize [file dirname \ [file dirname [file dirname [info script]]]]] Tests] } } # # NOTE: Load and configure the tcltest package unless we are prevented. # if {![interp issafe] && ![info exists ::no(configureTcltest)]} then { configureTcltest [list] [list] [list] [list test testConstraint] false } # # NOTE: We need several of our test related commands in the global # namespace as well. # |
︙ | ︙ | |||
3488 3489 3490 3491 3492 3493 3494 | getTestSuffix testExec testClrExec execTestShell isRandomOrder \ isBreakOnLeak isStopOnFailure isStopOnLeak isExitOnComplete \ returnInfoScript runTestPrologue runTestEpilogue hookPuts unhookPuts \ runTest testDebugBreak testArrayGet testShim tsource \ recordTestStatistics reportTestStatistics formatList formatListAsDict \ pathToRegexp inverseLsearchGlob removePathFromFileNames formatDecimal \ clearTestPercent reportTestPercent runAllTests isTestSuiteRunning \ | | | | 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 | getTestSuffix testExec testClrExec execTestShell isRandomOrder \ isBreakOnLeak isStopOnFailure isStopOnLeak isExitOnComplete \ returnInfoScript runTestPrologue runTestEpilogue hookPuts unhookPuts \ runTest testDebugBreak testArrayGet testShim tsource \ recordTestStatistics reportTestStatistics formatList formatListAsDict \ pathToRegexp inverseLsearchGlob removePathFromFileNames formatDecimal \ clearTestPercent reportTestPercent runAllTests isTestSuiteRunning \ configureTcltest machineToPlatform getPassPercentage \ getSkipPercentage] false false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } # # NOTE: Provide the Eagle test package to the interpreter. # package provide Eagle.Test \ [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}] } |
Changes to Externals/Eagle/lib/Test1.0/all.eagle.
︙ | ︙ | |||
38 39 40 41 42 43 44 | # # When using the above code snippet, the following code snippet may also # be used at the very end of the corresponding "all.eagle" file instead # of evaluating the "epilogue.eagle" file directly: # # runTestEpilogue # | < < < < < | < < | | | | | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # # When using the above code snippet, the following code snippet may also # be used at the very end of the corresponding "all.eagle" file instead # of evaluating the "epilogue.eagle" file directly: # # runTestEpilogue # if {![info exists test_path]} then { set test_path [file normalize [file dirname [info script]]] } source [file join $test_path prologue.eagle] set no(prologue.eagle) true set no(epilogue.eagle) true set test_time [time { runAllTests $test_channel $test_path \ [getTestFiles [list $test_path] $test_flags(-file) \ $test_flags(-notFile)] \ [list [file tail [info script]] *.tcl pkgIndex.eagle \ constraints.eagle epilogue.eagle prologue.eagle] \ $test_flags(-startFile) $test_flags(-stopFile) }] tputs $test_channel [appendArgs "---- all tests completed in " $test_time \n] unset test_time unset no(epilogue.eagle) unset no(prologue.eagle) if {[array size no] == 0} then {unset no} source [file join $test_path epilogue.eagle] |
Changes to Externals/Eagle/lib/Test1.0/constraints.eagle.
︙ | ︙ | |||
52 53 54 55 56 57 58 | # # NOTE: This job of this procedure is to return the list of "known" # versions of Mono supported by the test suite infrastructure. # return [list \ [list 2 0] [list 2 2] [list 2 4] [list 2 6] [list 2 8] [list 2 10] \ [list 2 11] [list 2 12] [list 3 0] [list 3 1] [list 3 2] [list 3 3] \ | | < | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | # # NOTE: This job of this procedure is to return the list of "known" # versions of Mono supported by the test suite infrastructure. # return [list \ [list 2 0] [list 2 2] [list 2 4] [list 2 6] [list 2 8] [list 2 10] \ [list 2 11] [list 2 12] [list 3 0] [list 3 1] [list 3 2] [list 3 3] \ [list 3 4] [list 3 5] [list 3 6] [list 3 8] [list 3 10] [list 3 12]] } # # NOTE: This procedure was adapted from the one listed on the Tcl Wiki page # at "http://wiki.tcl.tk/43". It is only intended to be used on very # small lists because of its heavy use of recursion and complexity on # the order of O(N!). |
︙ | ︙ | |||
100 101 102 103 104 105 106 | # # NOTE: If this Eagle version lacks [interp readylimit] -OR- it has # the default value (i.e. it always fully checks readiness), # return true. # return [expr { | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | # # NOTE: If this Eagle version lacks [interp readylimit] -OR- it has # the default value (i.e. it always fully checks readiness), # return true. # return [expr { [catch {interp readylimit {}} readylimit] != 0 || $readylimit == 0 }] } # # NOTE: This procedure should return non-zero if the "whoami" command may # be executed by the test suite infrastructure outside the context # of any specific tests. |
︙ | ︙ | |||
312 313 314 315 316 317 318 | # NOTE: If the test suite file exists, add it to the list of file # names to process. # if {[file exists $fileName]} then { lappend fileNames $fileName } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | > > | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | # NOTE: If the test suite file exists, add it to the list of file # names to process. # if {[file exists $fileName]} then { lappend fileNames $fileName } } } # # NOTE: Check if the test package path is available. # if {[info exists ::test_path]} then { # # TODO: If additional test suite files are added within the test # package path, add them here as well. # foreach fileNameOnly [list \ all.eagle constraints.eagle epilogue.eagle pkgIndex.eagle \ pkgIndex.tcl prologue.eagle] { # # NOTE: Check if the file resides in the test package directory. # set fileName [file join $::test_path $fileNameOnly] # # NOTE: If the test suite file exists, add it to the list of file |
︙ | ︙ | |||
1610 1611 1612 1613 1614 1615 1616 | tputs $channel yes\n } else { tputs $channel no\n } } | < < < < < < < < < < < < < < < < | 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 | tputs $channel yes\n } else { tputs $channel no\n } } proc checkForMemoryIntensive { channel } { tputs $channel "---- checking for memory intensive testing... " # # NOTE: Are we allowed to do memory intensive testing? # if {![info exists ::no(memoryIntensive)]} then { |
︙ | ︙ | |||
1989 1990 1991 1992 1993 1994 1995 | tputs $channel yes\n } else { tputs $channel no\n } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 | tputs $channel yes\n } else { tputs $channel no\n } } proc checkForCertificate { channel } { tputs $channel "---- checking for certificate... " if {[catch { object invoke Interpreter.GetActive GetCertificate } certificate] == 0 && [string length $certificate] > 0} then { # # NOTE: Yes, it appears that the core library was signed with a # code-signing certificate. # addConstraint certificate # # NOTE: Attempt to query the subject from the certificate. # if {[catch { object invoke $certificate Subject } subject] != 0 || [string length $subject] == 0} then { # # TODO: No certificate subject, better handling here? # set subject unknown } tputs $channel [appendArgs "yes (" $subject ")\n"] |
︙ | ︙ | |||
2186 2187 2188 2189 2190 2191 2192 | tputs $channel "---- checking for default application domain... " if {[catch { object invoke AppDomain CurrentDomain } appDomain] == 0 && [string length $appDomain] > 0} then { if {[catch { object invoke $appDomain IsDefaultAppDomain | | | | 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 | tputs $channel "---- checking for default application domain... " if {[catch { object invoke AppDomain CurrentDomain } appDomain] == 0 && [string length $appDomain] > 0} then { if {[catch { object invoke $appDomain IsDefaultAppDomain } default] != 0 || [string length $default] == 0} then { set default false } if {[catch {object invoke $appDomain Id} id] != 0 || \ [string length $id] == 0} then { set id unknown } if {$default} then { addConstraint defaultAppDomain |
︙ | ︙ | |||
2494 2495 2496 2497 2498 2499 2500 | tputs $channel [appendArgs $result ", " $::tcl_platform(processBits) \ -bit " " $::tcl_platform(machine) \n] } else { tputs $channel "no, unknown\n" } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 | tputs $channel [appendArgs $result ", " $::tcl_platform(processBits) \ -bit " " $::tcl_platform(machine) \n] } else { tputs $channel "no, unknown\n" } } proc checkForGarudaDll { channel } { # # NOTE: Skip automatic Tcl shell machine detection if we are not # allowed to execute external commands. # if {[canExecTclShell]} then { # |
︙ | ︙ | |||
3386 3387 3388 3389 3390 3391 3392 | return } } tputs $channel no\n } | < < < < < < < < < < < < < < < < < | | | 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 | return } } tputs $channel no\n } proc checkForNetFx45 { channel } { tputs $channel "---- checking for .NET Framework 4.5... " # # NOTE: Platform must be Windows for this constraint to even be # checked (i.e. we require the registry). # if {[isWindows]} then { # |
︙ | ︙ | |||
3445 3446 3447 3448 3449 3450 3451 | # # NOTE: If the "release" value is greater than or equal to 378758 # (or 378675 for Windows 8.1), then the .NET Framework 4.5.1 # is installed. However, if the "release" value is also # greater than or equal to 379893, then the .NET Framework # 4.5.2 is installed, which is an in-place upgrade to 4.5.1 # (and 4.5). If the "release" value is also greater than or | | | > > | | < < < | 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 | # # NOTE: If the "release" value is greater than or equal to 378758 # (or 378675 for Windows 8.1), then the .NET Framework 4.5.1 # is installed. However, if the "release" value is also # greater than or equal to 379893, then the .NET Framework # 4.5.2 is installed, which is an in-place upgrade to 4.5.1 # (and 4.5). If the "release" value is also greater than or # equal to 393246, then the .NET Framework 4.6 is installed, # which is an in-place upgrade to 4.5.x. # # TODO: Change the value 393246 when the .NET Framework 4.6 goes # final. # if {$release >= 393246} then { addConstraint dotNet46 addConstraint dotNet46OrHigher set version 4.6 } elseif {$release >= 379893} then { addConstraint dotNet452 addConstraint dotNet452OrHigher set version 4.5.2 } elseif {$release >= 378675} then { addConstraint dotNet451 addConstraint dotNet451OrHigher |
︙ | ︙ | |||
3706 3707 3708 3709 3710 3711 3712 | checkForGaruda checkForShell checkForDebug checkForTk checkForVersion \ checkForCommand checkForNamespaces checkForTestExec \ checkForTestMachine checkForTestPlatform checkForTestConfiguration \ checkForTestSuffix checkForFile checkForPathFile checkForNativeCode \ checkForTip127 checkForTip194 checkForTip207 checkForTip241 \ checkForTip285 checkForTip405 checkForTip426 checkForTip429 \ checkForTiming checkForPerformance checkForBigLists \ | | | | | | 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 | checkForGaruda checkForShell checkForDebug checkForTk checkForVersion \ checkForCommand checkForNamespaces checkForTestExec \ checkForTestMachine checkForTestPlatform checkForTestConfiguration \ checkForTestSuffix checkForFile checkForPathFile checkForNativeCode \ checkForTip127 checkForTip194 checkForTip207 checkForTip241 \ checkForTip285 checkForTip405 checkForTip426 checkForTip429 \ checkForTiming checkForPerformance checkForBigLists \ checkForTimeIntensive checkForMemoryIntensive checkForStackIntensive \ checkForInteractive checkForInteractiveCommand checkForUserInteraction \ checkForNetwork checkForCompileOption checkForKnownCompileOptions] \ false false ########################################################################### ############################## END Tcl ONLY ############################### ########################################################################### } # # NOTE: Provide the Eagle test constraints package to the interpreter. # package provide Eagle.Test.Constraints \ [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}] } |
Changes to Externals/Eagle/lib/Test1.0/epilogue.eagle.
︙ | ︙ | |||
21 22 23 24 25 26 27 | # # NOTE: Verify that the current call frame is correct and that the # interpreter call stack has not been imbalanced by previous # tests or other errors. This check only applies to Eagle. # if {[isEagle] && [llength [info commands object]] > 0} then { | > | | | | | | | | | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # # NOTE: Verify that the current call frame is correct and that the # interpreter call stack has not been imbalanced by previous # tests or other errors. This check only applies to Eagle. # if {[isEagle] && [llength [info commands object]] > 0} then { catch { # # NOTE: Check the name of the current call frame against the one # that should be used for evaluating this script file. # if {[object invoke -flags +NonPublic \ Interpreter.GetActive.CurrentFrame Name] ne \ [list source [file normalize [info script]]]} then { unset -nocomplain test_suite_running error "cannot run, current frame is not for this script" } } } # # NOTE: Make sure all the variables used by this epilogue are unset. # unset -nocomplain memory stack name count passedOrSkipped percent \ |
︙ | ︙ |
Changes to Externals/Eagle/lib/Test1.0/prologue.eagle.
︙ | ︙ | |||
19 20 21 22 23 24 25 | error "cannot run, current level is not global" } # # NOTE: Make sure all the variables used by this prologue are unset. # unset -nocomplain pkg_dir pattern dummy directory name value exec encoding \ | | | < < < < < < < | < | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | error "cannot run, current level is not global" } # # NOTE: Make sure all the variables used by this prologue are unset. # unset -nocomplain pkg_dir pattern dummy directory name value exec encoding \ host memory stack drive publicKeyToken expr server database timeout \ user password percent checkout timeStamp loaded # # NOTE: Indicate that the test suite is currently running. # if {![info exists test_suite_running] || !$test_suite_running} then { set test_suite_running true } # # NOTE: Set the location of the test suite, if necessary. # if {![info exists test_path]} then { set test_path [file normalize [file dirname [info script]]] } # # NOTE: Set the location of the test suite data, if necessary. # if {![info exists test_data_path]} then { set test_data_path [file join $test_path data] |
︙ | ︙ | |||
185 186 187 188 189 190 191 | # NOTE: Make sure our primary package path is part of the auto-path. # if {[lsearch -exact $auto_path $test_package_path] == -1} then { lappend auto_path $test_package_path } # | | < < < < < < < < | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | # NOTE: Make sure our primary package path is part of the auto-path. # if {[lsearch -exact $auto_path $test_package_path] == -1} then { lappend auto_path $test_package_path } # # NOTE: Make sure our test package path is part of the auto-path. # if {[lsearch -exact $auto_path $test_path] == -1} then { lappend auto_path $test_path } ############################################################################# |
︙ | ︙ | |||
232 233 234 235 236 237 238 | # # NOTE: Verify that the current call frame is correct and that the # interpreter call stack has not been imbalanced by previous # tests or other errors. This check only applies to Eagle. # This block requires the "Eagle.Library" package. # if {[isEagle] && [llength [info commands object]] > 0} then { | > | | | | | | | | | > | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | # # NOTE: Verify that the current call frame is correct and that the # interpreter call stack has not been imbalanced by previous # tests or other errors. This check only applies to Eagle. # This block requires the "Eagle.Library" package. # if {[isEagle] && [llength [info commands object]] > 0} then { catch { # # NOTE: Check the name of the current call frame against the one # that should be used for evaluating this script file. # if {[object invoke -flags +NonPublic \ Interpreter.GetActive.CurrentFrame Name] ne \ [list source [file normalize [info script]]]} then { unset -nocomplain test_suite_running error "cannot run, current frame is not for this script" } } } ############################################################################# # # NOTE: Set the local root directory of the source checkout (i.e. of Eagle |
︙ | ︙ | |||
319 320 321 322 323 324 325 | set test_flags(-stopOnLeak) ""; # default to continue on leak. set test_flags(-exitOnComplete) ""; # default to not exit after complete. set test_flags(-preTest) ""; # default to not evaluating anything. set test_flags(-postTest) ""; # default to not evaluating anything. set test_flags(-preWait) ""; # default to not waiting. set test_flags(-postWait) ""; # default to not waiting. set test_flags(-tclsh) ""; # Tcl shell, default to empty. | < < | | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | set test_flags(-stopOnLeak) ""; # default to continue on leak. set test_flags(-exitOnComplete) ""; # default to not exit after complete. set test_flags(-preTest) ""; # default to not evaluating anything. set test_flags(-postTest) ""; # default to not evaluating anything. set test_flags(-preWait) ""; # default to not waiting. set test_flags(-postWait) ""; # default to not waiting. set test_flags(-tclsh) ""; # Tcl shell, default to empty. # # NOTE: Check for and process any command line arguments. # if {[info exists argv]} then { eval processTestArguments test_flags $argv if {[info exists test_flags(-no)] && \ [string length $test_flags(-no)] > 0} then { # # NOTE: Set the test run restrictions based on the provided command line # argument value (which is assumed to be a "dictionary-style" list # containing name/value pairs to add to the global "no" array). |
︙ | ︙ | |||
745 746 747 748 749 750 751 | tputs $test_channel [appendArgs "---- executable: \"" \ $bin_file \"\n] tputs $test_channel [appendArgs "---- command line: " \ [expr {[info exists argv] && [string length $argv] > 0 ? \ $argv : "<none>"}] \n] | < < < < < | 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | tputs $test_channel [appendArgs "---- executable: \"" \ $bin_file \"\n] tputs $test_channel [appendArgs "---- command line: " \ [expr {[info exists argv] && [string length $argv] > 0 ? \ $argv : "<none>"}] \n] tputs $test_channel [appendArgs "---- logging to: " \ [expr {[info exists test_log] && [string length $test_log] > 0 ? \ [appendArgs \" $test_log \"] : "<none>"}] \n] tputs $test_channel [appendArgs "---- pass threshold: " \ [expr {[info exists test_threshold] && \ [string is integer -strict $test_threshold] ? \ |
︙ | ︙ | |||
901 902 903 904 905 906 907 908 909 910 911 912 913 914 | # "debug-1.4", "glob-99.*", "object-10.*", "perf-2.2", # and various other places within the test suite code # itself. # checkForQuiet $test_channel false } # # NOTE: Has administrator detection support been disabled? We do # this check [nearly] first as it may [eventually] be used # to help determine if other constraints should be skipped. # if {![info exists no(administrator)]} then { checkForAdministrator $test_channel | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | # "debug-1.4", "glob-99.*", "object-10.*", "perf-2.2", # and various other places within the test suite code # itself. # checkForQuiet $test_channel false } # # NOTE: Has strong name key detection been disabled? # if {![info exists no(strongNameKey)]} then { catch {info engine PublicKeyToken} publicKeyToken if {[string length $publicKeyToken] == 0} then { # # NOTE: The Eagle core library is not signed with a strong name key. # This is not an error, per se; however, it may cause selected # tests to fail and it should be reported to the user and noted # in the test suite log file. # addConstraint strongName.none if {![info exists no(warningForStrongNameKey)] && \ ![haveConstraint quiet]} then { tputs $test_channel \ "==== WARNING: no Eagle strong name signature detected...\n" } } else { # # NOTE: Add a test constraint for this specific strong name key. # addConstraint [appendArgs strongName. $publicKeyToken] # # BUGBUG: Tcl 8.4 does not seem to like this expression because it # contains the "ni" operator added in Tcl 8.5 (and Tcl 8.4 # tries to compile it even though it will only be evaluated # in Eagle). # set expr {$publicKeyToken ni \ "29c6297630be05eb 1e22ec67879739a2 358030063a832bc3"} if {[expr $expr]} then { # # NOTE: The Eagle core library is strong name signed with a key that # is not official. This is also not an error, per se; however, # it may cause some tests to fail and it should be reported to # the user and noted in the test suite log file. # addConstraint strongName.unofficial if {![info exists no(warningForStrongNameKey)] && \ ![haveConstraint quiet]} then { tputs $test_channel [appendArgs \ "==== WARNING: unofficial Eagle strong name signature " \ "detected: " $publicKeyToken \n] } } else { # # NOTE: Several tests require one of the official strong name keys to # be used in order for them to pass. # addConstraint strongName.official tputs $test_channel [appendArgs \ "---- official Eagle strong name signature detected: " \ $publicKeyToken \n] } unset expr } unset publicKeyToken } # # NOTE: Has administrator detection support been disabled? We do # this check [nearly] first as it may [eventually] be used # to help determine if other constraints should be skipped. # if {![info exists no(administrator)]} then { checkForAdministrator $test_channel |
︙ | ︙ | |||
992 993 994 995 996 997 998 | if {![info exists no(machine)]} then { checkForMachine $test_channel 32 intel; # (i.e. x86) checkForMachine $test_channel 32 arm; # (i.e. arm) checkForMachine $test_channel 64 ia64; # (i.e. itanium) checkForMachine $test_channel 64 amd64; # (i.e. x64) } | < < < < < < < | 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 | if {![info exists no(machine)]} then { checkForMachine $test_channel 32 intel; # (i.e. x86) checkForMachine $test_channel 32 arm; # (i.e. arm) checkForMachine $test_channel 64 ia64; # (i.e. itanium) checkForMachine $test_channel 64 amd64; # (i.e. x64) } # # NOTE: Has culture detection support been disabled? # if {![info exists no(culture)]} then { checkForCulture $test_channel } |
︙ | ︙ | |||
1027 1028 1029 1030 1031 1032 1033 | # # NOTE: Has strong name detection support been disabled? # if {![info exists no(strongName)]} then { checkForStrongName $test_channel } | < < < < < < < | 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | # # NOTE: Has strong name detection support been disabled? # if {![info exists no(strongName)]} then { checkForStrongName $test_channel } # # NOTE: Has certificate detection support been disabled? # if {![info exists no(certificate)]} then { checkForCertificate $test_channel } |
︙ | ︙ | |||
1580 1581 1582 1583 1584 1585 1586 | # # NOTE: For test "lpermute-1.3". # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestPermute* } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 | # # NOTE: For test "lpermute-1.3". # checkForObjectMember $test_channel Eagle._Tests.Default \ *TestPermute* } # # NOTE: Has DateTime testing support been disabled? # if {![info exists no(testDateTime)]} then { # # NOTE: For test "vwait-1.11". # |
︙ | ︙ | |||
2117 2118 2119 2120 2121 2122 2123 | # # NOTE: For test "hash-1.1". # checkForNetFx20ServicePack $test_channel } # | | | | | 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 | # # NOTE: For test "hash-1.1". # checkForNetFx20ServicePack $test_channel } # # NOTE: Has .NET Framework 4.5 testing support been disabled? # if {![info exists no(netFx45)]} then { # # NOTE: For test "object-12.1.*". # checkForNetFx45 $test_channel } # # NOTE: Has target framework testing support been disabled? # if {![info exists no(targetFramework)]} then { checkForTargetFramework $test_channel |
︙ | ︙ | |||
2353 2354 2355 2356 2357 2358 2359 | # # NOTE: For tests "benchmark-1.3[89]" and "benchmark-1.40". # if {![info exists no(benchmark.txt)]} then { checkForFile $test_channel [file join $test_data_path benchmark.txt] } | < < < < < < < < < < < < < < | 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 | # # NOTE: For tests "benchmark-1.3[89]" and "benchmark-1.40". # if {![info exists no(benchmark.txt)]} then { checkForFile $test_channel [file join $test_data_path benchmark.txt] } # # NOTE: For test "garuda-1.1". # if {![info exists no(pkgAll.tcl)]} then { checkForFile $test_channel [file join $base_path Native Package \ Tests all.tcl] pkgAll.tcl } # # NOTE: For tests "subst-1.*". # if {![info exists no(bad_subst.txt)]} then { checkForFile $test_channel [file join $test_data_path bad_subst.txt] } # # NOTE: This is not currently used by any tests. # if {![info exists no(evaluate.eagle)]} then { checkForFile $test_channel [file join $test_data_path evaluate.eagle] } |
︙ | ︙ | |||
2636 2637 2638 2639 2640 2641 2642 | checkForBigLists $test_channel } if {![info exists no(checkForTimeIntensive)]} then { checkForTimeIntensive $test_channel } | < < < < | 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 | checkForBigLists $test_channel } if {![info exists no(checkForTimeIntensive)]} then { checkForTimeIntensive $test_channel } if {![info exists no(checkForMemoryIntensive)]} then { checkForMemoryIntensive $test_channel } if {![info exists no(checkForStackIntensive)]} then { checkForStackIntensive $test_channel } |
︙ | ︙ |
Changes to SQLite.Interop/src/ext/fts5.c.
︙ | ︙ | |||
40 41 42 43 44 45 46 | ** ** Virtual table implementations may overload SQL functions by implementing ** the sqlite3_module.xFindFunction() method. */ typedef struct Fts5ExtensionApi Fts5ExtensionApi; typedef struct Fts5Context Fts5Context; | < < < < < < | | | < < < < < < < < | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | ** ** Virtual table implementations may overload SQL functions by implementing ** the sqlite3_module.xFindFunction() method. */ typedef struct Fts5ExtensionApi Fts5ExtensionApi; typedef struct Fts5Context Fts5Context; typedef void (*fts5_extension_function)( const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ Fts5Context *pFts, /* First arg to pass to pApi functions */ sqlite3_context *pCtx, /* Context for returning result/error */ int nVal, /* Number of values in apVal[] array */ sqlite3_value **apVal /* Array of trailing arguments */ ); /* ** EXTENSION API FUNCTIONS ** ** xUserData(pFts): ** Return a copy of the context pointer the extension function was ** registered with. ** ** xColumnTotalSize(pFts, iCol, pnToken): ** If parameter iCol is less than zero, set output variable *pnToken ** to the total number of tokens in the FTS5 table. Or, if iCol is ** non-negative but less than the number of columns in the table, return ** the total number of tokens in column iCol, considering all rows in ** the FTS5 table. ** ** If parameter iCol is greater than or equal to the number of columns ** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. ** an OOM condition or IO error), an appropriate SQLite error code is ** returned. ** ** xColumnCount: ** Returns the number of columns in the FTS5 table. ** ** xColumnSize: ** Reports the size in tokens of a column value from the current row. ** ** xColumnText: ** This function attempts to retrieve the text of column iCol of the ** current document. If successful, (*pz) is set to point to a buffer ** containing the text in utf-8 encoding, (*pn) is set to the size in bytes ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, ** if an error occurs, an SQLite error code is returned and the final values |
︙ | ︙ | |||
188 189 190 191 192 193 194 | ** ** xRowCount(pFts5, pnRow) ** ** This function is used to retrieve the total number of rows in the table. ** In other words, the same value that would be returned by: ** ** SELECT count(*) FROM ftstable; | < < < < < < < < < < < < < < < < < < < < < < < < | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | ** ** xRowCount(pFts5, pnRow) ** ** This function is used to retrieve the total number of rows in the table. ** In other words, the same value that would be returned by: ** ** SELECT count(*) FROM ftstable; */ struct Fts5ExtensionApi { int iVersion; /* Currently always set to 1 */ void *(*xUserData)(Fts5Context*); int (*xColumnCount)(Fts5Context*); |
︙ | ︙ | |||
243 244 245 246 247 248 249 | int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) ); int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); void *(*xGetAuxdata)(Fts5Context*, int bClear); | < < < | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) ); int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); void *(*xGetAuxdata)(Fts5Context*, int bClear); }; /* ** CUSTOM AUXILIARY FUNCTIONS *************************************************************************/ /************************************************************************* |
︙ | ︙ | |||
523 524 525 526 527 528 529 | char *zRankArgs; /* Arguments to rank function */ /* If non-NULL, points to sqlite3_vtab.base.zErrmsg. Often NULL. */ char **pzErrmsg; }; /* Current expected value of %_config table 'version' field */ | | | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | char *zRankArgs; /* Arguments to rank function */ /* If non-NULL, points to sqlite3_vtab.base.zErrmsg. Often NULL. */ char **pzErrmsg; }; /* Current expected value of %_config table 'version' field */ #define FTS5_CURRENT_VERSION 2 #define FTS5_CONTENT_NORMAL 0 #define FTS5_CONTENT_NONE 1 #define FTS5_CONTENT_EXTERNAL 2 |
︙ | ︙ | |||
676 677 678 679 680 681 682 | ** sqlite3Fts5IterNext(pIter) ** ){ ** i64 iRowid = sqlite3Fts5IterRowid(pIter); ** } */ /* | | | 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | ** sqlite3Fts5IterNext(pIter) ** ){ ** i64 iRowid = sqlite3Fts5IterRowid(pIter); ** } */ /* ** Open a new iterator to iterate though all docids that match the ** specified token or token prefix. */ static int sqlite3Fts5IndexQuery( Fts5Index *p, /* FTS index to query */ const char *pToken, int nToken, /* Token (or prefix) to query for */ int flags, /* Mask of FTS5INDEX_QUERY_X flags */ Fts5IndexIter **ppIter |
︙ | ︙ | |||
1972 1973 1974 1975 1976 1977 1978 | ** ** This is an SQLite module implementing full-text search. */ | | | 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 | ** ** This is an SQLite module implementing full-text search. */ #define FTS5_DEFAULT_PAGE_SIZE 1000 #define FTS5_DEFAULT_AUTOMERGE 4 #define FTS5_DEFAULT_CRISISMERGE 16 /* Maximum allowed page size */ #define FTS5_MAX_PAGE_SIZE (128*1024) static int fts5_iswhitespace(char x){ |
︙ | ︙ | |||
2851 2852 2853 2854 2855 2856 2857 | static void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64)); static void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*)); static void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*); struct Fts5Expr { Fts5Index *pIndex; Fts5ExprNode *pRoot; | | | 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 | static void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64)); static void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*)); static void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*); struct Fts5Expr { Fts5Index *pIndex; Fts5ExprNode *pRoot; int bDesc; /* Iterate in descending docid order */ int nPhrase; /* Number of phrases in expression */ Fts5ExprPhrase **apExprPhrase; /* Pointers to phrase objects */ }; /* ** eType: ** Expression node type. Always one of: |
︙ | ︙ | |||
4682 4683 4684 4685 4686 4687 4688 | const char **azConfig; /* Array of arguments for Fts5Config */ const char *zNearsetCmd = "nearset"; int nConfig; /* Size of azConfig[] */ Fts5Config *pConfig = 0; int iArg = 1; | < < < < < < < < < | 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 | const char **azConfig; /* Array of arguments for Fts5Config */ const char *zNearsetCmd = "nearset"; int nConfig; /* Size of azConfig[] */ Fts5Config *pConfig = 0; int iArg = 1; if( bTcl && nArg>1 ){ zNearsetCmd = (const char*)sqlite3_value_text(apVal[1]); iArg = 2; } nConfig = 3 + (nArg-iArg); azConfig = (const char**)sqlite3_malloc(sizeof(char*) * nConfig); |
︙ | ︙ | |||
4829 4830 4831 4832 4833 4834 4835 | return rc; } /* ** Return the number of phrases in expression pExpr. */ static int sqlite3Fts5ExprPhraseCount(Fts5Expr *pExpr){ | | | 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 | return rc; } /* ** Return the number of phrases in expression pExpr. */ static int sqlite3Fts5ExprPhraseCount(Fts5Expr *pExpr){ return pExpr->nPhrase; } /* ** Return the number of terms in the iPhrase'th phrase in pExpr. */ static int sqlite3Fts5ExprPhraseSize(Fts5Expr *pExpr, int iPhrase){ if( iPhrase<0 || iPhrase>=pExpr->nPhrase ) return 0; |
︙ | ︙ | |||
4994 4995 4996 4997 4998 4999 5000 | sqlite3_free(pSlot); } } memset(pHash->aSlot, 0, pHash->nSlot * sizeof(Fts5HashEntry*)); pHash->nEntry = 0; } | | | | 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 | sqlite3_free(pSlot); } } memset(pHash->aSlot, 0, pHash->nSlot * sizeof(Fts5HashEntry*)); pHash->nEntry = 0; } static unsigned int fts5HashKey(int nSlot, const char *p, int n){ int i; unsigned int h = 13; for(i=n-1; i>=0; i--){ h = (h << 3) ^ h ^ p[i]; } return (h % nSlot); } static unsigned int fts5HashKey2(int nSlot, char b, const char *p, int n){ int i; unsigned int h = 13; for(i=n-1; i>=0; i--){ h = (h << 3) ^ h ^ p[i]; } h = (h << 3) ^ h ^ b; return (h % nSlot); |
︙ | ︙ | |||
5031 5032 5033 5034 5035 5036 5037 | memset(apNew, 0, nNew*sizeof(Fts5HashEntry*)); for(i=0; i<pHash->nSlot; i++){ while( apOld[i] ){ int iHash; Fts5HashEntry *p = apOld[i]; apOld[i] = p->pHashNext; | | | 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 | memset(apNew, 0, nNew*sizeof(Fts5HashEntry*)); for(i=0; i<pHash->nSlot; i++){ while( apOld[i] ){ int iHash; Fts5HashEntry *p = apOld[i]; apOld[i] = p->pHashNext; iHash = fts5HashKey(nNew, p->zKey, strlen(p->zKey)); p->pHashNext = apNew[iHash]; apNew[iHash] = p; } } sqlite3_free(apOld); pHash->nSlot = nNew; |
︙ | ︙ | |||
5071 5072 5073 5074 5075 5076 5077 | Fts5Hash *pHash, i64 iRowid, /* Rowid for this entry */ int iCol, /* Column token appears in (-ve -> delete) */ int iPos, /* Position of token within column */ char bByte, /* First byte of token */ const char *pToken, int nToken /* Token to add or remove to or from index */ ){ | | < | | | 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 | Fts5Hash *pHash, i64 iRowid, /* Rowid for this entry */ int iCol, /* Column token appears in (-ve -> delete) */ int iPos, /* Position of token within column */ char bByte, /* First byte of token */ const char *pToken, int nToken /* Token to add or remove to or from index */ ){ unsigned int iHash = fts5HashKey2(pHash->nSlot, bByte, pToken, nToken); Fts5HashEntry *p; u8 *pPtr; int nIncr = 0; /* Amount to increment (*pHash->pnByte) by */ /* Attempt to locate an existing hash entry */ for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){ if( p->zKey[0]==bByte && memcmp(&p->zKey[1], pToken, nToken)==0 && p->zKey[nToken+1]==0 ){ break; } } /* If an existing hash entry cannot be found, create a new one. */ if( p==0 ){ int nByte = FTS5_HASHENTRYSIZE + (nToken+1) + 1 + 64; if( nByte<128 ) nByte = 128; if( (pHash->nEntry*2)>=pHash->nSlot ){ int rc = fts5HashResize(pHash); if( rc!=SQLITE_OK ) return rc; iHash = fts5HashKey2(pHash->nSlot, bByte, pToken, nToken); } p = (Fts5HashEntry*)sqlite3_malloc(nByte); if( !p ) return SQLITE_NOMEM; memset(p, 0, FTS5_HASHENTRYSIZE); p->nAlloc = nByte; p->zKey[0] = bByte; memcpy(&p->zKey[1], pToken, nToken); assert( iHash==fts5HashKey(pHash->nSlot, p->zKey, nToken+1) ); p->zKey[nToken+1] = '\0'; p->nData = nToken+1 + 1 + FTS5_HASHENTRYSIZE; p->nData += sqlite3Fts5PutVarint(&((u8*)p)[p->nData], iRowid); p->iSzPoslist = p->nData; p->nData += 1; p->iRowid = iRowid; p->pHashNext = pHash->aSlot[iHash]; |
︙ | ︙ | |||
5276 5277 5278 5279 5280 5281 5282 | */ static int sqlite3Fts5HashQuery( Fts5Hash *pHash, /* Hash table to query */ const char *pTerm, int nTerm, /* Query term */ const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */ int *pnDoclist /* OUT: Size of doclist in bytes */ ){ | | | 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 | */ static int sqlite3Fts5HashQuery( Fts5Hash *pHash, /* Hash table to query */ const char *pTerm, int nTerm, /* Query term */ const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */ int *pnDoclist /* OUT: Size of doclist in bytes */ ){ unsigned int iHash = fts5HashKey(pHash->nSlot, pTerm, nTerm); Fts5HashEntry *p; for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){ if( memcmp(p->zKey, pTerm, nTerm)==0 && p->zKey[nTerm]==0 ) break; } if( p ){ |
︙ | ︙ | |||
5367 5368 5369 5370 5371 5372 5373 | ** * all segment b-tree leaf data is stored in fixed size page records ** (e.g. 1000 bytes). A single doclist may span multiple pages. Care is ** taken to ensure it is possible to iterate in either direction through ** the entries in a doclist, or to seek to a specific entry within a ** doclist, without loading it into memory. ** ** * large doclists that span many pages have associated "doclist index" | | | 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 | ** * all segment b-tree leaf data is stored in fixed size page records ** (e.g. 1000 bytes). A single doclist may span multiple pages. Care is ** taken to ensure it is possible to iterate in either direction through ** the entries in a doclist, or to seek to a specific entry within a ** doclist, without loading it into memory. ** ** * large doclists that span many pages have associated "doclist index" ** records that contain a copy of the first docid on each page spanned by ** the doclist. This is used to speed up seek operations, and merges of ** large doclists with very small doclists. ** ** * extra fields in the "structure record" record the state of ongoing ** incremental merge operations. ** */ |
︙ | ︙ | |||
5544 5545 5546 5547 5548 5549 5550 | ** is: ** ** * Flags byte. Bits are: ** 0x01: Clear if leaf is also the root page, otherwise set. ** ** * Page number of fts index leaf page. As a varint. ** | | | | | | 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 | ** is: ** ** * Flags byte. Bits are: ** 0x01: Clear if leaf is also the root page, otherwise set. ** ** * Page number of fts index leaf page. As a varint. ** ** * First docid on page indicated by previous field. As a varint. ** ** * A list of varints, one for each subsequent termless page. A ** positive delta if the termless page contains at least one docid, ** or an 0x00 byte otherwise. ** ** Internal doclist index nodes are: ** ** * Flags byte. Bits are: ** 0x01: Clear for root page, otherwise set. ** ** * Page number of first child page. As a varint. ** ** * Copy of first docid on page indicated by previous field. As a varint. ** ** * A list of delta-encoded varints - the first docid on each subsequent ** child page. ** */ /* ** Rowids for the averages and structure records in the %_data table. */ |
︙ | ︙ | |||
5621 5622 5623 5624 5625 5626 5627 | /* ** Each time a blob is read from the %_data table, it is padded with this ** many zero bytes. This makes it easier to decode the various record formats ** without overreading if the records are corrupt. */ #define FTS5_DATA_ZERO_PADDING 8 | < > > | 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 | /* ** Each time a blob is read from the %_data table, it is padded with this ** many zero bytes. This makes it easier to decode the various record formats ** without overreading if the records are corrupt. */ #define FTS5_DATA_ZERO_PADDING 8 typedef struct Fts5BtreeIter Fts5BtreeIter; typedef struct Fts5BtreeIterLevel Fts5BtreeIterLevel; typedef struct Fts5Data Fts5Data; typedef struct Fts5DlidxIter Fts5DlidxIter; typedef struct Fts5DlidxLvl Fts5DlidxLvl; typedef struct Fts5DlidxWriter Fts5DlidxWriter; typedef struct Fts5NodeIter Fts5NodeIter; typedef struct Fts5PageWriter Fts5PageWriter; typedef struct Fts5SegIter Fts5SegIter; |
︙ | ︙ | |||
5666 5667 5668 5669 5670 5671 5672 | /* Error state. */ int rc; /* Current error code */ /* State used by the fts5DataXXX() functions. */ sqlite3_blob *pReader; /* RO incr-blob open on %_data table */ sqlite3_stmt *pWriter; /* "INSERT ... %_data VALUES(?,?)" */ sqlite3_stmt *pDeleter; /* "DELETE FROM %_data ... id>=? AND id<=?" */ | < < < | 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 | /* Error state. */ int rc; /* Current error code */ /* State used by the fts5DataXXX() functions. */ sqlite3_blob *pReader; /* RO incr-blob open on %_data table */ sqlite3_stmt *pWriter; /* "INSERT ... %_data VALUES(?,?)" */ sqlite3_stmt *pDeleter; /* "DELETE FROM %_data ... id>=? AND id<=?" */ int nRead; /* Total number of blocks read */ }; struct Fts5DoclistIter { u8 *a; int n; int i; |
︙ | ︙ | |||
5718 5719 5720 5721 5722 5723 5724 | int pgno; /* Page number for this page */ Fts5Buffer buf; /* Buffer containing page data */ Fts5Buffer term; /* Buffer containing previous term on page */ }; struct Fts5DlidxWriter { int pgno; /* Page number for this page */ int bPrevValid; /* True if iPrev is valid */ | | | > | < < < < | | 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 | int pgno; /* Page number for this page */ Fts5Buffer buf; /* Buffer containing page data */ Fts5Buffer term; /* Buffer containing previous term on page */ }; struct Fts5DlidxWriter { int pgno; /* Page number for this page */ int bPrevValid; /* True if iPrev is valid */ i64 iPrev; /* Previous docid value written to page */ Fts5Buffer buf; /* Buffer containing page data */ }; struct Fts5SegWriter { int iSegid; /* Segid to write to */ int nWriter; /* Number of entries in aWriter */ Fts5PageWriter *aWriter; /* Array of PageWriter objects */ i64 iPrevRowid; /* Previous docid written to current leaf */ u8 bFirstRowidInDoclist; /* True if next rowid is first in doclist */ u8 bFirstRowidInPage; /* True if next rowid is first in page */ u8 bFirstTermInPage; /* True if next term will be first in leaf */ int nLeafWritten; /* Number of leaf pages written */ int nEmpty; /* Number of contiguous term-less nodes */ int nDlidx; /* Allocated size of aDlidx[] array */ Fts5DlidxWriter *aDlidx; /* Array of Fts5DlidxWriter objects */ }; /* ** Object for iterating through the merged results of one or more segments, ** visiting each term/docid pair in the merged data. ** ** nSeg is always a power of two greater than or equal to the number of ** segments that this object is merging data from. Both the aSeg[] and ** aFirst[] arrays are sized at nSeg entries. The aSeg[] array is padded ** with zeroed objects - these are handled as if they were iterators opened ** on empty segments. ** |
︙ | ︙ | |||
5766 5767 5768 5769 5770 5771 5772 | typedef struct Fts5CResult Fts5CResult; struct Fts5CResult { u16 iFirst; /* aSeg[] index of firstest iterator */ u8 bTermEq; /* True if the terms are equal */ }; /* | | | 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 | typedef struct Fts5CResult Fts5CResult; struct Fts5CResult { u16 iFirst; /* aSeg[] index of firstest iterator */ u8 bTermEq; /* True if the terms are equal */ }; /* ** Object for iterating through a single segment, visiting each term/docid ** pair in the segment. ** ** pSeg: ** The segment to iterate through. ** ** iLeafPgno: ** Current leaf page number within segment. |
︙ | ︙ | |||
5798 5799 5800 5801 5802 5803 5804 | ** ** FTS5_SEGITER_ONETERM: ** If set, set the iterator to point to EOF after the current doclist ** has been exhausted. Do not proceed to the next term in the segment. ** ** FTS5_SEGITER_REVERSE: ** This flag is only ever set if FTS5_SEGITER_ONETERM is also set. If | | | 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 | ** ** FTS5_SEGITER_ONETERM: ** If set, set the iterator to point to EOF after the current doclist ** has been exhausted. Do not proceed to the next term in the segment. ** ** FTS5_SEGITER_REVERSE: ** This flag is only ever set if FTS5_SEGITER_ONETERM is also set. If ** it is set, iterate through docids in descending order instead of the ** default ascending order. ** ** iRowidOffset/nRowidOffset/aRowidOffset: ** These are used if the FTS5_SEGITER_REVERSE flag is set. ** ** For each rowid on the page corresponding to the current term, the ** corresponding aRowidOffset[] entry is set to the byte offset of the |
︙ | ︙ | |||
5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 | struct Fts5DlidxIter { int nLvl; int iSegid; Fts5DlidxLvl aLvl[1]; }; /* ** The first argument passed to this macro is a pointer to an Fts5Buffer ** object. */ #define fts5BufferSize(pBuf,n) { \ if( pBuf->nSpace<n ) { \ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 | struct Fts5DlidxIter { int nLvl; int iSegid; Fts5DlidxLvl aLvl[1]; }; /* ** An Fts5BtreeIter object is used to iterate through all entries in the ** b-tree hierarchy belonging to a single fts5 segment. In this case the ** "b-tree hierarchy" is all b-tree nodes except leaves. Each entry in the ** b-tree hierarchy consists of the following: ** ** iLeaf: The page number of the leaf page the entry points to. ** ** term: A split-key that all terms on leaf page $iLeaf must be greater ** than or equal to. The "term" associated with the first b-tree ** hierarchy entry (the one that points to leaf page 1) is always ** an empty string. ** ** nEmpty: The number of empty (termless) leaf pages that immediately ** following iLeaf. ** ** The Fts5BtreeIter object is only used as part of the integrity-check code. */ struct Fts5BtreeIterLevel { Fts5NodeIter s; /* Iterator for the current node */ Fts5Data *pData; /* Data for the current node */ }; struct Fts5BtreeIter { Fts5Index *p; /* FTS5 backend object */ Fts5StructureSegment *pSeg; /* Iterate through this segment's b-tree */ int nLvl; /* Size of aLvl[] array */ Fts5BtreeIterLevel *aLvl; /* Level for each tier of b-tree */ /* Output variables */ Fts5Buffer term; /* Current term */ int iLeaf; /* Leaf containing terms >= current term */ int nEmpty; /* Number of "empty" leaves following iLeaf */ int bEof; /* Set to true at EOF */ int bDlidx; /* True if there exists a dlidx */ }; /* ** The first argument passed to this macro is a pointer to an Fts5Buffer ** object. */ #define fts5BufferSize(pBuf,n) { \ if( pBuf->nSpace<n ) { \ |
︙ | ︙ | |||
6050 6051 6052 6053 6054 6055 6056 | fts5BufferSize(pBuf, MAX(nByte, p->pConfig->pgsz) + 20); pBuf->n = nByte; aOut = pBuf->p; if( aOut==0 ){ rc = SQLITE_NOMEM; } }else{ | | | 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 | fts5BufferSize(pBuf, MAX(nByte, p->pConfig->pgsz) + 20); pBuf->n = nByte; aOut = pBuf->p; if( aOut==0 ){ rc = SQLITE_NOMEM; } }else{ int nSpace = nByte + FTS5_DATA_ZERO_PADDING; pRet = (Fts5Data*)sqlite3_malloc(nSpace+sizeof(Fts5Data)); if( pRet ){ pRet->n = nByte; aOut = pRet->p = (u8*)&pRet[1]; }else{ rc = SQLITE_NOMEM; } |
︙ | ︙ | |||
6106 6107 6108 6109 6110 6111 6112 | /* ** Release a reference to data record returned by an earlier call to ** fts5DataRead(). */ static void fts5DataRelease(Fts5Data *pData){ sqlite3_free(pData); } | < < < < < < < < < < < < < < < < < | | < | > > > > > > | > | < | 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 | /* ** Release a reference to data record returned by an earlier call to ** fts5DataRead(). */ static void fts5DataRelease(Fts5Data *pData){ sqlite3_free(pData); } /* ** INSERT OR REPLACE a record into the %_data table. */ static void fts5DataWrite(Fts5Index *p, i64 iRowid, const u8 *pData, int nData){ if( p->rc!=SQLITE_OK ) return; if( p->pWriter==0 ){ int rc = SQLITE_OK; Fts5Config *pConfig = p->pConfig; char *zSql = sqlite3Fts5Mprintf(&rc, "REPLACE INTO '%q'.%Q(id, block) VALUES(?,?)", pConfig->zDb, p->zDataTbl ); if( zSql ){ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &p->pWriter, 0); sqlite3_free(zSql); } if( rc!=SQLITE_OK ){ p->rc = rc; return; } } sqlite3_bind_int64(p->pWriter, 1, iRowid); sqlite3_bind_blob(p->pWriter, 2, pData, nData, SQLITE_STATIC); sqlite3_step(p->pWriter); p->rc = sqlite3_reset(p->pWriter); } /* ** Execute the following SQL: ** ** DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast */ static void fts5DataDelete(Fts5Index *p, i64 iFirst, i64 iLast){ if( p->rc!=SQLITE_OK ) return; if( p->pDeleter==0 ){ int rc; Fts5Config *pConfig = p->pConfig; char *zSql = sqlite3_mprintf( "DELETE FROM '%q'.%Q WHERE id>=? AND id<=?", pConfig->zDb, p->zDataTbl ); if( zSql==0 ){ rc = SQLITE_NOMEM; }else{ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &p->pDeleter, 0); sqlite3_free(zSql); } |
︙ | ︙ | |||
6186 6187 6188 6189 6190 6191 6192 | /* ** Remove all records associated with segment iSegid. */ static void fts5DataRemoveSegment(Fts5Index *p, int iSegid){ i64 iFirst = FTS5_SEGMENT_ROWID(iSegid, 0, 0); i64 iLast = FTS5_SEGMENT_ROWID(iSegid+1, 0, 0)-1; fts5DataDelete(p, iFirst, iLast); | < < < < < < < < < < < < | 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 | /* ** Remove all records associated with segment iSegid. */ static void fts5DataRemoveSegment(Fts5Index *p, int iSegid){ i64 iFirst = FTS5_SEGMENT_ROWID(iSegid, 0, 0); i64 iLast = FTS5_SEGMENT_ROWID(iSegid+1, 0, 0)-1; fts5DataDelete(p, iFirst, iLast); } /* ** Release a reference to an Fts5Structure object returned by an earlier ** call to fts5StructureRead() or fts5StructureDecode(). */ static void fts5StructureRelease(Fts5Structure *pStruct){ |
︙ | ︙ | |||
7573 7574 7575 7576 7577 7578 7579 | } iOff += nNew; /* Skip past the doclist. If the end of the page is reached, bail out. */ while( 1 ){ int nPos; | | | 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 | } iOff += nNew; /* Skip past the doclist. If the end of the page is reached, bail out. */ while( 1 ){ int nPos; /* Skip past docid delta */ fts5IndexSkipVarint(a, iOff); /* Skip past position list */ fts5IndexGetVarint32(a, iOff, nPos); iOff += (nPos >> 1); if( iOff>=(n-1) ){ iOff = n; |
︙ | ︙ | |||
7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 | Fts5Buffer *pBuf, /* Buffer to use for loading pages */ const u8 *pTerm, int nTerm, /* Term to seek to */ int flags, /* Mask of FTS5INDEX_XXX flags */ Fts5StructureSegment *pSeg, /* Description of segment */ Fts5SegIter *pIter /* Object to populate */ ){ int iPg = 1; int bGe = (flags & FTS5INDEX_QUERY_SCAN); int bDlidx = 0; /* True if there is a doclist-index */ static int nCall = 0; nCall++; assert( bGe==0 || (flags & FTS5INDEX_QUERY_DESC)==0 ); assert( pTerm && nTerm ); memset(pIter, 0, sizeof(*pIter)); pIter->pSeg = pSeg; /* This block sets stack variable iPg to the leaf page number that may ** contain term (pTerm/nTerm), if it is present in the segment. */ | > | | < < < | < < | < | < < < < < | 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 | Fts5Buffer *pBuf, /* Buffer to use for loading pages */ const u8 *pTerm, int nTerm, /* Term to seek to */ int flags, /* Mask of FTS5INDEX_XXX flags */ Fts5StructureSegment *pSeg, /* Description of segment */ Fts5SegIter *pIter /* Object to populate */ ){ int iPg = 1; int h; int bGe = (flags & FTS5INDEX_QUERY_SCAN); int bDlidx = 0; /* True if there is a doclist-index */ static int nCall = 0; nCall++; assert( bGe==0 || (flags & FTS5INDEX_QUERY_DESC)==0 ); assert( pTerm && nTerm ); memset(pIter, 0, sizeof(*pIter)); pIter->pSeg = pSeg; /* This block sets stack variable iPg to the leaf page number that may ** contain term (pTerm/nTerm), if it is present in the segment. */ for(h=pSeg->nHeight-1; h>0; h--){ i64 iRowid = FTS5_SEGMENT_ROWID(pSeg->iSegid, h, iPg); fts5DataBuffer(p, pBuf, iRowid); if( p->rc ) break; iPg = fts5NodeSeek(pBuf, pTerm, nTerm, &bDlidx); } if( iPg<pSeg->pgnoFirst ){ iPg = pSeg->pgnoFirst; bDlidx = 0; } pIter->iLeafPgno = iPg - 1; |
︙ | ︙ | |||
8505 8506 8507 8508 8509 8510 8511 | pWriter->nDlidx = nLvl; } } return p->rc; } /* | | < | | > | > > | | | | | | > > | | > | < < | < < < < < < < < | < | < < < > > > | | | > | > > | | | > > | | > > > > > > > | > > > | > | > > > > > > > > > > > > > > > > > > | 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 | pWriter->nDlidx = nLvl; } } return p->rc; } /* ** If an "nEmpty" record must be written to the b-tree before the next ** term, write it now. */ static void fts5WriteBtreeNEmpty(Fts5Index *p, Fts5SegWriter *pWriter){ if( pWriter->nEmpty ){ int bFlag = 0; Fts5PageWriter *pPg; pPg = &pWriter->aWriter[1]; /* If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written ** to the database, also write the doclist-index to disk. */ if( pWriter->aDlidx[0].buf.n>0 && pWriter->nEmpty>=FTS5_MIN_DLIDX_SIZE ){ bFlag = 1; } fts5WriteDlidxClear(p, pWriter, bFlag); fts5BufferAppendVarint(&p->rc, &pPg->buf, bFlag); fts5BufferAppendVarint(&p->rc, &pPg->buf, pWriter->nEmpty); pWriter->nEmpty = 0; }else{ fts5WriteDlidxClear(p, pWriter, 0); } assert( pWriter->nDlidx==0 || pWriter->aDlidx[0].buf.n==0 ); assert( pWriter->nDlidx==0 || pWriter->aDlidx[0].bPrevValid==0 ); } static void fts5WriteBtreeGrow(Fts5Index *p, Fts5SegWriter *pWriter){ if( p->rc==SQLITE_OK ){ Fts5PageWriter *aNew; Fts5PageWriter *pNew; int nNew = sizeof(Fts5PageWriter) * (pWriter->nWriter+1); aNew = (Fts5PageWriter*)sqlite3_realloc(pWriter->aWriter, nNew); if( aNew==0 ){ p->rc = SQLITE_NOMEM; return; } pNew = &aNew[pWriter->nWriter]; memset(pNew, 0, sizeof(Fts5PageWriter)); pNew->pgno = 1; fts5BufferAppendVarint(&p->rc, &pNew->buf, 1); pWriter->nWriter++; pWriter->aWriter = aNew; } } /* ** This is called once for each leaf page except the first that contains ** at least one term. Argument (nTerm/pTerm) is the split-key - a term that ** is larger than all terms written to earlier leaves, and equal to or ** smaller than the first term on the new leaf. ** ** If an error occurs, an error code is left in Fts5Index.rc. If an error ** has already occurred when this function is called, it is a no-op. */ static void fts5WriteBtreeTerm( Fts5Index *p, /* FTS5 backend object */ Fts5SegWriter *pWriter, /* Writer object */ int nTerm, const u8 *pTerm /* First term on new page */ ){ int iHeight; for(iHeight=1; 1; iHeight++){ Fts5PageWriter *pPage; if( iHeight>=pWriter->nWriter ){ fts5WriteBtreeGrow(p, pWriter); if( p->rc ) return; } pPage = &pWriter->aWriter[iHeight]; fts5WriteBtreeNEmpty(p, pWriter); if( pPage->buf.n>=p->pConfig->pgsz ){ /* pPage will be written to disk. The term will be written into the ** parent of pPage. */ i64 iRowid = FTS5_SEGMENT_ROWID(pWriter->iSegid, iHeight, pPage->pgno); fts5DataWrite(p, iRowid, pPage->buf.p, pPage->buf.n); fts5BufferZero(&pPage->buf); fts5BufferZero(&pPage->term); fts5BufferAppendVarint(&p->rc, &pPage->buf, pPage[-1].pgno); pPage->pgno++; }else{ int nPre = fts5PrefixCompress(pPage->term.n, pPage->term.p, nTerm, pTerm); fts5BufferAppendVarint(&p->rc, &pPage->buf, nPre+2); fts5BufferAppendVarint(&p->rc, &pPage->buf, nTerm-nPre); fts5BufferAppendBlob(&p->rc, &pPage->buf, nTerm-nPre, pTerm+nPre); fts5BufferSet(&p->rc, &pPage->term, nTerm, pTerm); break; } } } /* ** This function is called when flushing a leaf page that contains no ** terms at all to disk. */ static void fts5WriteBtreeNoTerm( |
︙ | ︙ | |||
8652 8653 8654 8655 8656 8657 8658 | }else{ bDone = 1; } if( pDlidx->bPrevValid ){ iVal = iRowid - pDlidx->iPrev; }else{ | | | | 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 | }else{ bDone = 1; } if( pDlidx->bPrevValid ){ iVal = iRowid - pDlidx->iPrev; }else{ i64 iPgno = (i==0 ? pWriter->aWriter[0].pgno : pDlidx[-1].pgno); assert( pDlidx->buf.n==0 ); sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, !bDone); sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, iPgno); iVal = iRowid; } sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, iVal); pDlidx->bPrevValid = 1; pDlidx->iPrev = iRowid; } } static void fts5WriteFlushLeaf(Fts5Index *p, Fts5SegWriter *pWriter){ static const u8 zero[] = { 0x00, 0x00, 0x00, 0x00 }; Fts5PageWriter *pPage = &pWriter->aWriter[0]; i64 iRowid; if( pWriter->bFirstTermInPage ){ /* No term was written to this page. */ assert( 0==fts5GetU16(&pPage->buf.p[2]) ); fts5WriteBtreeNoTerm(p, pWriter); } |
︙ | ︙ | |||
8706 8707 8708 8709 8710 8711 8712 | */ static void fts5WriteAppendTerm( Fts5Index *p, Fts5SegWriter *pWriter, int nTerm, const u8 *pTerm ){ int nPrefix; /* Bytes of prefix compression for term */ | | | | 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 | */ static void fts5WriteAppendTerm( Fts5Index *p, Fts5SegWriter *pWriter, int nTerm, const u8 *pTerm ){ int nPrefix; /* Bytes of prefix compression for term */ Fts5PageWriter *pPage = &pWriter->aWriter[0]; assert( pPage->buf.n==0 || pPage->buf.n>4 ); if( pPage->buf.n==0 ){ /* Zero the first term and first docid fields */ static const u8 zero[] = { 0x00, 0x00, 0x00, 0x00 }; fts5BufferAppendBlob(&p->rc, &pPage->buf, 4, zero); assert( pWriter->bFirstTermInPage ); } if( p->rc ) return; if( pWriter->bFirstTermInPage ){ |
︙ | ︙ | |||
8741 8742 8743 8744 8745 8746 8747 | ** copy of (pTerm/nTerm) into the parent node. This is slightly ** inefficient, but still correct. */ int n = nTerm; if( pPage->term.n ){ n = 1 + fts5PrefixCompress(pPage->term.n, pPage->term.p, nTerm, pTerm); } fts5WriteBtreeTerm(p, pWriter, n, pTerm); | | | 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 | ** copy of (pTerm/nTerm) into the parent node. This is slightly ** inefficient, but still correct. */ int n = nTerm; if( pPage->term.n ){ n = 1 + fts5PrefixCompress(pPage->term.n, pPage->term.p, nTerm, pTerm); } fts5WriteBtreeTerm(p, pWriter, n, pTerm); pPage = &pWriter->aWriter[0]; } }else{ nPrefix = fts5PrefixCompress(pPage->term.n, pPage->term.p, nTerm, pTerm); fts5BufferAppendVarint(&p->rc, &pPage->buf, nPrefix); } /* Append the number of bytes of new data, then the term data itself |
︙ | ︙ | |||
8770 8771 8772 8773 8774 8775 8776 | /* If the current leaf page is full, flush it to disk. */ if( pPage->buf.n>=p->pConfig->pgsz ){ fts5WriteFlushLeaf(p, pWriter); } } /* | | | | | | | 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 | /* If the current leaf page is full, flush it to disk. */ if( pPage->buf.n>=p->pConfig->pgsz ){ fts5WriteFlushLeaf(p, pWriter); } } /* ** Append a docid and position-list size field to the writers output. */ static void fts5WriteAppendRowid( Fts5Index *p, Fts5SegWriter *pWriter, i64 iRowid, int nPos ){ if( p->rc==SQLITE_OK ){ Fts5PageWriter *pPage = &pWriter->aWriter[0]; /* If this is to be the first docid written to the page, set the ** docid-pointer in the page-header. Also append a value to the dlidx ** buffer, in case a doclist-index is required. */ if( pWriter->bFirstRowidInPage ){ fts5PutU16(pPage->buf.p, pPage->buf.n); fts5WriteDlidxAppend(p, pWriter, iRowid); } /* Write the docid. */ if( pWriter->bFirstRowidInDoclist || pWriter->bFirstRowidInPage ){ fts5BufferAppendVarint(&p->rc, &pPage->buf, iRowid); }else{ assert( p->rc || iRowid>pWriter->iPrevRowid ); fts5BufferAppendVarint(&p->rc, &pPage->buf, iRowid - pWriter->iPrevRowid); } pWriter->iPrevRowid = iRowid; |
︙ | ︙ | |||
8814 8815 8816 8817 8818 8819 8820 | static void fts5WriteAppendPoslistData( Fts5Index *p, Fts5SegWriter *pWriter, const u8 *aData, int nData ){ | | | 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 | static void fts5WriteAppendPoslistData( Fts5Index *p, Fts5SegWriter *pWriter, const u8 *aData, int nData ){ Fts5PageWriter *pPage = &pWriter->aWriter[0]; const u8 *a = aData; int n = nData; assert( p->pConfig->pgsz>0 ); while( p->rc==SQLITE_OK && (pPage->buf.n + n)>=p->pConfig->pgsz ){ int nReq = p->pConfig->pgsz - pPage->buf.n; int nCopy = 0; |
︙ | ︙ | |||
8837 8838 8839 8840 8841 8842 8843 | } if( n>0 ){ fts5BufferAppendBlob(&p->rc, &pPage->buf, n, a); } } static void fts5WriteAppendZerobyte(Fts5Index *p, Fts5SegWriter *pWriter){ | | < > > > | > | > | | > > > > > > | > > > > | | > | > | > | > > > > > > > > > > | > > | | > | < > > > > > | < > > > > > > > > | | | | > | 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 | } if( n>0 ){ fts5BufferAppendBlob(&p->rc, &pPage->buf, n, a); } } static void fts5WriteAppendZerobyte(Fts5Index *p, Fts5SegWriter *pWriter){ fts5BufferAppendVarint(&p->rc, &pWriter->aWriter[0].buf, 0); } /* ** Flush any data cached by the writer object to the database. Free any ** allocations associated with the writer. */ static void fts5WriteFinish( Fts5Index *p, Fts5SegWriter *pWriter, /* Writer object */ int *pnHeight, /* OUT: Height of the b-tree */ int *pnLeaf /* OUT: Number of leaf pages in b-tree */ ){ int i; if( p->rc==SQLITE_OK ){ Fts5PageWriter *pLeaf = &pWriter->aWriter[0]; if( pLeaf->pgno==1 && pLeaf->buf.n==0 ){ *pnLeaf = 0; *pnHeight = 0; }else{ if( pLeaf->buf.n>4 ){ fts5WriteFlushLeaf(p, pWriter); } *pnLeaf = pLeaf->pgno-1; if( pWriter->nWriter==1 && pWriter->nEmpty>=FTS5_MIN_DLIDX_SIZE ){ fts5WriteBtreeGrow(p, pWriter); } if( pWriter->nWriter>1 ){ fts5WriteBtreeNEmpty(p, pWriter); } *pnHeight = pWriter->nWriter; for(i=1; i<pWriter->nWriter; i++){ Fts5PageWriter *pPg = &pWriter->aWriter[i]; fts5DataWrite(p, FTS5_SEGMENT_ROWID(pWriter->iSegid, i, pPg->pgno), pPg->buf.p, pPg->buf.n ); } } } for(i=0; i<pWriter->nWriter; i++){ Fts5PageWriter *pPg = &pWriter->aWriter[i]; fts5BufferFree(&pPg->term); fts5BufferFree(&pPg->buf); } sqlite3_free(pWriter->aWriter); for(i=0; i<pWriter->nDlidx; i++){ sqlite3Fts5BufferFree(&pWriter->aDlidx[i].buf); } sqlite3_free(pWriter->aDlidx); } static void fts5WriteInit( Fts5Index *p, Fts5SegWriter *pWriter, int iSegid ){ memset(pWriter, 0, sizeof(Fts5SegWriter)); pWriter->iSegid = iSegid; pWriter->aWriter = (Fts5PageWriter*)fts5IdxMalloc(p, sizeof(Fts5PageWriter)); if( fts5WriteDlidxGrow(p, pWriter, 1) ) return; pWriter->nWriter = 1; pWriter->nDlidx = 1; pWriter->aWriter[0].pgno = 1; pWriter->bFirstTermInPage = 1; } static void fts5WriteInitForAppend( Fts5Index *p, /* FTS5 backend object */ Fts5SegWriter *pWriter, /* Writer to initialize */ Fts5StructureSegment *pSeg /* Segment object to append to */ ){ int nByte = pSeg->nHeight * sizeof(Fts5PageWriter); memset(pWriter, 0, sizeof(Fts5SegWriter)); pWriter->iSegid = pSeg->iSegid; pWriter->aWriter = (Fts5PageWriter*)fts5IdxMalloc(p, nByte); pWriter->aDlidx = (Fts5DlidxWriter*)fts5IdxMalloc(p, sizeof(Fts5DlidxWriter)); if( p->rc==SQLITE_OK ){ int pgno = 1; int i; pWriter->nDlidx = 1; pWriter->nWriter = pSeg->nHeight; pWriter->aWriter[0].pgno = pSeg->pgnoLast+1; for(i=pSeg->nHeight-1; i>0; i--){ i64 iRowid = FTS5_SEGMENT_ROWID(pWriter->iSegid, i, pgno); Fts5PageWriter *pPg = &pWriter->aWriter[i]; pPg->pgno = pgno; fts5DataBuffer(p, &pPg->buf, iRowid); if( p->rc==SQLITE_OK ){ Fts5NodeIter ss; fts5NodeIterInit(pPg->buf.p, pPg->buf.n, &ss); while( ss.aData ) fts5NodeIterNext(&p->rc, &ss); fts5BufferSet(&p->rc, &pPg->term, ss.term.n, ss.term.p); pgno = ss.iChild; fts5NodeIterFree(&ss); } } assert( p->rc!=SQLITE_OK || (pgno+pWriter->nEmpty)==pSeg->pgnoLast ); pWriter->bFirstTermInPage = 1; assert( pWriter->aWriter[0].term.n==0 ); } } /* ** Iterator pIter was used to iterate through the input segments of on an ** incremental merge operation. This function is called if the incremental ** merge step has finished but the input has not been completely exhausted. |
︙ | ︙ | |||
8938 8939 8940 8941 8942 8943 8944 | fts5BufferZero(&buf); fts5BufferAppendBlob(&p->rc, &buf, sizeof(aHdr), aHdr); fts5BufferAppendVarint(&p->rc, &buf, pSeg->term.n); fts5BufferAppendBlob(&p->rc, &buf, pSeg->term.n, pSeg->term.p); fts5BufferAppendBlob(&p->rc, &buf, pData->n - iOff, &pData->p[iOff]); fts5DataRelease(pData); pSeg->pSeg->pgnoFirst = pSeg->iTermLeafPgno; | | | 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 | fts5BufferZero(&buf); fts5BufferAppendBlob(&p->rc, &buf, sizeof(aHdr), aHdr); fts5BufferAppendVarint(&p->rc, &buf, pSeg->term.n); fts5BufferAppendBlob(&p->rc, &buf, pSeg->term.n, pSeg->term.p); fts5BufferAppendBlob(&p->rc, &buf, pData->n - iOff, &pData->p[iOff]); fts5DataRelease(pData); pSeg->pSeg->pgnoFirst = pSeg->iTermLeafPgno; fts5DataDelete(p, FTS5_SEGMENT_ROWID(iId, 0, 1),iLeafRowid); fts5DataWrite(p, iLeafRowid, buf.p, buf.n); } } } fts5BufferFree(&buf); } |
︙ | ︙ | |||
8985 8986 8987 8988 8989 8990 8991 8992 | memset(&writer, 0, sizeof(Fts5SegWriter)); memset(&term, 0, sizeof(Fts5Buffer)); if( pLvl->nMerge ){ pLvlOut = &pStruct->aLevel[iLvl+1]; assert( pLvlOut->nSeg>0 ); nInput = pLvl->nMerge; pSeg = &pLvlOut->aSeg[pLvlOut->nSeg-1]; | > < < < < | 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 | memset(&writer, 0, sizeof(Fts5SegWriter)); memset(&term, 0, sizeof(Fts5Buffer)); if( pLvl->nMerge ){ pLvlOut = &pStruct->aLevel[iLvl+1]; assert( pLvlOut->nSeg>0 ); nInput = pLvl->nMerge; fts5WriteInitForAppend(p, &writer, &pLvlOut->aSeg[pLvlOut->nSeg-1]); pSeg = &pLvlOut->aSeg[pLvlOut->nSeg-1]; }else{ int iSegid = fts5AllocateSegid(p, pStruct); /* Extend the Fts5Structure object as required to ensure the output ** segment exists. */ if( iLvl==pStruct->nLevel-1 ){ fts5StructureAddLevel(&p->rc, ppStruct); |
︙ | ︙ | |||
9080 9081 9082 9083 9084 9085 9086 | pLvl->nSeg -= nInput; pLvl->nMerge = 0; if( pSeg->pgnoLast==0 ){ pLvlOut->nSeg--; pStruct->nSegment--; } }else{ | | | 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 | pLvl->nSeg -= nInput; pLvl->nMerge = 0; if( pSeg->pgnoLast==0 ){ pLvlOut->nSeg--; pStruct->nSegment--; } }else{ assert( pSeg->nHeight>0 && pSeg->pgnoLast>0 ); fts5TrimSegments(p, pIter); pLvl->nMerge = nInput; } fts5MultiIterFree(p, pIter); fts5BufferFree(&term); if( pnRem ) *pnRem -= writer.nLeafWritten; |
︙ | ︙ | |||
9255 9256 9257 9258 9259 9260 9261 | Fts5SegWriter writer; fts5WriteInit(p, &writer, iSegid); /* Pre-allocate the buffer used to assemble leaf pages to the target ** page size. */ assert( pgsz>0 ); | | | 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 | Fts5SegWriter writer; fts5WriteInit(p, &writer, iSegid); /* Pre-allocate the buffer used to assemble leaf pages to the target ** page size. */ assert( pgsz>0 ); pBuf = &writer.aWriter[0].buf; fts5BufferGrow(&p->rc, pBuf, pgsz + 20); /* Begin scanning through hash table entries. This loop runs once for each ** term/doclist currently stored within the hash table. */ if( p->rc==SQLITE_OK ){ memset(pBuf->p, 0, 4); pBuf->n = 4; |
︙ | ︙ | |||
9277 9278 9279 9280 9281 9282 9283 | int nSuffix; /* Size of term suffix */ sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist); nTerm = strlen(zTerm); /* Decide if the term will fit on the current leaf. If it will not, ** flush the leaf to disk here. */ | | | | | | | 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 | int nSuffix; /* Size of term suffix */ sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist); nTerm = strlen(zTerm); /* Decide if the term will fit on the current leaf. If it will not, ** flush the leaf to disk here. */ if( (pBuf->n + nTerm + 2) > pgsz ){ fts5WriteFlushLeaf(p, &writer); pBuf = &writer.aWriter[0].buf; if( (nTerm + 32) > pBuf->nSpace ){ fts5BufferGrow(&p->rc, pBuf, nTerm + 32 - pBuf->n); if( p->rc ) break; } } /* Write the term to the leaf. And if it is the first on the leaf, and ** the leaf is not page number 1, push it up into the b-tree hierarchy ** as well. */ if( writer.bFirstTermInPage==0 ){ int nPre = fts5PrefixCompress(nTerm, zPrev, nTerm, (const u8*)zTerm); pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], nPre); nSuffix = nTerm - nPre; }else{ fts5PutU16(&pBuf->p[2], pBuf->n); writer.bFirstTermInPage = 0; if( writer.aWriter[0].pgno!=1 ){ int nPre = fts5PrefixCompress(nTerm, zPrev, nTerm, (const u8*)zTerm); fts5WriteBtreeTerm(p, &writer, nPre+1, (const u8*)zTerm); pBuf = &writer.aWriter[0].buf; assert( nPre<nTerm ); } nSuffix = nTerm; } pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], nSuffix); fts5BufferSafeAppendBlob(pBuf, (const u8*)&zTerm[nTerm-nSuffix], nSuffix); /* We just wrote a term into page writer.aWriter[0].pgno. If a ** doclist-index is to be generated for this doclist, it will be ** associated with this page. */ assert( writer.nDlidx>0 && writer.aDlidx[0].buf.n==0 ); writer.aDlidx[0].pgno = writer.aWriter[0].pgno; if( pgsz>=(pBuf->n + nDoclist + 1) ){ /* The entire doclist will fit on the current leaf. */ fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist); }else{ i64 iRowid = 0; i64 iDelta = 0; |
︙ | ︙ | |||
9336 9337 9338 9339 9340 9341 9342 | int bDummy; iOff += fts5GetVarint(&pDoclist[iOff], (u64*)&iDelta); nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy); nCopy += nPos; iRowid += iDelta; if( writer.bFirstRowidInPage ){ | | | 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 | int bDummy; iOff += fts5GetVarint(&pDoclist[iOff], (u64*)&iDelta); nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy); nCopy += nPos; iRowid += iDelta; if( writer.bFirstRowidInPage ){ fts5PutU16(&pBuf->p[0], pBuf->n); /* first docid on page */ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowid); writer.bFirstRowidInPage = 0; fts5WriteDlidxAppend(p, &writer, iRowid); }else{ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iDelta); } assert( pBuf->n<=pBuf->nSpace ); |
︙ | ︙ | |||
9368 9369 9370 9371 9372 9373 9374 | n = fts5PoslistPrefix(&pPoslist[iPos], nSpace); } assert( n>0 ); fts5BufferSafeAppendBlob(pBuf, &pPoslist[iPos], n); iPos += n; if( pBuf->n>=pgsz ){ fts5WriteFlushLeaf(p, &writer); | | | 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 | n = fts5PoslistPrefix(&pPoslist[iPos], nSpace); } assert( n>0 ); fts5BufferSafeAppendBlob(pBuf, &pPoslist[iPos], n); iPos += n; if( pBuf->n>=pgsz ){ fts5WriteFlushLeaf(p, &writer); pBuf = &writer.aWriter[0].buf; } if( iPos>=nCopy ) break; } } iOff += nCopy; } } |
︙ | ︙ | |||
9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 | pSeg->nHeight = nHeight; pSeg->pgnoFirst = 1; pSeg->pgnoLast = pgnoLast; pStruct->nSegment++; } fts5StructurePromote(p, 0, pStruct); } fts5IndexAutomerge(p, &pStruct, pgnoLast); fts5IndexCrisismerge(p, &pStruct); fts5StructureWrite(p, pStruct); fts5StructureRelease(pStruct); } | > | 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 | pSeg->nHeight = nHeight; pSeg->pgnoFirst = 1; pSeg->pgnoLast = pgnoLast; pStruct->nSegment++; } fts5StructurePromote(p, 0, pStruct); } fts5IndexAutomerge(p, &pStruct, pgnoLast); fts5IndexCrisismerge(p, &pStruct); fts5StructureWrite(p, pStruct); fts5StructureRelease(pStruct); } |
︙ | ︙ | |||
9829 9830 9831 9832 9833 9834 9835 | p->nWorkUnit = FTS5_WORK_UNIT; p->nMaxPendingData = 1024*1024; p->zDataTbl = sqlite3Fts5Mprintf(&rc, "%s_data", pConfig->zName); if( p->zDataTbl && bCreate ){ rc = sqlite3Fts5CreateTable( pConfig, "data", "id INTEGER PRIMARY KEY, block BLOB", 0, pzErr ); | < < < < < < | 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 | p->nWorkUnit = FTS5_WORK_UNIT; p->nMaxPendingData = 1024*1024; p->zDataTbl = sqlite3Fts5Mprintf(&rc, "%s_data", pConfig->zName); if( p->zDataTbl && bCreate ){ rc = sqlite3Fts5CreateTable( pConfig, "data", "id INTEGER PRIMARY KEY, block BLOB", 0, pzErr ); if( rc==SQLITE_OK ){ rc = sqlite3Fts5IndexReinit(p); } } } assert( rc!=SQLITE_OK || p->rc==SQLITE_OK ); |
︙ | ︙ | |||
9858 9859 9860 9861 9862 9863 9864 | */ static int sqlite3Fts5IndexClose(Fts5Index *p){ int rc = SQLITE_OK; if( p ){ assert( p->pReader==0 ); sqlite3_finalize(p->pWriter); sqlite3_finalize(p->pDeleter); | < < < | 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 | */ static int sqlite3Fts5IndexClose(Fts5Index *p){ int rc = SQLITE_OK; if( p ){ assert( p->pReader==0 ); sqlite3_finalize(p->pWriter); sqlite3_finalize(p->pDeleter); sqlite3Fts5HashFree(p->pHash); sqlite3Fts5BufferFree(&p->scratch); sqlite3_free(p->zDataTbl); sqlite3_free(p); } return rc; } |
︙ | ︙ | |||
9942 9943 9944 9945 9946 9947 9948 | } } return rc; } /* | | | 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 | } } return rc; } /* ** Open a new iterator to iterate though all docids that match the ** specified token or token prefix. */ static int sqlite3Fts5IndexQuery( Fts5Index *p, /* FTS index to query */ const char *pToken, int nToken, /* Token (or prefix) to query for */ int flags, /* Mask of FTS5INDEX_QUERY_X flags */ Fts5IndexIter **ppIter /* OUT: New iterator object */ |
︙ | ︙ | |||
10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 | u64 ret = iRowid; ret += (ret<<3) + iCol; ret += (ret<<3) + iPos; if( iIdx>=0 ) ret += (ret<<3) + (FTS5_MAIN_PREFIX + iIdx); for(i=0; i<nTerm; i++) ret += (ret<<3) + pTerm[i]; return ret; } #ifdef SQLITE_DEBUG /* ** This function is purely an internal test. It does not contribute to ** FTS functionality, or even the integrity-check, in any way. ** ** Instead, it tests that the same set of pgno/rowid combinations are | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 | u64 ret = iRowid; ret += (ret<<3) + iCol; ret += (ret<<3) + iPos; if( iIdx>=0 ) ret += (ret<<3) + (FTS5_MAIN_PREFIX + iIdx); for(i=0; i<nTerm; i++) ret += (ret<<3) + pTerm[i]; return ret; } static void fts5BtreeIterInit( Fts5Index *p, Fts5StructureSegment *pSeg, Fts5BtreeIter *pIter ){ int nByte; int i; nByte = sizeof(pIter->aLvl[0]) * (pSeg->nHeight-1); memset(pIter, 0, sizeof(*pIter)); if( nByte ){ pIter->aLvl = (Fts5BtreeIterLevel*)fts5IdxMalloc(p, nByte); } if( p->rc==SQLITE_OK ){ pIter->nLvl = pSeg->nHeight-1; pIter->p = p; pIter->pSeg = pSeg; } for(i=0; p->rc==SQLITE_OK && i<pIter->nLvl; i++){ i64 iRowid = FTS5_SEGMENT_ROWID(pSeg->iSegid, i+1, 1); Fts5Data *pData; pIter->aLvl[i].pData = pData = fts5DataRead(p, iRowid); if( pData ){ fts5NodeIterInit(pData->p, pData->n, &pIter->aLvl[i].s); } } if( pIter->nLvl==0 || p->rc ){ pIter->bEof = 1; pIter->iLeaf = pSeg->pgnoLast; }else{ pIter->nEmpty = pIter->aLvl[0].s.nEmpty; pIter->iLeaf = pIter->aLvl[0].s.iChild; pIter->bDlidx = pIter->aLvl[0].s.bDlidx; } } static void fts5BtreeIterNext(Fts5BtreeIter *pIter){ Fts5Index *p = pIter->p; int i; assert( pIter->bEof==0 && pIter->aLvl[0].s.aData ); for(i=0; i<pIter->nLvl && p->rc==SQLITE_OK; i++){ Fts5BtreeIterLevel *pLvl = &pIter->aLvl[i]; fts5NodeIterNext(&p->rc, &pLvl->s); if( pLvl->s.aData ){ fts5BufferSet(&p->rc, &pIter->term, pLvl->s.term.n, pLvl->s.term.p); break; }else{ fts5NodeIterFree(&pLvl->s); fts5DataRelease(pLvl->pData); pLvl->pData = 0; } } if( i==pIter->nLvl || p->rc ){ pIter->bEof = 1; }else{ int iSegid = pIter->pSeg->iSegid; for(i--; i>=0; i--){ Fts5BtreeIterLevel *pLvl = &pIter->aLvl[i]; i64 iRowid = FTS5_SEGMENT_ROWID(iSegid, i+1, pLvl[1].s.iChild); pLvl->pData = fts5DataRead(p, iRowid); if( pLvl->pData ){ fts5NodeIterInit(pLvl->pData->p, pLvl->pData->n, &pLvl->s); } } } pIter->nEmpty = pIter->aLvl[0].s.nEmpty; pIter->bDlidx = pIter->aLvl[0].s.bDlidx; pIter->iLeaf = pIter->aLvl[0].s.iChild; } static void fts5BtreeIterFree(Fts5BtreeIter *pIter){ int i; for(i=0; i<pIter->nLvl; i++){ Fts5BtreeIterLevel *pLvl = &pIter->aLvl[i]; fts5NodeIterFree(&pLvl->s); if( pLvl->pData ){ fts5DataRelease(pLvl->pData); pLvl->pData = 0; } } sqlite3_free(pIter->aLvl); fts5BufferFree(&pIter->term); } #ifdef SQLITE_DEBUG /* ** This function is purely an internal test. It does not contribute to ** FTS functionality, or even the integrity-check, in any way. ** ** Instead, it tests that the same set of pgno/rowid combinations are |
︙ | ︙ | |||
10357 10358 10359 10360 10361 10362 10363 | } #else # define fts5TestDlidxReverse(x,y,z) # define fts5TestTerm(u,v,w,x,y,z) #endif | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > < < < < < > | > > | < < < < | | | | | | | | | | > > > | | | | | 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 | } #else # define fts5TestDlidxReverse(x,y,z) # define fts5TestTerm(u,v,w,x,y,z) #endif static void fts5IndexIntegrityCheckSegment( Fts5Index *p, /* FTS5 backend object */ Fts5StructureSegment *pSeg /* Segment to check internal consistency */ ){ Fts5BtreeIter iter; /* Used to iterate through b-tree hierarchy */ if( pSeg->pgnoFirst==0 ) return; /* Iterate through the b-tree hierarchy. */ for(fts5BtreeIterInit(p, pSeg, &iter); p->rc==SQLITE_OK && iter.bEof==0; fts5BtreeIterNext(&iter) ){ i64 iRow; /* Rowid for this leaf */ Fts5Data *pLeaf; /* Data for this leaf */ int iOff; /* Offset of first term on leaf */ int i; /* Used to iterate through empty leaves */ /* If the leaf in question has already been trimmed from the segment, ** ignore this b-tree entry. Otherwise, load it into memory. */ if( iter.iLeaf<pSeg->pgnoFirst ) continue; iRow = FTS5_SEGMENT_ROWID(pSeg->iSegid, 0, iter.iLeaf); pLeaf = fts5DataRead(p, iRow); if( pLeaf==0 ) break; /* Check that the leaf contains at least one term, and that it is equal ** to or larger than the split-key in iter.term. Also check that if there ** is also a rowid pointer within the leaf page header, it points to a ** location before the term. */ iOff = fts5GetU16(&pLeaf->p[2]); if( iOff==0 ){ p->rc = FTS5_CORRUPT; }else{ int iRowidOff; int nTerm; /* Size of term on leaf in bytes */ int res; /* Comparison of term and split-key */ iRowidOff = fts5GetU16(&pLeaf->p[0]); if( iRowidOff>=iOff ){ p->rc = FTS5_CORRUPT; }else{ iOff += fts5GetVarint32(&pLeaf->p[iOff], nTerm); res = memcmp(&pLeaf->p[iOff], iter.term.p, MIN(nTerm, iter.term.n)); if( res==0 ) res = nTerm - iter.term.n; if( res<0 ) p->rc = FTS5_CORRUPT; } } fts5DataRelease(pLeaf); if( p->rc ) break; /* Now check that the iter.nEmpty leaves following the current leaf ** (a) exist and (b) contain no terms. */ for(i=1; p->rc==SQLITE_OK && i<=iter.nEmpty; i++){ pLeaf = fts5DataRead(p, iRow+i); if( pLeaf && 0!=fts5GetU16(&pLeaf->p[2]) ){ p->rc = FTS5_CORRUPT; } fts5DataRelease(pLeaf); } /* If there is a doclist-index, check that it looks right. */ if( iter.bDlidx ){ Fts5DlidxIter *pDlidx = 0; /* For iterating through doclist index */ int iPrevLeaf = iter.iLeaf; int iSegid = pSeg->iSegid; int iPg; i64 iKey; for(pDlidx=fts5DlidxIterInit(p, 0, iSegid, iter.iLeaf); fts5DlidxIterEof(p, pDlidx)==0; fts5DlidxIterNext(p, pDlidx) ){ /* Check any rowid-less pages that occur before the current leaf. */ for(iPg=iPrevLeaf+1; iPg<fts5DlidxIterPgno(pDlidx); iPg++){ iKey = FTS5_SEGMENT_ROWID(iSegid, 0, iPg); |
︙ | ︙ | |||
10496 10497 10498 10499 10500 10501 10502 | fts5GetVarint(&pLeaf->p[iRowidOff], (u64*)&iRowid); if( iRowid!=fts5DlidxIterRowid(pDlidx) ) p->rc = FTS5_CORRUPT; } fts5DataRelease(pLeaf); } } | | > | | < > | < | | | > > | | < < < | > | 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 | fts5GetVarint(&pLeaf->p[iRowidOff], (u64*)&iRowid); if( iRowid!=fts5DlidxIterRowid(pDlidx) ) p->rc = FTS5_CORRUPT; } fts5DataRelease(pLeaf); } } for(iPg=iPrevLeaf+1; iPg<=(iter.iLeaf + iter.nEmpty); iPg++){ iKey = FTS5_SEGMENT_ROWID(iSegid, 0, iPg); pLeaf = fts5DataRead(p, iKey); if( pLeaf ){ if( fts5GetU16(&pLeaf->p[0])!=0 ) p->rc = FTS5_CORRUPT; fts5DataRelease(pLeaf); } } fts5DlidxIterFree(pDlidx); fts5TestDlidxReverse(p, iSegid, iter.iLeaf); } } /* Page iter.iLeaf must now be the rightmost leaf-page in the segment */ if( p->rc==SQLITE_OK && iter.iLeaf!=pSeg->pgnoLast ){ p->rc = FTS5_CORRUPT; } fts5BtreeIterFree(&iter); } /* ** Run internal checks to ensure that the FTS index (a) is internally ** consistent and (b) contains entries for which the XOR of the checksums ** as calculated by fts5IndexEntryCksum() is cksum. |
︙ | ︙ | |||
10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 | ** only true if it is guaranteed that the fts5 database is not corrupt. */ int sqlite3_fts5_may_be_corrupt = 1; typedef struct Fts5Table Fts5Table; typedef struct Fts5Cursor Fts5Cursor; typedef struct Fts5Auxiliary Fts5Auxiliary; typedef struct Fts5Auxdata Fts5Auxdata; typedef struct Fts5TokenizerModule Fts5TokenizerModule; /* ** NOTES ON TRANSACTIONS: | > | 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 | ** only true if it is guaranteed that the fts5 database is not corrupt. */ int sqlite3_fts5_may_be_corrupt = 1; typedef struct Fts5Table Fts5Table; typedef struct Fts5Cursor Fts5Cursor; typedef struct Fts5Global Fts5Global; typedef struct Fts5Auxiliary Fts5Auxiliary; typedef struct Fts5Auxdata Fts5Auxdata; typedef struct Fts5TokenizerModule Fts5TokenizerModule; /* ** NOTES ON TRANSACTIONS: |
︙ | ︙ | |||
11129 11130 11131 11132 11133 11134 11135 | ** ** If the cursor iterates in descending order of rowid, iFirstRowid ** is the upper limit (i.e. the "first" rowid visited) and iLastRowid ** the lower. */ struct Fts5Cursor { sqlite3_vtab_cursor base; /* Base class used by SQLite core */ | < < < < < > | > > < < | 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 | ** ** If the cursor iterates in descending order of rowid, iFirstRowid ** is the upper limit (i.e. the "first" rowid visited) and iLastRowid ** the lower. */ struct Fts5Cursor { sqlite3_vtab_cursor base; /* Base class used by SQLite core */ int ePlan; /* FTS5_PLAN_XXX value */ int bDesc; /* True for "ORDER BY rowid DESC" queries */ i64 iFirstRowid; /* Return no rowids earlier than this */ i64 iLastRowid; /* Return no rowids later than this */ sqlite3_stmt *pStmt; /* Statement used to read %_content */ Fts5Expr *pExpr; /* Expression for MATCH queries */ Fts5Sorter *pSorter; /* Sorter for "ORDER BY rank" queries */ int csrflags; /* Mask of cursor flags (see below) */ Fts5Cursor *pNext; /* Next cursor in Fts5Cursor.pCsr list */ i64 iSpecial; /* Result of special query */ /* "rank" function. Populated on demand from vtab.xColumn(). */ char *zRank; /* Custom rank function */ char *zRankArgs; /* Custom rank function args */ Fts5Auxiliary *pRank; /* Rank callback (or NULL) */ int nRankArg; /* Number of trailing arguments for rank() */ sqlite3_value **apRankArg; /* Array of trailing arguments */ sqlite3_stmt *pRankArgStmt; /* Origin of objects in apRankArg[] */ /* Variables used by auxiliary functions */ i64 iCsrId; /* Cursor id */ Fts5Auxiliary *pAux; /* Currently executing extension function */ Fts5Auxdata *pAuxdata; /* First in linked list of saved aux-data */ int *aColumnSize; /* Values for xColumnSize() */ /* Cache used by auxiliary functions xInst() and xInstCount() */ int nInstCount; /* Number of phrase instances */ int *aInst; /* 3 integers per phrase instance */ }; /* ** Bits that make up the "idxNum" parameter passed indirectly by ** xBestIndex() to xFilter(). |
︙ | ︙ | |||
11393 11394 11395 11396 11397 11398 11399 | ){ return fts5InitVtab(1, db, pAux, argc, argv, ppVtab, pzErr); } /* ** The different query plans. */ | | | | | | | | 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 | ){ return fts5InitVtab(1, db, pAux, argc, argv, ppVtab, pzErr); } /* ** The different query plans. */ #define FTS5_PLAN_MATCH 0 /* (<tbl> MATCH ?) */ #define FTS5_PLAN_SOURCE 1 /* A source cursor for SORTED_MATCH */ #define FTS5_PLAN_SPECIAL 2 /* An internal query */ #define FTS5_PLAN_SORTED_MATCH 3 /* (<tbl> MATCH ? ORDER BY rank) */ #define FTS5_PLAN_SCAN 4 /* No usable constraint */ #define FTS5_PLAN_ROWID 5 /* (rowid = ?) */ /* ** Implementation of the xBestIndex method for FTS5 tables. Within the ** WHERE constraint, it searches for the following: ** ** 1. A MATCH constraint against the special column. ** 2. A MATCH constraint against the "rank" column. |
︙ | ︙ | |||
11573 11574 11575 11576 11577 11578 11579 | static void fts5CsrNewrow(Fts5Cursor *pCsr){ CsrFlagSet(pCsr, FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST ); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > | 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 | static void fts5CsrNewrow(Fts5Cursor *pCsr){ CsrFlagSet(pCsr, FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST ); } /* ** Close the cursor. For additional information see the documentation ** on the xClose method of the virtual table interface. */ static int fts5CloseMethod(sqlite3_vtab_cursor *pCursor){ if( pCursor ){ Fts5Table *pTab = (Fts5Table*)(pCursor->pVtab); Fts5Cursor *pCsr = (Fts5Cursor*)pCursor; Fts5Cursor **pp; Fts5Auxdata *pData; Fts5Auxdata *pNext; sqlite3_free(pCsr->aInst); if( pCsr->pStmt ){ int eStmt = fts5StmtType(pCsr); sqlite3Fts5StorageStmtRelease(pTab->pStorage, eStmt, pCsr->pStmt); } if( pCsr->pSorter ){ Fts5Sorter *pSorter = pCsr->pSorter; sqlite3_finalize(pSorter->pStmt); sqlite3_free(pSorter); } if( pCsr->ePlan!=FTS5_PLAN_SOURCE ){ sqlite3Fts5ExprFree(pCsr->pExpr); } for(pData=pCsr->pAuxdata; pData; pData=pNext){ pNext = pData->pNext; if( pData->xDelete ) pData->xDelete(pData->pPtr); sqlite3_free(pData); } /* Remove the cursor from the Fts5Global.pCsr list */ for(pp=&pTab->pGlobal->pCsr; (*pp)!=pCsr; pp=&(*pp)->pNext); *pp = pCsr->pNext; sqlite3_finalize(pCsr->pRankArgStmt); sqlite3_free(pCsr->apRankArg); if( CsrFlagTest(pCsr, FTS5CSR_FREE_ZRANK) ){ sqlite3_free(pCsr->zRank); sqlite3_free(pCsr->zRankArgs); } sqlite3_free(pCsr); } return SQLITE_OK; } static int fts5SorterNext(Fts5Cursor *pCsr){ Fts5Sorter *pSorter = pCsr->pSorter; |
︙ | ︙ | |||
11731 11732 11733 11734 11735 11736 11737 | ** even if we reach end-of-file. The fts5EofMethod() will be called ** subsequently to determine whether or not an EOF was hit. */ static int fts5NextMethod(sqlite3_vtab_cursor *pCursor){ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor; int rc = SQLITE_OK; | | | | 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 | ** even if we reach end-of-file. The fts5EofMethod() will be called ** subsequently to determine whether or not an EOF was hit. */ static int fts5NextMethod(sqlite3_vtab_cursor *pCursor){ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor; int rc = SQLITE_OK; assert( (pCsr->ePlan<2)== (pCsr->ePlan==FTS5_PLAN_MATCH || pCsr->ePlan==FTS5_PLAN_SOURCE) ); if( pCsr->ePlan<2 ){ int bSkip = 0; if( (rc = fts5CursorReseek(pCsr, &bSkip)) || bSkip ) return rc; rc = sqlite3Fts5ExprNext(pCsr->pExpr, pCsr->iLastRowid); if( sqlite3Fts5ExprEof(pCsr->pExpr) ){ CsrFlagSet(pCsr, FTS5CSR_EOF); } fts5CsrNewrow(pCsr); |
︙ | ︙ | |||
12016 12017 12018 12019 12020 12021 12022 | sqlite3_value *pMatch = 0; /* <tbl> MATCH ? expression (or NULL) */ sqlite3_value *pRank = 0; /* rank MATCH ? expression (or NULL) */ sqlite3_value *pRowidEq = 0; /* rowid = ? expression (or NULL) */ sqlite3_value *pRowidLe = 0; /* rowid <= ? expression (or NULL) */ sqlite3_value *pRowidGe = 0; /* rowid >= ? expression (or NULL) */ char **pzErrmsg = pConfig->pzErrmsg; | < < < < < | 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 | sqlite3_value *pMatch = 0; /* <tbl> MATCH ? expression (or NULL) */ sqlite3_value *pRank = 0; /* rank MATCH ? expression (or NULL) */ sqlite3_value *pRowidEq = 0; /* rowid = ? expression (or NULL) */ sqlite3_value *pRowidLe = 0; /* rowid <= ? expression (or NULL) */ sqlite3_value *pRowidGe = 0; /* rowid >= ? expression (or NULL) */ char **pzErrmsg = pConfig->pzErrmsg; assert( pCsr->pStmt==0 ); assert( pCsr->pExpr==0 ); assert( pCsr->csrflags==0 ); assert( pCsr->pRank==0 ); assert( pCsr->zRank==0 ); assert( pCsr->zRankArgs==0 ); |
︙ | ︙ | |||
12152 12153 12154 12155 12156 12157 12158 | return sqlite3Fts5ExprRowid(pCsr->pExpr); } } /* ** This is the xRowid method. The SQLite core calls this routine to ** retrieve the rowid for the current row of the result set. fts5 | | | 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 | return sqlite3Fts5ExprRowid(pCsr->pExpr); } } /* ** This is the xRowid method. The SQLite core calls this routine to ** retrieve the rowid for the current row of the result set. fts5 ** exposes %_content.docid as the rowid for the virtual table. The ** rowid should be written to *pRowid. */ static int fts5RowidMethod(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor; int ePlan = pCsr->ePlan; assert( CsrFlagTest(pCsr, FTS5CSR_EOF)==0 ); |
︙ | ︙ | |||
12495 12496 12497 12498 12499 12500 12501 | /* ** Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated ** correctly for the current view. Return SQLITE_OK if successful, or an ** SQLite error code otherwise. */ static int fts5CacheInstArray(Fts5Cursor *pCsr){ int rc = SQLITE_OK; | > | | > | | < | | < < < | > | | | | | | | | | | | | | | | | | | < > | < < < | < < < < < < | < < | | | | | | > > | > | > | < | | < | < | 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 | /* ** Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated ** correctly for the current view. Return SQLITE_OK if successful, or an ** SQLite error code otherwise. */ static int fts5CacheInstArray(Fts5Cursor *pCsr){ int rc = SQLITE_OK; if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_INST) ){ Fts5PoslistReader *aIter; /* One iterator for each phrase */ int nIter; /* Number of iterators/phrases */ int nByte; nIter = sqlite3Fts5ExprPhraseCount(pCsr->pExpr); nByte = sizeof(Fts5PoslistReader) * nIter; aIter = (Fts5PoslistReader*)sqlite3Fts5MallocZero(&rc, nByte); if( aIter ){ Fts5Buffer buf = {0, 0, 0}; /* Build up aInst[] here */ int nInst = 0; /* Number instances seen so far */ int i; /* Initialize all iterators */ for(i=0; i<nIter; i++){ const u8 *a; int n = fts5CsrPoslist(pCsr, i, &a); sqlite3Fts5PoslistReaderInit(-1, a, n, &aIter[i]); } while( 1 ){ int *aInst; int iBest = -1; for(i=0; i<nIter; i++){ if( (aIter[i].bEof==0) && (iBest<0 || aIter[i].iPos<aIter[iBest].iPos) ){ iBest = i; } } if( iBest<0 ) break; nInst++; if( sqlite3Fts5BufferGrow(&rc, &buf, nInst * sizeof(int) * 3) ) break; aInst = &((int*)buf.p)[3 * (nInst-1)]; aInst[0] = iBest; aInst[1] = FTS5_POS2COLUMN(aIter[iBest].iPos); aInst[2] = FTS5_POS2OFFSET(aIter[iBest].iPos); sqlite3Fts5PoslistReaderNext(&aIter[iBest]); } sqlite3_free(pCsr->aInst); pCsr->aInst = (int*)buf.p; pCsr->nInstCount = nInst; sqlite3_free(aIter); CsrFlagClear(pCsr, FTS5CSR_REQUIRE_INST); } } return rc; } static int fts5ApiInstCount(Fts5Context *pCtx, int *pnInst){ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx; int rc; if( SQLITE_OK==(rc = fts5CacheInstArray(pCsr)) ){ *pnInst = pCsr->nInstCount; } return rc; } static int fts5ApiInst( Fts5Context *pCtx, int iIdx, int *piPhrase, int *piCol, int *piOff ){ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx; int rc; if( SQLITE_OK==(rc = fts5CacheInstArray(pCsr)) ){ if( iIdx<0 || iIdx>=pCsr->nInstCount ){ rc = SQLITE_RANGE; }else{ *piPhrase = pCsr->aInst[iIdx*3]; *piCol = pCsr->aInst[iIdx*3 + 1]; *piOff = pCsr->aInst[iIdx*3 + 2]; } |
︙ | ︙ | |||
12731 12732 12733 12734 12735 12736 12737 | pData->xDelete = 0; } } return pRet; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 | pData->xDelete = 0; } } return pRet; } static int fts5ApiQueryPhrase(Fts5Context*, int, void*, int(*)(const Fts5ExtensionApi*, Fts5Context*, void*) ); static const Fts5ExtensionApi sFts5Api = { 1, /* iVersion */ fts5ApiUserData, fts5ApiColumnCount, fts5ApiRowCount, fts5ApiColumnTotalSize, fts5ApiTokenize, fts5ApiPhraseCount, fts5ApiPhraseSize, fts5ApiInstCount, fts5ApiInst, fts5ApiRowid, fts5ApiColumnText, fts5ApiColumnSize, fts5ApiQueryPhrase, fts5ApiSetAuxdata, fts5ApiGetAuxdata, }; /* ** Implementation of API function xQueryPhrase(). */ static int fts5ApiQueryPhrase( |
︙ | ︙ | |||
13255 13256 13257 13258 13259 13260 13261 | */ static void fts5SourceIdFunc( sqlite3_context *pCtx, /* Function call context */ int nArg, /* Number of args */ sqlite3_value **apVal /* Function arguments */ ){ assert( nArg==0 ); | | | 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 | */ static void fts5SourceIdFunc( sqlite3_context *pCtx, /* Function call context */ int nArg, /* Number of args */ sqlite3_value **apVal /* Function arguments */ ){ assert( nArg==0 ); sqlite3_result_text(pCtx, "fts5: 2015-07-24 23:28:05 db129149812cb4eadb4cd79ad293d14962d2638d", -1, SQLITE_TRANSIENT); } #ifdef _WIN32 __declspec(dllexport) #endif int sqlite3_fts5_init( sqlite3 *db, |
︙ | ︙ | |||
13523 13524 13525 13526 13527 13528 13529 | /* ** Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error ** code otherwise. */ static int sqlite3Fts5DropAll(Fts5Config *pConfig){ int rc = fts5ExecPrintf(pConfig->db, 0, "DROP TABLE IF EXISTS %Q.'%q_data';" | < < | 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 | /* ** Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error ** code otherwise. */ static int sqlite3Fts5DropAll(Fts5Config *pConfig){ int rc = fts5ExecPrintf(pConfig->db, 0, "DROP TABLE IF EXISTS %Q.'%q_data';" "DROP TABLE IF EXISTS %Q.'%q_config';", pConfig->zDb, pConfig->zName, pConfig->zDb, pConfig->zName ); if( rc==SQLITE_OK && pConfig->bColumnsize ){ rc = fts5ExecPrintf(pConfig->db, 0, "DROP TABLE IF EXISTS %Q.'%q_docsize';", pConfig->zDb, pConfig->zName |
︙ | ︙ | |||
13563 13564 13565 13566 13567 13568 13569 | } static int sqlite3Fts5StorageRename(Fts5Storage *pStorage, const char *zName){ Fts5Config *pConfig = pStorage->pConfig; int rc = sqlite3Fts5StorageSync(pStorage, 1); fts5StorageRenameOne(pConfig, &rc, "data", zName); | < | 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 | } static int sqlite3Fts5StorageRename(Fts5Storage *pStorage, const char *zName){ Fts5Config *pConfig = pStorage->pConfig; int rc = sqlite3Fts5StorageSync(pStorage, 1); fts5StorageRenameOne(pConfig, &rc, "data", zName); fts5StorageRenameOne(pConfig, &rc, "config", zName); if( pConfig->bColumnsize ){ fts5StorageRenameOne(pConfig, &rc, "docsize", zName); } if( pConfig->eContent==FTS5_CONTENT_NORMAL ){ fts5StorageRenameOne(pConfig, &rc, "content", zName); } |
︙ | ︙ | |||
13947 13948 13949 13950 13951 13952 13953 | */ static int sqlite3Fts5StorageDeleteAll(Fts5Storage *p){ Fts5Config *pConfig = p->pConfig; int rc; /* Delete the contents of the %_data and %_docsize tables. */ rc = fts5ExecPrintf(pConfig->db, 0, | | < < | 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 | */ static int sqlite3Fts5StorageDeleteAll(Fts5Storage *p){ Fts5Config *pConfig = p->pConfig; int rc; /* Delete the contents of the %_data and %_docsize tables. */ rc = fts5ExecPrintf(pConfig->db, 0, "DELETE FROM %Q.'%q_data';", pConfig->zDb, pConfig->zName ); if( rc==SQLITE_OK && pConfig->bColumnsize ){ rc = fts5ExecPrintf(pConfig->db, 0, "DELETE FROM %Q.'%q_docsize';", pConfig->zDb, pConfig->zName ); |
︙ | ︙ | |||
14979 14980 14981 14982 14983 14984 14985 | if( pRet ){ memset(pRet, 0, sizeof(PorterTokenizer)); rc = pApi->xFindTokenizer(pApi, zBase, &pUserdata, &pRet->tokenizer); }else{ rc = SQLITE_NOMEM; } if( rc==SQLITE_OK ){ | < < | | 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 | if( pRet ){ memset(pRet, 0, sizeof(PorterTokenizer)); rc = pApi->xFindTokenizer(pApi, zBase, &pUserdata, &pRet->tokenizer); }else{ rc = SQLITE_NOMEM; } if( rc==SQLITE_OK ){ rc = pRet->tokenizer.xCreate(pUserdata, 0, 0, &pRet->pTokenizer); } if( rc!=SQLITE_OK ){ fts5PorterDelete((Fts5Tokenizer*)pRet); pRet = 0; } *ppOut = (Fts5Tokenizer*)pRet; |
︙ | ︙ | |||
16821 16822 16823 16824 16825 16826 16827 | break; } return SQLITE_OK; } /* ** This is the xRowid method. The SQLite core calls this routine to | | > | 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 | break; } return SQLITE_OK; } /* ** This is the xRowid method. The SQLite core calls this routine to ** retrieve the rowid for the current row of the result set. fts5 ** exposes %_content.docid as the rowid for the virtual table. The ** rowid should be written to *pRowid. */ static int fts5VocabRowidMethod( sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid ){ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor; |
︙ | ︙ |
Changes to Setup/build.bat.
︙ | ︙ | |||
52 53 54 55 56 57 58 | ) %_VECHO% Platform = '%PLATFORM%' SET BASE_CONFIGURATION=%CONFIGURATION% SET BASE_CONFIGURATION=%BASE_CONFIGURATION:ManagedOnly=% SET BASE_CONFIGURATION=%BASE_CONFIGURATION:NativeOnly=% | < | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ) %_VECHO% Platform = '%PLATFORM%' SET BASE_CONFIGURATION=%CONFIGURATION% SET BASE_CONFIGURATION=%BASE_CONFIGURATION:ManagedOnly=% SET BASE_CONFIGURATION=%BASE_CONFIGURATION:NativeOnly=% %_VECHO% BaseConfiguration = '%BASE_CONFIGURATION%' SET TOOLS=%~dp0 SET TOOLS=%TOOLS:~0,-1% %_VECHO% Tools = '%TOOLS%' |
︙ | ︙ | |||
269 270 271 272 273 274 275 | GOTO errors ) SET PATH=%BUILDTOOLDIR%;%PATH% %_VECHO% Path = '%PATH%' | < < < < < < < | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | GOTO errors ) SET PATH=%BUILDTOOLDIR%;%PATH% %_VECHO% Path = '%PATH%' IF NOT DEFINED SOLUTION ( %_AECHO% Building all projects... SET SOLUTION=.\SQLite.NET.%YEAR%.MSBuild.sln ) IF NOT EXIST "%SOLUTION%" ( %_AECHO% Building all projects... |
︙ | ︙ |
Deleted Setup/build_mono.bat.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to Setup/clean.bat.
︙ | ︙ | |||
38 39 40 41 42 43 44 | IF NOT EXIST "%TEMP%" ( ECHO The TEMP directory, "%TEMP%", does not exist. GOTO usage ) IF DEFINED CLEANDIRS GOTO skip_cleanDirs | | | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | IF NOT EXIST "%TEMP%" ( ECHO The TEMP directory, "%TEMP%", does not exist. GOTO usage ) IF DEFINED CLEANDIRS GOTO skip_cleanDirs SET CLEANDIRS=bin obj Doc\Output Setup\Output SET CLEANDIRS=%CLEANDIRS% SQLite.Designer\bin SQLite.Designer\obj SET CLEANDIRS=%CLEANDIRS% SQLite.Interop\bin SQLite.Interop\obj SET CLEANDIRS=%CLEANDIRS% System.Data.SQLite\bin System.Data.SQLite\obj SET CLEANDIRS=%CLEANDIRS% System.Data.SQLite.Linq\bin System.Data.SQLite.Linq\obj SET CLEANDIRS=%CLEANDIRS% test\bin test\obj testce\bin testce\obj testlinq\bin SET CLEANDIRS=%CLEANDIRS% testlinq\obj tools\install\bin tools\install\obj |
︙ | ︙ |
Changes to Setup/data/verify.lst.
︙ | ︙ | |||
253 254 255 256 257 258 259 | Setup/archive.bat Setup/bake.bat Setup/bake_all.bat Setup/build.bat Setup/build_all.bat Setup/build_ce_200x.bat Setup/build_ce_2013.bat | < | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | Setup/archive.bat Setup/bake.bat Setup/bake_all.bat Setup/build.bat Setup/build_all.bat Setup/build_ce_200x.bat Setup/build_ce_2013.bat Setup/build_nuget.bat Setup/clean.bat Setup/data/ Setup/data/CheckForNetFx.pas Setup/data/InitializeSetup.pas Setup/data/SQLite.iss Setup/data/verify.lst |
︙ | ︙ | |||
773 774 775 776 777 778 779 | Tests/tkt-3113734605.eagle Tests/tkt-343d392b51.eagle Tests/tkt-3567020edf.eagle Tests/tkt-393d954be0.eagle Tests/tkt-3aa50d8413.eagle Tests/tkt-3c00ec5b52.eagle Tests/tkt-3e783eecbe.eagle | < | 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | Tests/tkt-3113734605.eagle Tests/tkt-343d392b51.eagle Tests/tkt-3567020edf.eagle Tests/tkt-393d954be0.eagle Tests/tkt-3aa50d8413.eagle Tests/tkt-3c00ec5b52.eagle Tests/tkt-3e783eecbe.eagle Tests/tkt-448d663d11.eagle Tests/tkt-47c6fa04d3.eagle Tests/tkt-47f4bac575.eagle Tests/tkt-48a6b8e4ca.eagle Tests/tkt-4a791e70ab.eagle Tests/tkt-544dba0a2f.eagle Tests/tkt-56b42d99c1.eagle |
︙ | ︙ |
Changes to Setup/release_ce_200x.bat.
︙ | ︙ | |||
37 38 39 40 41 42 43 | ) SET BASE_CONFIGURATIONSUFFIX=Compact SET PLATFORMS="Pocket PC 2003 (ARMV4)" SET YEARS=2008 SET BASE_PLATFORM=PocketPC SET EXTRA_PLATFORM_Pocket_PC_2003_ARMV4=ARM | < | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ) SET BASE_CONFIGURATIONSUFFIX=Compact SET PLATFORMS="Pocket PC 2003 (ARMV4)" SET YEARS=2008 SET BASE_PLATFORM=PocketPC SET EXTRA_PLATFORM_Pocket_PC_2003_ARMV4=ARM CALL :fn_ResetErrorLevel %__ECHO3% CALL "%TOOLS%\release_all.bat" IF ERRORLEVEL 1 ( ECHO Failed to build WinCE release files. |
︙ | ︙ |
Changes to Setup/release_ce_2013.bat.
︙ | ︙ | |||
39 40 41 42 43 44 45 | SET FRAMEWORK2012=netFx39 SET BASE_CONFIGURATIONSUFFIX=Compact SET PLATFORMS="CEPC DevPlatform" ARMV7 SET YEARS=2012 SET BASE_PLATFORM=WinCE SET EXTRA_PLATFORM_CEPC_DevPlatform=x86 SET EXTRA_PLATFORM_ARMV7=ARM | < | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | SET FRAMEWORK2012=netFx39 SET BASE_CONFIGURATIONSUFFIX=Compact SET PLATFORMS="CEPC DevPlatform" ARMV7 SET YEARS=2012 SET BASE_PLATFORM=WinCE SET EXTRA_PLATFORM_CEPC_DevPlatform=x86 SET EXTRA_PLATFORM_ARMV7=ARM CALL :fn_ResetErrorLevel %__ECHO3% CALL "%TOOLS%\release_all.bat" IF ERRORLEVEL 1 ( ECHO Failed to build WinCE release files. |
︙ | ︙ |
Changes to System.Data.SQLite.Linq/SQL Generation/DmlSqlGenerator.cs.
︙ | ︙ | |||
79 80 81 82 83 84 85 | // where c1 = ..., c2 = ... commandText.Append("WHERE "); tree.Predicate.Accept(translator); commandText.AppendLine(";"); // generate returning sql | | | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | // where c1 = ..., c2 = ... commandText.Append("WHERE "); tree.Predicate.Accept(translator); commandText.AppendLine(";"); // generate returning sql GenerateReturningSql(commandText, tree, translator, tree.Returning); parameters = translator.Parameters; return commandText.ToString(); } internal static string GenerateDeleteSql(DbDeleteCommandTree tree, out List<DbParameter> parameters) { |
︙ | ︙ | |||
146 147 148 149 150 151 152 | } else // No columns specified. Insert an empty row containing default values by inserting null into the rowid { commandText.AppendLine(" DEFAULT VALUES;"); } // generate returning sql | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | } else // No columns specified. Insert an empty row containing default values by inserting null into the rowid { commandText.AppendLine(" DEFAULT VALUES;"); } // generate returning sql GenerateReturningSql(commandText, tree, translator, tree.Returning); parameters = translator.Parameters; return commandText.ToString(); } // Generates T-SQL describing a member // Requires: member must belong to an entity type (a safe requirement for DML // SQL gen, where we only access table columns) private static string GenerateMemberTSql(EdmMember member) { return SqlGenerator.QuoteIdentifier(member.Name); } /// <summary> /// Generates SQL fragment returning server-generated values. /// Requires: translator knows about member values so that we can figure out /// how to construct the key predicate. /// <code> /// Sample SQL: /// |
︙ | ︙ | |||
267 268 269 270 271 272 273 | /// </summary> /// <param name="commandText">Builder containing command text</param> /// <param name="tree">Modification command tree</param> /// <param name="translator">Translator used to produce DML SQL statement /// for the tree</param> /// <param name="returning">Returning expression. If null, the method returns /// immediately without producing a SELECT statement.</param> | < < < < | < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | < | | < < < < < | | | | < < < < | < < < > > > > | < < < < | < < < < < < < < < < < < < < > | < < < < < < < < < < < < | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | /// </summary> /// <param name="commandText">Builder containing command text</param> /// <param name="tree">Modification command tree</param> /// <param name="translator">Translator used to produce DML SQL statement /// for the tree</param> /// <param name="returning">Returning expression. If null, the method returns /// immediately without producing a SELECT statement.</param> private static void GenerateReturningSql(StringBuilder commandText, DbModificationCommandTree tree, ExpressionTranslator translator, DbExpression returning) { // Nothing to do if there is no Returning expression if (null == returning) { return; } // select commandText.Append("SELECT "); returning.Accept(translator); commandText.AppendLine(); // from commandText.Append("FROM "); tree.Target.Expression.Accept(translator); commandText.AppendLine(); // where #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; 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(";"); } /// <summary> /// Lightweight expression translator for DML expression trees, which have constrained /// scope and support. |
︙ | ︙ |
Changes to System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs.
︙ | ︙ | |||
39 40 41 42 43 44 45 | static SQLiteFactory() { #if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY UnsafeNativeMethods.Initialize(); #endif | | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | static SQLiteFactory() { #if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY UnsafeNativeMethods.Initialize(); #endif #if INTEROP_LOG if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok) { UnsafeNativeMethods.sqlite3_log( SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized.")); } #endif SQLiteLog.Initialize(); string version = #if NET_40 || NET_45 || NET_451 || NET_46 "4.0.0.0"; #else "3.5.0.0"; #endif _dbProviderServicesType = Type.GetType(String.Format(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false); } /// <summary> /// Will provide a <see cref="IServiceProvider" /> object in .NET 3.5. /// </summary> /// <param name="serviceType">The class or interface type to query for.</param> /// <returns></returns> |
︙ | ︙ | |||
86 87 88 89 90 91 92 | string typeName = UnsafeNativeMethods.GetSettingValue( "TypeName_SQLiteProviderServices", null); Version version = this.GetType().Assembly.GetName().Version; if (typeName != null) { | | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | string typeName = UnsafeNativeMethods.GetSettingValue( "TypeName_SQLiteProviderServices", null); Version version = this.GetType().Assembly.GetName().Version; if (typeName != null) { typeName = String.Format( CultureInfo.InvariantCulture, typeName, version); } else { typeName = String.Format( CultureInfo.InvariantCulture, DefaultTypeName, version); } Type type = Type.GetType(typeName, false); if (type != null) { |
︙ | ︙ |
Changes to System.Data.SQLite/SQLite3.cs.
︙ | ︙ | |||
244 245 246 247 248 249 250 | if (SQLiteBase.ResetConnection(_sql, _sql, canThrow)) { if (unbindFunctions) { if (SQLiteFunction.UnbindAllFunctions(this, _flags, false)) { #if !NET_COMPACT_20 && TRACE_CONNECTION | | | | | | | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | if (SQLiteBase.ResetConnection(_sql, _sql, canThrow)) { if (unbindFunctions) { if (SQLiteFunction.UnbindAllFunctions(this, _flags, false)) { #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "UnbindFunctions (Pool) Success: {0}", HandleToString())); #endif } else { #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "UnbindFunctions (Pool) Failure: {0}", HandleToString())); #endif } } #if INTEROP_VIRTUAL_TABLE DisposeModules(); #endif SQLiteConnectionPool.Add(_fileName, _sql, _poolVersion); SQLiteConnection.OnChanged(null, new ConnectionEventArgs( SQLiteConnectionEventType.ClosedToPool, null, null, null, null, _sql, _fileName, new object[] { typeof(SQLite3), canThrow, _fileName, _poolVersion })); #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Close (Pool) Success: {0}", HandleToString())); #endif } #if !NET_COMPACT_20 && TRACE_CONNECTION else { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Close (Pool) Failure: {0}", HandleToString())); } #endif } else { if (unbindFunctions) { if (SQLiteFunction.UnbindAllFunctions(this, _flags, false)) { #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "UnbindFunctions Success: {0}", HandleToString())); #endif } else { #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "UnbindFunctions Failure: {0}", HandleToString())); #endif } } |
︙ | ︙ | |||
885 886 887 888 889 890 891 | SQLiteConnection.OnChanged(null, new ConnectionEventArgs( SQLiteConnectionEventType.OpenedFromPool, null, null, null, null, _sql, strFilename, new object[] { typeof(SQLite3), strFilename, vfsName, connectionFlags, openFlags, maxPoolSize, usePool, _poolVersion })); #if !NET_COMPACT_20 && TRACE_CONNECTION | | | 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 | SQLiteConnection.OnChanged(null, new ConnectionEventArgs( SQLiteConnectionEventType.OpenedFromPool, null, null, null, null, _sql, strFilename, new object[] { typeof(SQLite3), strFilename, vfsName, connectionFlags, openFlags, maxPoolSize, usePool, _poolVersion })); #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Open (Pool): {0}", HandleToString())); #endif } if (_sql == null) { |
︙ | ︙ | |||
916 917 918 919 920 921 922 | else #endif { n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), ref db, openFlags, ToUTF8(vfsName)); } #if !NET_COMPACT_20 && TRACE_CONNECTION | | | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 | else #endif { n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), ref db, openFlags, ToUTF8(vfsName)); } #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Open: {0}", db)); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null); _sql = new SQLiteConnectionHandle(db, true); } |
︙ | ︙ | |||
1241 1242 1243 1244 1245 1246 1247 | // data classes. // string baseSchemaName = (cnn != null) ? cnn._baseSchemaName : null; if (!String.IsNullOrEmpty(baseSchemaName)) { strSql = strSql.Replace( | | | | | 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 | // data classes. // string baseSchemaName = (cnn != null) ? cnn._baseSchemaName : null; if (!String.IsNullOrEmpty(baseSchemaName)) { strSql = strSql.Replace( String.Format(CultureInfo.InvariantCulture, "[{0}].", baseSchemaName), String.Empty); strSql = strSql.Replace( String.Format(CultureInfo.InvariantCulture, "{0}.", baseSchemaName), String.Empty); } } SQLiteConnectionFlags flags = (cnn != null) ? cnn.Flags : SQLiteConnectionFlags.Default; if ( #if !PLATFORM_COMPACTFRAMEWORK ForceLogPrepare() || #endif ((flags & SQLiteConnectionFlags.LogPrepare) == SQLiteConnectionFlags.LogPrepare)) { if ((strSql == null) || (strSql.Length == 0) || (strSql.Trim().Length == 0)) SQLiteLog.LogMessage("Preparing {<nothing>}..."); else SQLiteLog.LogMessage(String.Format( CultureInfo.CurrentCulture, "Preparing {{{0}}}...", strSql)); } IntPtr stmt = IntPtr.Zero; IntPtr ptr = IntPtr.Zero; int len = 0; SQLiteErrorCode n = SQLiteErrorCode.Schema; |
︙ | ︙ | |||
1309 1310 1311 1312 1313 1314 1315 | #else n = UnsafeNativeMethods.sqlite3_prepare(_sql, psql, b.Length - 1, ref stmt, ref ptr); #endif len = -1; #endif #if !NET_COMPACT_20 && TRACE_STATEMENT | | | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 | #else n = UnsafeNativeMethods.sqlite3_prepare(_sql, psql, b.Length - 1, ref stmt, ref ptr); #endif len = -1; #endif #if !NET_COMPACT_20 && TRACE_STATEMENT Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Prepare ({0}): {1}", n, stmt)); #endif if ((n == SQLiteErrorCode.Ok) && (stmt != IntPtr.Zero)) { if (statementHandle != null) statementHandle.Dispose(); |
︙ | ︙ | |||
1445 1446 1447 1448 1449 1450 1451 | } } protected static void LogBind(SQLiteStatementHandle handle, int index) { IntPtr handleIntPtr = handle; | | | < | 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 | } } protected static void LogBind(SQLiteStatementHandle handle, int index) { IntPtr handleIntPtr = handle; 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(String.Format( "Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...", handleIntPtr, index, value.GetType(), value)); } private static string FormatDateTime(DateTime value) { StringBuilder result = new StringBuilder(); |
︙ | ︙ | |||
1478 1479 1480 1481 1482 1483 1484 | return result.ToString(); } protected static void LogBind(SQLiteStatementHandle handle, int index, DateTime value) { IntPtr handleIntPtr = handle; | | < | < | 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 | return result.ToString(); } protected static void LogBind(SQLiteStatementHandle handle, int index, DateTime value) { IntPtr handleIntPtr = handle; 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(String.Format( "Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...", handleIntPtr, index, typeof(String), (value != null) ? value : "<null>")); } private static string ToHexadecimalString( byte[] array ) |
︙ | ︙ | |||
1515 1516 1517 1518 1519 1520 1521 | return result.ToString(); } protected static void LogBind(SQLiteStatementHandle handle, int index, byte[] value) { IntPtr handleIntPtr = handle; | | < < < > | 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 | return result.ToString(); } protected static void LogBind(SQLiteStatementHandle handle, int index, byte[] value) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( "Binding statement {0} paramter #{1} as type {2} with value {{{3}}}...", handleIntPtr, index, typeof(Byte[]), (value != null) ? ToHexadecimalString(value) : "<null>")); } internal override void Bind_Double(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, double value) { SQLiteStatementHandle handle = stmt._sqlite_stmt; if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } #if !PLATFORM_COMPACTFRAMEWORK SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double(handle, index, value); #elif !SQLITE_STANDARD SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double_interop(handle, index, ref value); #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; if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) |
︙ | ︙ | |||
1597 1598 1599 1600 1601 1602 1603 | #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value); | < < > < < > | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 | #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value); #elif !SQLITE_STANDARD SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value); #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; #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_uint64(handle, index, value); #elif !SQLITE_STANDARD SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_uint64_interop(handle, index, ref value); #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; #if !PLATFORM_COMPACTFRAMEWORK |
︙ | ︙ | |||
1687 1688 1689 1690 1691 1692 1693 | #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value); | < < < < > > < < < < > > < < < < > > | 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 | #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value); #elif !SQLITE_STANDARD SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value); #else throw new NotImplementedException(); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError()); break; } case SQLiteDateFormats.JulianDay: { double value = ToJulianDay(dt); #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double(handle, index, value); #elif !SQLITE_STANDARD SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double_interop(handle, index, ref value); #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); #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value); #elif !SQLITE_STANDARD SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value); #else throw new NotImplementedException(); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError()); break; } default: { byte[] b = ToUTF8(dt); #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) |
︙ | ︙ | |||
1796 1797 1798 1799 1800 1801 1802 | SQLiteStatementHandle handle = stmt._sqlite_stmt; int value = UnsafeNativeMethods.sqlite3_bind_parameter_count(handle); if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; | | | 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 | SQLiteStatementHandle handle = stmt._sqlite_stmt; int value = UnsafeNativeMethods.sqlite3_bind_parameter_count(handle); if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( CultureInfo.CurrentCulture, "Statement {0} paramter count is {1}.", handleIntPtr, value)); } return value; } |
︙ | ︙ | |||
1821 1822 1823 1824 1825 1826 1827 | name = UTF8ToString(UnsafeNativeMethods.sqlite3_bind_parameter_name(handle, index), -1); #endif if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; | | | | 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 | name = UTF8ToString(UnsafeNativeMethods.sqlite3_bind_parameter_name(handle, index), -1); #endif if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( CultureInfo.CurrentCulture, "Statement {0} paramter #{1} name is {{{2}}}.", handleIntPtr, index, name)); } return name; } internal override int Bind_ParamIndex(SQLiteStatement stmt, SQLiteConnectionFlags flags, string paramName) { SQLiteStatementHandle handle = stmt._sqlite_stmt; int index = UnsafeNativeMethods.sqlite3_bind_parameter_index(handle, ToUTF8(paramName)); if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( CultureInfo.CurrentCulture, "Statement {0} paramter index of name {{{1}}} is #{2}.", handleIntPtr, paramName, index)); } return index; } |
︙ | ︙ | |||
1987 1988 1989 1990 1991 1992 1993 1994 | notNull = (nnotNull == 1); primaryKey = (nprimaryKey == 1); autoIncrement = (nautoInc == 1); } internal override double GetDouble(SQLiteStatement stmt, int index) { #if !PLATFORM_COMPACTFRAMEWORK | > | | < > | 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 | notNull = (nnotNull == 1); primaryKey = (nprimaryKey == 1); autoIncrement = (nautoInc == 1); } internal override double GetDouble(SQLiteStatement stmt, int index) { double value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_column_double(stmt._sqlite_stmt, index); #elif !SQLITE_STANDARD value = 0.0; UnsafeNativeMethods.sqlite3_column_double_interop(stmt._sqlite_stmt, index, ref value); #else throw new NotImplementedException(); #endif return value; } internal override sbyte GetSByte(SQLiteStatement stmt, int index) { return unchecked((sbyte)(GetInt32(stmt, index) & byte.MaxValue)); } |
︙ | ︙ | |||
2030 2031 2032 2033 2034 2035 2036 2037 | internal override uint GetUInt32(SQLiteStatement stmt, int index) { return unchecked((uint)GetInt32(stmt, index)); } internal override long GetInt64(SQLiteStatement stmt, int index) { #if !PLATFORM_COMPACTFRAMEWORK | > | | < > | 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 | internal override uint GetUInt32(SQLiteStatement stmt, int index) { return unchecked((uint)GetInt32(stmt, index)); } internal override long GetInt64(SQLiteStatement stmt, int index) { long value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_column_int64(stmt._sqlite_stmt, index); #elif !SQLITE_STANDARD value = 0; UnsafeNativeMethods.sqlite3_column_int64_interop(stmt._sqlite_stmt, index, ref value); #else throw new NotImplementedException(); #endif return value; } internal override ulong GetUInt64(SQLiteStatement stmt, int index) { return unchecked((ulong)GetInt64(stmt, index)); } |
︙ | ︙ | |||
2260 2261 2262 2263 2264 2265 2266 2267 | } return nCopied; } internal override double GetParamValueDouble(IntPtr ptr) { #if !PLATFORM_COMPACTFRAMEWORK | > | | < > > | | < > | 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 | } return nCopied; } internal override double GetParamValueDouble(IntPtr ptr) { double value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_value_double(ptr); #elif !SQLITE_STANDARD value = 0.0; UnsafeNativeMethods.sqlite3_value_double_interop(ptr, ref 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 value = UnsafeNativeMethods.sqlite3_value_int64(ptr); #elif !SQLITE_STANDARD value = 0; UnsafeNativeMethods.sqlite3_value_int64_interop(ptr, ref value); #else throw new NotImplementedException(); #endif return value; } internal override string GetParamValueText(IntPtr ptr) { #if !SQLITE_STANDARD int len = 0; return UTF8ToString(UnsafeNativeMethods.sqlite3_value_text_interop(ptr, ref len), len); |
︙ | ︙ | |||
2393 2394 2395 2396 2397 2398 2399 | _modules.Add(module.Name, module); if (_usePool) { _usePool = false; #if !NET_COMPACT_20 && TRACE_CONNECTION | | | 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 | _modules.Add(module.Name, module); if (_usePool) { _usePool = false; #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "CreateModule (Pool) Disabled: {0}", HandleToString())); #endif } } else |
︙ | ︙ | |||
2640 2641 2642 2643 2644 2645 2646 | } #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()); | < < | 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 | } #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()); } 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()); } #endif internal override void SetProgressHook(int nOps, SQLiteProgressCallback func) { UnsafeNativeMethods.sqlite3_progress_handler(_sql, nOps, func, IntPtr.Zero); } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLite3_UTF16.cs.
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 | namespace System.Data.SQLite { using System; using System.Collections.Generic; #if !NET_COMPACT_20 && TRACE_CONNECTION using System.Diagnostics; #endif | > < < | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | namespace System.Data.SQLite { using System; using System.Collections.Generic; #if !NET_COMPACT_20 && TRACE_CONNECTION using System.Diagnostics; using System.Globalization; #endif using System.IO; using System.Runtime.InteropServices; /// <summary> /// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode) /// </summary> internal sealed class SQLite3_UTF16 : SQLite3 { /// <summary> |
︙ | ︙ | |||
159 160 161 162 163 164 165 | SQLiteConnectionEventType.OpenedFromPool, null, null, null, null, _sql, strFilename, new object[] { typeof(SQLite3_UTF16), strFilename, vfsName, connectionFlags, openFlags, maxPoolSize, usePool, _poolVersion })); #if !NET_COMPACT_20 && TRACE_CONNECTION | | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | SQLiteConnectionEventType.OpenedFromPool, null, null, null, null, _sql, strFilename, new object[] { typeof(SQLite3_UTF16), strFilename, vfsName, connectionFlags, openFlags, maxPoolSize, usePool, _poolVersion })); #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Open16 (Pool): {0}", HandleToString())); #endif } if (_sql == null) |
︙ | ︙ | |||
198 199 200 201 202 203 204 | // a flags parameter. // if (((openFlags & SQLiteOpenFlagsEnum.Create) != SQLiteOpenFlagsEnum.Create) && !File.Exists(strFilename)) throw new SQLiteException(SQLiteErrorCode.CantOpen, strFilename); if (vfsName != null) { | | < | | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | // a flags parameter. // if (((openFlags & SQLiteOpenFlagsEnum.Create) != SQLiteOpenFlagsEnum.Create) && !File.Exists(strFilename)) throw new SQLiteException(SQLiteErrorCode.CantOpen, strFilename); if (vfsName != null) { 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(String.Format( CultureInfo.CurrentCulture, "Open16: {0}", db)); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null); _sql = new SQLiteConnectionHandle(db, true); } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteBase.cs.
︙ | ︙ | |||
947 948 949 950 951 952 953 | /// <summary> /// Prevent this <see cref="SQLiteConnection" /> object instance from /// loading extensions. /// </summary> NoLoadExtension = 0x200, | < < < < | 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 | /// <summary> /// Prevent this <see cref="SQLiteConnection" /> object instance from /// loading extensions. /// </summary> NoLoadExtension = 0x200, /// <summary> /// Prevent this <see cref="SQLiteConnection" /> object instance from /// creating virtual table modules. /// </summary> NoCreateModule = 0x400, /// <summary> /// Skip binding any functions provided by other managed assemblies when /// opening the connection. /// </summary> NoBindFunctions = 0x800, /// <summary> /// Skip setting the logging related properties of the /// <see cref="SQLiteModule" /> object instance that was passed to /// the <see cref="SQLiteConnection.CreateModule" /> method. /// </summary> NoLogModule = 0x1000, /// <summary> /// Enable logging of all virtual table module errors seen by the /// <see cref="SQLiteModule.SetTableError(IntPtr,String)" /> method. /// </summary> LogModuleError = 0x2000, /// <summary> /// Enable logging of certain virtual table module exceptions that cannot /// be easily discovered via other means. /// </summary> LogModuleException = 0x4000, /// <summary> /// Enable tracing of potentially important [non-fatal] error conditions /// that cannot be easily reported through other means. /// </summary> TraceWarning = 0x8000, |
︙ | ︙ | |||
1165 1166 1167 1168 1169 1170 1171 | /// </summary> ConvertAndBindAndGetAllAsInvariantText = BindAndGetAllAsText | ConvertAndBindInvariantText, /// <summary> /// Enable all logging. /// </summary> | < < < < < < < < < | 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 | /// </summary> ConvertAndBindAndGetAllAsInvariantText = BindAndGetAllAsText | ConvertAndBindInvariantText, /// <summary> /// Enable all logging. /// </summary> LogAll = LogPrepare | LogPreBind | LogBind | LogCallbackException | LogBackup | LogModuleError | LogModuleException, /// <summary> /// The default extra flags for new connections. /// </summary> Default = LogCallbackException | LogModuleException, /// <summary> /// The default extra flags for new connections with all logging enabled. /// </summary> DefaultAndLogAll = Default | LogAll } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteCommandBuilder.cs.
︙ | ︙ | |||
46 47 48 49 50 51 52 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteCommandBuilder).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// | < < < < < < | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteCommandBuilder).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// protected override void Dispose(bool disposing) { try { if (!disposed) { //if (disposing) |
︙ | ︙ | |||
104 105 106 107 108 109 110 | /// <summary> /// Returns a valid named parameter /// </summary> /// <param name="parameterName">The name of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(string parameterName) { | | | | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | /// <summary> /// Returns a valid named parameter /// </summary> /// <param name="parameterName">The name of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(string parameterName) { return String.Format(CultureInfo.InvariantCulture, "@{0}", parameterName); } /// <summary> /// Returns a named parameter for the given ordinal /// </summary> /// <param name="parameterOrdinal">The i of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(int parameterOrdinal) { return String.Format(CultureInfo.InvariantCulture, "@param{0}", parameterOrdinal); } /// <summary> /// Returns a placeholder character for the specified parameter i. /// </summary> /// <param name="parameterOrdinal">The index of the parameter to provide a placeholder for</param> /// <returns>Returns a named parameter</returns> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
294 295 296 297 298 299 300 | /// <b>False</b> - Store GUID columns as text /// </description> /// <description>N</description> /// <description>True</description> /// </item> /// <item> /// <description>Cache Size</description> | | < < < < < < < | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | /// <b>False</b> - Store GUID columns as text /// </description> /// <description>N</description> /// <description>True</description> /// </item> /// <item> /// <description>Cache Size</description> /// <description>{size in bytes}</description> /// <description>N</description> /// <description>2000</description> /// </item> /// <item> /// <description>Synchronous</description> /// <description> /// <b>Normal</b> - Normal file flushing behavior |
︙ | ︙ | |||
810 811 812 813 814 815 816 | /// <param name="connectionString">The connection string to use.</param> public SQLiteConnection(string connectionString) : this(connectionString, false) { // do nothing. } | < | 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | /// <param name="connectionString">The connection string to use.</param> public SQLiteConnection(string connectionString) : this(connectionString, false) { // do nothing. } /// <summary> /// Initializes the connection with a pre-existing native connection handle. /// This constructor overload is intended to be used only by the private /// <see cref="SQLiteModule.CreateOrConnect" /> method. /// </summary> /// <param name="db"> /// The native connection handle to use. |
︙ | ︙ | |||
840 841 842 843 844 845 846 | _flags = SQLiteConnectionFlags.None; _connectionState = (db != IntPtr.Zero) ? ConnectionState.Open : ConnectionState.Closed; _connectionString = null; /* unknown */ } | < | 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | _flags = SQLiteConnectionFlags.None; _connectionState = (db != IntPtr.Zero) ? ConnectionState.Open : ConnectionState.Closed; _connectionString = null; /* unknown */ } /// <summary> /// Initializes the connection with the specified connection string. /// </summary> /// <param name="connectionString"> /// The connection string to use. /// </param> |
︙ | ︙ | |||
886 887 888 889 890 891 892 | if (_versionNumber >= 3007014) SQLiteConnectionHandle.closeConnection = SQLiteBase.CloseConnectionV2; } } #endif | | | 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 | if (_versionNumber >= 3007014) SQLiteConnectionHandle.closeConnection = SQLiteBase.CloseConnectionV2; } } #endif #if INTEROP_LOG if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok) { UnsafeNativeMethods.sqlite3_log( SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized.")); } #endif |
︙ | ︙ | |||
934 935 936 937 938 939 940 | { string str = row[0].ToString(); if (String.Compare(str, "main", StringComparison.OrdinalIgnoreCase) != 0 && String.Compare(str, "temp", StringComparison.OrdinalIgnoreCase) != 0) { using (SQLiteCommand cmd = CreateCommand()) { | | | 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | { string str = row[0].ToString(); if (String.Compare(str, "main", StringComparison.OrdinalIgnoreCase) != 0 && String.Compare(str, "temp", StringComparison.OrdinalIgnoreCase) != 0) { using (SQLiteCommand cmd = CreateCommand()) { cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "ATTACH DATABASE '{0}' AS [{1}]", row[1], row[0]); cmd.ExecuteNonQuery(); } } } } } } |
︙ | ︙ | |||
1167 1168 1169 1170 1171 1172 1173 | break; } } catch (Exception e) { if ((_flags & SQLiteConnectionFlags.LogBackup) == SQLiteConnectionFlags.LogBackup) { | | | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 | break; } } catch (Exception e) { if ((_flags & SQLiteConnectionFlags.LogBackup) == SQLiteConnectionFlags.LogBackup) { SQLiteLog.LogMessage(String.Format( CultureInfo.CurrentCulture, "Caught exception while backing up database: {0}", e)); } throw; } finally |
︙ | ︙ | |||
1388 1389 1390 1391 1392 1393 1394 | /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Attempts to bind the specified <see cref="SQLiteFunction" /> object /// instance to this connection. /// </summary> /// <param name="functionAttribute"> | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 | /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Attempts to bind the specified <see cref="SQLiteFunction" /> object /// instance to this connection. /// </summary> /// <param name="functionAttribute"> /// The <see cref="SQLiteFunctionAttribute"/> object instance containing /// the metadata for the function to be bound. /// </param> /// <param name="function"> /// The <see cref="SQLiteFunction"/> object instance that implements the /// function to be bound. /// </param> public void BindFunction( SQLiteFunctionAttribute functionAttribute, SQLiteFunction function ) { CheckDisposed(); if (_sql == null) throw new InvalidOperationException( "Database connection not valid for binding functions."); _sql.BindFunction(functionAttribute, function, _flags); } /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Attempts to unbind the specified <see cref="SQLiteFunction" /> object /// instance to this connection. /// </summary> /// <param name="functionAttribute"> /// The <see cref="SQLiteFunctionAttribute"/> object instance containing /// the metadata for the function to be unbound. /// </param> /// <returns>Non-zero if the function was unbound.</returns> public bool UnbindFunction( SQLiteFunctionAttribute functionAttribute ) { |
︙ | ︙ | |||
1633 1634 1635 1636 1637 1638 1639 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteConnection).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// | < < < < < < | | 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteConnection).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// protected override void Dispose(bool disposing) { #if !NET_COMPACT_20 && TRACE_WARNING if ((_flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { if (_noDispose) { System.Diagnostics.Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Disposing of connection \"{0}\" with the no-dispose flag set.", _connectionString)); } } #endif |
︙ | ︙ | |||
2087 2088 2089 2090 2091 2092 2093 | if (UnsafeNativeMethods.GetSettingValue("No_SQLiteConnectionNewParser", null) != null) arParts = SQLiteConvert.Split(s, ';'); else arParts = SQLiteConvert.NewSplit(s, ';', true, ref error); if (arParts == null) { | < | | 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 | if (UnsafeNativeMethods.GetSettingValue("No_SQLiteConnectionNewParser", null) != null) arParts = SQLiteConvert.Split(s, ';'); else arParts = SQLiteConvert.NewSplit(s, ';', true, ref error); if (arParts == null) { 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; // For each semi-colon piece, split into key and value pairs by the presence of the = sign for (n = 0; n < x; n++) |
︙ | ︙ | |||
2112 2113 2114 2115 2116 2117 2118 | int indexOf = arParts[n].IndexOf('='); 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 | | | 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 | int indexOf = arParts[n].IndexOf('='); 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(String.Format(CultureInfo.CurrentCulture, "Invalid ConnectionString format for part \"{0}\", no equal sign found", arParts[n])); } return ls; } /// <summary> /// Parses a connection string using the built-in (i.e. framework provided) /// connection string parser class and returns the key/value pairs. An |
︙ | ︙ | |||
2312 2313 2314 2315 2316 2317 2318 | public void EnableExtensions( bool enable ) { CheckDisposed(); if (_sql == null) | | | 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 | public void EnableExtensions( bool enable ) { CheckDisposed(); if (_sql == null) throw new InvalidOperationException(String.Format( CultureInfo.CurrentCulture, "Database connection not valid for {0} extensions.", enable ? "enabling" : "disabling")); if ((_flags & SQLiteConnectionFlags.NoLoadExtension) == SQLiteConnectionFlags.NoLoadExtension) throw new SQLiteException("Loading extensions is disabled for this database connection."); |
︙ | ︙ | |||
2435 2436 2437 2438 2439 2440 2441 | StringBuilder result = new StringBuilder(); int length = array.Length; for (int index = 0; index < length; index++) #if NET_COMPACT_20 | < < | | 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 | StringBuilder result = new StringBuilder(); int length = array.Length; for (int index = 0; index < length; index++) #if NET_COMPACT_20 result.Append(String.Format("{0:x2}", array[index])); #else result.AppendFormat("{0:x2}", array[index]); #endif return result.ToString(); } |
︙ | ︙ | |||
2487 2488 2489 2490 2491 2492 2493 | for (int index = 0; index < text.Length; index += 2) { string value = text.Substring(index, 2); if (!TryParseByte(value, NumberStyles.HexNumber, out result[index / 2])) { | | | 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 | for (int index = 0; index < text.Length; index += 2) { string value = text.Substring(index, 2); if (!TryParseByte(value, NumberStyles.HexNumber, out result[index / 2])) { error = String.Format( CultureInfo.CurrentCulture, "string contains \"{0}\", which cannot be converted to a byte value", value); return null; } } |
︙ | ︙ | |||
2643 2644 2645 2646 2647 2648 2649 | #if !NET_COMPACT_20 && TRACE_WARNING bool uri = false; #endif bool fullUri = false; string fileName; if (Convert.ToInt32(FindKey(opts, "Version", DefaultVersion.ToString()), CultureInfo.InvariantCulture) != DefaultVersion) | | | 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 | #if !NET_COMPACT_20 && TRACE_WARNING bool uri = false; #endif bool fullUri = false; string fileName; if (Convert.ToInt32(FindKey(opts, "Version", DefaultVersion.ToString()), CultureInfo.InvariantCulture) != 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); if (zipVfsVersion != null) { |
︙ | ︙ | |||
2667 2668 2669 2670 2671 2672 2673 | else if (String.Compare(zipVfsVersion, ZipVfs_V3) == 0) { UnsafeNativeMethods.zipvfsInit_v3(0); useZipVfs = true; } else { | | | | 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 | else if (String.Compare(zipVfsVersion, ZipVfs_V3) == 0) { UnsafeNativeMethods.zipvfsInit_v3(0); useZipVfs = true; } else { 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 fileName = FindKey(opts, "Data Source", DefaultDataSource); if (String.IsNullOrEmpty(fileName)) { fileName = FindKey(opts, "Uri", DefaultUri); if (String.IsNullOrEmpty(fileName)) { fileName = FindKey(opts, "FullUri", DefaultFullUri); if (String.IsNullOrEmpty(fileName)) 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 { fileName = MapUriPath(fileName); #if !NET_COMPACT_20 && TRACE_WARNING |
︙ | ︙ | |||
2705 2706 2707 2708 2709 2710 2711 | #if !NET_COMPACT_20 && TRACE_WARNING if ((_flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { if (!uri && !fullUri && !isMemory && !String.IsNullOrEmpty(fileName) && fileName.StartsWith("\\", StringComparison.OrdinalIgnoreCase) && !fileName.StartsWith("\\\\", StringComparison.OrdinalIgnoreCase)) { | | | 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 | #if !NET_COMPACT_20 && TRACE_WARNING if ((_flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { if (!uri && !fullUri && !isMemory && !String.IsNullOrEmpty(fileName) && fileName.StartsWith("\\", StringComparison.OrdinalIgnoreCase) && !fileName.StartsWith("\\\\", StringComparison.OrdinalIgnoreCase)) { 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)); } } |
︙ | ︙ | |||
2787 2788 2789 2790 2791 2792 2793 | if (hexPassword != null) { string error = null; byte[] hexPasswordBytes = FromHexString(hexPassword, ref error); if (hexPasswordBytes == null) { | | | 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 | if (hexPassword != null) { string error = null; byte[] hexPasswordBytes = FromHexString(hexPassword, ref error); if (hexPasswordBytes == null) { throw new FormatException(String.Format( CultureInfo.CurrentCulture, "Cannot parse 'HexPassword' property value into byte values: {0}", error)); } _sql.SetPassword(hexPasswordBytes); } |
︙ | ︙ | |||
2831 2832 2833 2834 2835 2836 2837 | if (boolValue) { using (SQLiteCommand cmd = CreateCommand()) { if (_busyTimeout != DefaultBusyTimeout) { | | | | | | | | | | | 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 | if (boolValue) { using (SQLiteCommand cmd = CreateCommand()) { if (_busyTimeout != DefaultBusyTimeout) { cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA busy_timeout={0}", _busyTimeout); cmd.ExecuteNonQuery(); } int intValue; if (!fullUri && !isMemory) { strValue = FindKey(opts, "Page Size", DefaultPageSize.ToString()); intValue = Convert.ToInt32(strValue, CultureInfo.InvariantCulture); if (intValue != DefaultPageSize) { 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 = 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 = 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 = 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 = String.Format(CultureInfo.InvariantCulture, "PRAGMA cache_size={0}", intValue); cmd.ExecuteNonQuery(); } strValue = FindKey(opts, "Journal Mode", DefaultJournalMode.ToString()); enumValue = TryParseEnum(typeof(SQLiteJournalModeEnum), strValue, true); if (!(enumValue is SQLiteJournalModeEnum) || ((SQLiteJournalModeEnum)enumValue != DefaultJournalMode)) { string pragmaStr = "PRAGMA journal_mode={0}"; #if INTEROP_INCLUDE_ZIPVFS if (useZipVfs) pragmaStr = "PRAGMA zipvfs_journal_mode={0}"; #endif 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 = 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 = String.Format(CultureInfo.InvariantCulture, "PRAGMA recursive_triggers={0}", boolValue ? "ON" : "OFF"); cmd.ExecuteNonQuery(); } } } if (_progressHandler != null) _sql.SetProgressHook(_progressOps, _progressCallback); |
︙ | ︙ | |||
3290 3291 3292 3293 3294 3295 3296 | /// The size of the largest committed free block in the heap, in bytes. /// This value will be zero unless heap compaction is enabled. /// </param> /// <returns> /// A standard SQLite return code (i.e. zero for success and non-zero /// for failure). /// </returns> | < < | 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 | /// The size of the largest committed free block in the heap, in bytes. /// This value will be zero unless heap compaction is enabled. /// </param> /// <returns> /// A standard SQLite return code (i.e. zero for success and non-zero /// for failure). /// </returns> public static SQLiteErrorCode ReleaseMemory( int nBytes, bool reset, bool compact, ref int nFree, ref bool resetOk, ref uint nLargest ) { return SQLite3.StaticReleaseMemory( nBytes, reset, compact, ref nFree, ref resetOk, ref nLargest); } /// <summary> /// 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. /// </summary> /// <param name="value">Non-zero to enable memory usage tracking, zero otherwise.</param> |
︙ | ︙ | |||
3444 3445 3446 3447 3448 3449 3450 | { if (sourceId == null) sourceId = "0000000000000000000000000000000000000000"; if (sourceTimeStamp == null) sourceTimeStamp = "0000-00-00 00:00:00 UTC"; | < < | | 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 | { if (sourceId == null) sourceId = "0000000000000000000000000000000000000000"; if (sourceTimeStamp == null) sourceTimeStamp = "0000-00-00 00:00:00 UTC"; return String.Format("{0} {1}", sourceId, sourceTimeStamp); } else { return null; } } } |
︙ | ︙ | |||
3520 3521 3522 3523 3524 3525 3526 | throw new InvalidOperationException("Database connection not valid for shutdown."); _sql.Close(true); /* NOTE: MUST be closed before shutdown. */ SQLiteErrorCode rc = _sql.Shutdown(); #if !NET_COMPACT_20 && TRACE_CONNECTION if (rc != SQLiteErrorCode.Ok) | | | 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 | throw new InvalidOperationException("Database connection not valid for shutdown."); _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(String.Format( CultureInfo.CurrentCulture, "Shutdown (Instance) Failed: {0}", rc)); #endif return rc; } |
︙ | ︙ | |||
3550 3551 3552 3553 3554 3555 3556 | ) { SQLiteErrorCode rc = SQLite3.StaticShutdown(directories); if (rc != SQLiteErrorCode.Ok) { #if !NET_COMPACT_20 && TRACE_CONNECTION | | | 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 | ) { SQLiteErrorCode rc = SQLite3.StaticShutdown(directories); if (rc != SQLiteErrorCode.Ok) { #if !NET_COMPACT_20 && TRACE_CONNECTION System.Diagnostics.Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Shutdown (Static) Failed: {0}", rc)); #endif if (!noThrow) throw new SQLiteException(rc, null); } |
︙ | ︙ | |||
4134 4135 4136 4137 4138 4139 4140 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; | | | | 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; 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(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) { if (String.Compare(schemaRow[SchemaTableColumn.ColumnName].ToString(), strColumn, StringComparison.OrdinalIgnoreCase) == 0 || strColumn == null) |
︙ | ︙ | |||
4237 4238 4239 4240 4241 4242 4243 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; | | | | 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; 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; primaryKeys.Clear(); if (String.IsNullOrEmpty(strTable) || String.Compare(rdTables.GetString(2), strTable, StringComparison.OrdinalIgnoreCase) == 0) { // 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(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) { primaryKeys.Add(rdTable.GetInt32(0)); |
︙ | ︙ | |||
4277 4278 4279 4280 4281 4282 4283 | { row = tbl.NewRow(); row["TABLE_CATALOG"] = strCatalog; row["TABLE_NAME"] = rdTables.GetString(2); row["INDEX_CATALOG"] = strCatalog; row["PRIMARY_KEY"] = true; | | | | | | 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 | { row = tbl.NewRow(); row["TABLE_CATALOG"] = strCatalog; row["TABLE_NAME"] = rdTables.GetString(2); row["INDEX_CATALOG"] = strCatalog; row["PRIMARY_KEY"] = true; 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) { tbl.Rows.Add(row); } primaryKeys.Clear(); } // Now fetch all the rest of the indexes. try { 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 || strIndex == null) { row = tbl.NewRow(); row["TABLE_CATALOG"] = strCatalog; row["TABLE_NAME"] = rdTables.GetString(2); row["INDEX_CATALOG"] = strCatalog; 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(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) row["INDEX_DEFINITION"] = rdIndexes.GetString(4); break; } } // 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(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()) { if (primaryKeys.Contains(rdDetails.GetInt32(1)) == false) { |
︙ | ︙ | |||
4383 4384 4385 4386 4387 4388 4389 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(table)) table = null; if (String.IsNullOrEmpty(catalog)) catalog = "main"; string master = (String.Compare(catalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; | | | 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 | tbl.BeginLoadData(); 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(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 || triggerName == null) { |
︙ | ︙ | |||
4438 4439 4440 4441 4442 4443 4444 | tbl.Columns.Add("TABLE_DEFINITION", typeof(string)); tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; | | | 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 | tbl.Columns.Add("TABLE_DEFINITION", typeof(string)); tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; 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); if (String.Compare(rd.GetString(2), 0, "SQLITE_", 0, 7, StringComparison.OrdinalIgnoreCase) == 0) strItem = "SYSTEM_TABLE"; |
︙ | ︙ | |||
4504 4505 4506 4507 4508 4509 4510 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; | | | 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 | tbl.BeginLoadData(); if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; 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 || String.IsNullOrEmpty(strView)) { |
︙ | ︙ | |||
4653 4654 4655 4656 4657 4658 4659 | if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); | | | | 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 | if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); 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; primaryKeys.Clear(); if (String.IsNullOrEmpty(strTable) || String.Compare(rdTables.GetString(2), strTable, StringComparison.OrdinalIgnoreCase) == 0) { try { 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 { primaryKeys.Add(new KeyValuePair<int, string>(rdTable.GetInt32(0), rdTable.GetString(1))); |
︙ | ︙ | |||
4687 4688 4689 4690 4691 4692 4693 | { } // This is a rowid row if (primaryKeys.Count == 1 && maybeRowId == true) { row = tbl.NewRow(); row["CONSTRAINT_CATALOG"] = strCatalog; | | | | | 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 | { } // This is a rowid row if (primaryKeys.Count == 1 && maybeRowId == true) { row = tbl.NewRow(); row["CONSTRAINT_CATALOG"] = strCatalog; 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; row["COLLATION_NAME"] = "BINARY"; row["SORT_MODE"] = "ASC"; row["CONFLICT_OPTION"] = 2; if (String.IsNullOrEmpty(strIndex) || String.Compare(strIndex, (string)row["INDEX_NAME"], StringComparison.OrdinalIgnoreCase) == 0) tbl.Rows.Add(row); } 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(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(); row["CONSTRAINT_CATALOG"] = strCatalog; row["CONSTRAINT_NAME"] = rdIndexes.GetString(1); |
︙ | ︙ | |||
4811 4812 4813 4814 4815 4816 4817 | if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); | | | | 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 | if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); 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(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; strSql = strSql.Substring(n + 4); |
︙ | ︙ | |||
4916 4917 4918 4919 4920 4921 4922 | if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); | | | | | 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 | if (String.IsNullOrEmpty(strCatalog)) strCatalog = "main"; string master = (String.Compare(strCatalog, "temp", StringComparison.OrdinalIgnoreCase) == 0) ? _tempmasterdb : _masterdb; tbl.BeginLoadData(); 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(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].foreign_key_list([{1}])", strCatalog, rdTables.GetString(2)), this)) using (SQLiteDataReader rdKey = cmdKey.ExecuteReader()) { while (rdKey.Read()) { row = tbl.NewRow(); row["CONSTRAINT_CATALOG"] = strCatalog; row["CONSTRAINT_NAME"] = String.Format(CultureInfo.InvariantCulture, "FK_{0}_{1}_{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; row["FKEY_ID"] = rdKey[0]; row["FKEY_FROM_COLUMN"] = builder.UnquoteIdentifier(rdKey[3].ToString()); |
︙ | ︙ | |||
5087 5088 5089 5090 5091 5092 5093 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Progress\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
5140 5141 5142 5143 5144 5145 5146 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Authorize\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
5189 5190 5191 5192 5193 5194 5195 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Update\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
5280 5281 5282 5283 5284 5285 5286 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Trace\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
5342 5343 5344 5345 5346 5347 5348 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Commit\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
5384 5385 5386 5387 5388 5389 5390 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Rollback\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
5543 5544 5545 5546 5547 5548 5549 | int totalPages, bool retry ); #endregion /////////////////////////////////////////////////////////////////////////////////////////////// | < < < | 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 | int totalPages, bool retry ); #endregion /////////////////////////////////////////////////////////////////////////////////////////////// public class ProgressEventArgs : EventArgs { /// <summary> /// The user-defined native data associated with this event. Currently, /// this will always contain the value of <see cref="IntPtr.Zero" />. /// </summary> public readonly IntPtr UserData; |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConvert.cs.
︙ | ︙ | |||
1148 1149 1150 1151 1152 1153 1154 | case TypeCode.Decimal: return ((decimal)obj) != Decimal.Zero ? true : false; case TypeCode.String: return viaFramework ? Convert.ToBoolean(obj, provider) : ToBoolean(ToStringWithProvider(obj, provider)); default: | | | 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | case TypeCode.Decimal: return ((decimal)obj) != Decimal.Zero ? true : false; case TypeCode.String: return viaFramework ? Convert.ToBoolean(obj, provider) : ToBoolean(ToStringWithProvider(obj, provider)); default: throw new SQLiteException(String.Format( CultureInfo.CurrentCulture, "Cannot convert type {0} to boolean", typeCode)); } } /// <summary> |
︙ | ︙ | |||
1439 1440 1441 1442 1443 1444 1445 | DbType dbType, SQLiteConnectionFlags flags, string typeName ) { if ((flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { | | | 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 | DbType dbType, SQLiteConnectionFlags flags, string typeName ) { if ((flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning) { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Type mapping failed, returning default name \"{0}\" for type {1}.", typeName, dbType)); } } /// <summary> |
︙ | ︙ | |||
1468 1469 1470 1471 1472 1473 1474 | SQLiteConnectionFlags flags, DbType? dbType ) { if (!String.IsNullOrEmpty(typeName) && ((flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning)) { | | | 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 | SQLiteConnectionFlags flags, DbType? dbType ) { if (!String.IsNullOrEmpty(typeName) && ((flags & SQLiteConnectionFlags.TraceWarning) == SQLiteConnectionFlags.TraceWarning)) { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Type mapping failed, returning default type {0} for name \"{1}\".", dbType, typeName)); } } #endif |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDataAdapter.cs.
︙ | ︙ | |||
135 136 137 138 139 140 141 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteDataAdapter).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// | < < < < < < | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteDataAdapter).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// protected override void Dispose(bool disposing) { try { if (!disposed) { if (disposing) |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDataReader.cs.
︙ | ︙ | |||
1076 1077 1078 1079 1080 1081 1082 | } } } if (wantDefaultValue) { // Determine the default value for the column, which sucks because we have to query the schema for each column | | | 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 | } } } 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(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].TABLE_INFO([{1}])", row[SchemaTableOptionalColumn.BaseCatalogName], row[SchemaTableColumn.BaseTableName] ), _command.Connection)) using (DbDataReader rdTable = cmdTable.ExecuteReader()) { // Find the matching column while (rdTable.Read()) |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteEnlistment.cs.
︙ | ︙ | |||
92 93 94 95 96 97 98 | // NOTE: When in "strict" mode, throw an exception if the isolation // level is not recognized; otherwise, fallback to the default // isolation level specified by the caller. // if (throwOnUnsupported) { throw new InvalidOperationException( | | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | // NOTE: When in "strict" mode, throw an exception if the isolation // level is not recognized; otherwise, fallback to the default // isolation level specified by the caller. // if (throwOnUnsupported) { throw new InvalidOperationException( String.Format(CultureInfo.InvariantCulture, "unsupported isolation level {0}", isolationLevel)); } return defaultIsolationLevel; } /////////////////////////////////////////////////////////////////////////// |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteException.cs.
1 2 3 4 5 6 7 8 9 10 11 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data.Common; | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data.Common; #if !PLATFORM_COMPACTFRAMEWORK using System.Reflection; using System.Runtime.Serialization; using System.Security.Permissions; #endif |
︙ | ︙ | |||
179 180 181 182 183 184 185 | /// <param name="message">Optional detailed error message.</param> /// <returns>Error message text for the return code.</returns> private static string GetStockErrorMessage( SQLiteErrorCode errorCode, string message ) { | < < | | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | /// <param name="message">Optional detailed error message.</param> /// <returns>Error message text for the return code.</returns> private static string GetStockErrorMessage( SQLiteErrorCode errorCode, string message ) { return String.Format("{0}{1}{2}", GetErrorString(errorCode), #if !NET_COMPACT_20 Environment.NewLine, message).Trim(); #else "\r\n", message).Trim(); #endif } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteFactory.cs.
︙ | ︙ | |||
26 27 28 29 30 31 32 | // been moved to the new SQLiteLog static class. // } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable Members | < < < | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | // been moved to the new SQLiteLog static class. // } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable Members public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } #endregion |
︙ | ︙ | |||
73 74 75 76 77 78 79 | } } #endregion /////////////////////////////////////////////////////////////////////////////////////////////// #region Destructor | < < < | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | } } #endregion /////////////////////////////////////////////////////////////////////////////////////////////// #region Destructor ~SQLiteFactory() { Dispose(false); } #endregion /////////////////////////////////////////////////////////////////////////////////////////////// |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteFunction.cs.
︙ | ︙ | |||
63 64 65 66 67 68 69 | /// </summary> private SQLiteCallback _StepFunc; /// <summary> /// Holds a reference to the callback function for finalizing an aggregate function /// </summary> private SQLiteFinalCallback _FinalFunc; /// <summary> | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /// </summary> private SQLiteCallback _StepFunc; /// <summary> /// Holds a reference to the callback function for finalizing an aggregate function /// </summary> private SQLiteFinalCallback _FinalFunc; /// <summary> /// Holds a reference to the callback function for collation sequences /// </summary> private SQLiteCollation _CompareFunc; private SQLiteCollation _CompareFunc16; /// <summary> /// Current context of the current callback. Only valid during a callback |
︙ | ︙ | |||
197 198 199 200 201 202 203 | } } #endregion /////////////////////////////////////////////////////////////////////////////////////////////// #region Destructor | < < < | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | } } #endregion /////////////////////////////////////////////////////////////////////////////////////////////// #region Destructor ~SQLiteFunction() { Dispose(false); } #endregion /////////////////////////////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
276 277 278 279 280 281 282 | public virtual object Final(object contextData) { CheckDisposed(); return null; } /// <summary> | | | | | | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | public virtual object Final(object contextData) { CheckDisposed(); return null; } /// <summary> /// User-defined collation sequences override this method to provide a custom string sorting algorithm. /// </summary> /// <param name="param1">The first string to compare</param> /// <param name="param2">The second strnig to compare</param> /// <returns>1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2</returns> public virtual int Compare(string param1, string param2) { CheckDisposed(); return 0; } /// <summary> |
︙ | ︙ | |||
416 417 418 419 420 421 422 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | | 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Invoke\" method: {0}", e)); /* throw */ } } catch { // do nothing. } } } /// <summary> /// Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. /// WARNING: Must not throw exceptions. /// </summary> /// <param name="ptr">Not used</param> /// <param name="len1">Length of the string pv1</param> /// <param name="ptr1">Pointer to the first string to compare</param> /// <param name="len2">Length of the string pv2</param> /// <param name="ptr2">Pointer to the second string to compare</param> |
︙ | ︙ | |||
454 455 456 457 458 459 460 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Compare\" (UTF8) method: {0}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
476 477 478 479 480 481 482 | if ((_base != null) && _base.IsOpen()) _base.Cancel(); return 0; } /// <summary> | | | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | if ((_base != null) && _base.IsOpen()) _base.Cancel(); return 0; } /// <summary> /// Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function. /// WARNING: Must not throw exceptions. /// </summary> /// <param name="ptr">Not used</param> /// <param name="len1">Length of the string pv1</param> /// <param name="ptr1">Pointer to the first string to compare</param> /// <param name="len2">Length of the string pv2</param> /// <param name="ptr2">Pointer to the second string to compare</param> |
︙ | ︙ | |||
501 502 503 504 505 506 507 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Compare\" (UTF16) method: {0}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
574 575 576 577 578 579 580 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Step\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
629 630 631 632 633 634 635 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | | | 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Final\" method: {1}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
727 728 729 730 731 732 733 | /// <summary> /// Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported. /// </summary> /// <param name="typ">The type of the function to register</param> public static void RegisterFunction(Type typ) { | | > | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | < < < | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | /// <summary> /// Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported. /// </summary> /// <param name="typ">The type of the function to register</param> public static void RegisterFunction(Type typ) { 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); } } } /// <summary> /// 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 /// as the connection (UTF-8 or UTF-16). /// </summary> |
︙ | ︙ | |||
868 869 870 871 872 873 874 | in _registeredFunctions) { SQLiteFunctionAttribute pr = pair.Key; if (pr == null) continue; | | | < | | | < < < < < | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | in _registeredFunctions) { SQLiteFunctionAttribute pr = pair.Key; if (pr == null) continue; SQLiteFunction f = (SQLiteFunction)Activator.CreateInstance( pr.InstanceType); BindFunction(sqlbase, pr, f, flags); lFunctions[pr] = f; } return lFunctions; } /// <summary> /// Called by the SQLiteBase derived classes, this method unbinds all registered (known) |
︙ | ︙ | |||
964 965 966 967 968 969 970 | } } return result; } /// <summary> | | | 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | } } return result; } /// <summary> /// This function binds a user-defined functions to a connection. /// </summary> /// <param name="sqliteBase"> /// The <see cref="SQLiteBase" /> object instance associated with the /// <see cref="SQLiteConnection" /> that the function should be bound to. /// </param> /// <param name="functionAttribute"> /// The <see cref="SQLiteFunctionAttribute"/> object instance containing |
︙ | ︙ | |||
1090 1091 1092 1093 1094 1095 1096 | { return sqliteBase.CreateCollation( name, null, null, false) == SQLiteErrorCode.Ok; } } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 | { return sqliteBase.CreateCollation( name, null, null, false) == SQLiteErrorCode.Ok; } } } /// <summary> /// Extends SQLiteFunction and allows an inherited class to obtain the collating sequence associated with a function call. /// </summary> /// <remarks> /// User-defined functions can call the GetCollationSequence() method in this class and use it to compare strings and char arrays. /// </remarks> |
︙ | ︙ | |||
1720 1721 1722 1723 1724 1725 1726 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteFunctionEx).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// | < < < < < < | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 | if (disposed) throw new ObjectDisposedException(typeof(SQLiteFunctionEx).Name); #endif } /////////////////////////////////////////////////////////////////////////////////////////////// protected override void Dispose(bool disposing) { try { if (!disposed) { //if (disposing) |
︙ | ︙ | |||
1772 1773 1774 1775 1776 1777 1778 | Scalar = 0, /// <summary> /// 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. /// </summary> Aggregate = 1, /// <summary> | | | 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 | Scalar = 0, /// <summary> /// 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. /// </summary> Aggregate = 1, /// <summary> /// 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. /// </summary> Collation = 2, } /// <summary> |
︙ | ︙ | |||
1798 1799 1800 1801 1802 1803 1804 | /// </summary> /// <param name="context">Raw context pointer for the user function</param> #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif internal delegate void SQLiteFinalCallback(IntPtr context); /// <summary> | | | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 | /// </summary> /// <param name="context">Raw context pointer for the user function</param> #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif internal delegate void SQLiteFinalCallback(IntPtr context); /// <summary> /// Internal callback delegate for implementing collation sequences /// </summary> /// <param name="puser">Not used</param> /// <param name="len1">Length of the string pv1</param> /// <param name="pv1">Pointer to the first string to compare</param> /// <param name="len2">Length of the string pv2</param> /// <param name="pv2">Pointer to the second string to compare</param> /// <returns>Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteFunctionAttribute.cs.
1 2 3 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) | | < < | | < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | /******************************************************** * 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; /// <summary> /// 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. /// </summary> [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] public sealed class SQLiteFunctionAttribute : Attribute { private string _name; private int _argumentCount; private FunctionType _functionType; private Type _instanceType; /// <summary> /// Default constructor, initializes the internal variables for the function. /// </summary> public SQLiteFunctionAttribute() : this(String.Empty, -1, FunctionType.Scalar) { // do nothing. } /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="name"> /// The name of the function, as seen by the SQLite core library. /// </param> /// <param name="argumentCount"> /// The number of arguments that the function will accept. /// </param> |
︙ | ︙ | |||
53 54 55 56 57 58 59 | FunctionType functionType ) { _name = name; _argumentCount = argumentCount; _functionType = functionType; _instanceType = null; | < < | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | FunctionType functionType ) { _name = name; _argumentCount = argumentCount; _functionType = functionType; _instanceType = null; } /// <summary> /// The function's name as it will be used in SQLite command text. /// </summary> public string Name { |
︙ | ︙ | |||
86 87 88 89 90 91 92 | { get { return _functionType; } set { _functionType = value; } } /// <summary> /// The <see cref="System.Type" /> object instance that describes the class | | < < | < < < < < < < < < | < < < < < < < < < < < < < | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | { get { return _functionType; } set { _functionType = value; } } /// <summary> /// The <see cref="System.Type" /> object instance that describes the class /// containing the implementation for the associated function. /// </summary> internal Type InstanceType { get { return _instanceType; } set { _instanceType = value; } } } } |
Changes to System.Data.SQLite/SQLiteKeyReader.cs.
︙ | ︙ | |||
54 55 56 57 58 59 60 | { _command = cnn.CreateCommand(); for (int n = 0; n < columns.Length; n++) { columns[n] = builder.QuoteIdentifier(columns[n]); } } | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | { _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 { |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteLog.cs.
︙ | ︙ | |||
100 101 102 103 104 105 106 | /// <summary> /// The default log event handler. /// </summary> private static SQLiteLogEventHandler _defaultHandler; /////////////////////////////////////////////////////////////////////// | | | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | /// <summary> /// The default log event handler. /// </summary> private static SQLiteLogEventHandler _defaultHandler; /////////////////////////////////////////////////////////////////////// #if !INTEROP_LOG /// <summary> /// The log callback passed to native SQLite engine. This must live /// as long as the SQLite library has a pointer to it. /// </summary> private static SQLiteLogCallback _callback; /////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
174 175 176 177 178 179 180 | if (_domainUnload == null) { _domainUnload = new EventHandler(DomainUnload); AppDomain.CurrentDomain.DomainUnload += _domainUnload; } #endif | | | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | if (_domainUnload == null) { _domainUnload = new EventHandler(DomainUnload); AppDomain.CurrentDomain.DomainUnload += _domainUnload; } #endif #if !INTEROP_LOG // // NOTE: Create an instance of the SQLite wrapper class. // if (_sql == null) { _sql = new SQLite3( SQLiteDateFormats.Default, DateTimeKind.Unspecified, |
︙ | ︙ | |||
241 242 243 244 245 246 247 | // // NOTE: Disable logging. If necessary, it can be re-enabled // later by the Initialize method. // _enabled = false; | | | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | // // NOTE: Disable logging. If necessary, it can be re-enabled // later by the Initialize method. // _enabled = false; #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. // if (_sql != null) { |
︙ | ︙ | |||
555 556 557 558 559 560 561 | { type = "trace"; } if ((errorCode != null) && !Object.ReferenceEquals(errorCode, String.Empty)) { | | | | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | { type = "trace"; } if ((errorCode != null) && !Object.ReferenceEquals(errorCode, String.Empty)) { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "SQLite {0} ({1}): {2}", type, errorCode, message)); } else { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "SQLite {0}: {1}", type, message)); } #endif } } } |
Changes to System.Data.SQLite/SQLiteModule.cs.
︙ | ︙ | |||
6163 6164 6165 6166 6167 6168 6169 | // try { if (LogExceptionsNoThrow) { /* throw */ SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | < | | 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 | // try { if (LogExceptionsNoThrow) { /* throw */ SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"{0}\" method: {1}", destroy ? "xDestroy" : "xDisconnect", e)); } } catch { // do nothing. |
︙ | ︙ | |||
6223 6224 6225 6226 6227 6228 6229 | ) { try { if (logErrors) { SQLiteLog.LogMessage(SQLiteErrorCode.Error, | < | | 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 | ) { try { if (logErrors) { SQLiteLog.LogMessage(SQLiteErrorCode.Error, String.Format(CultureInfo.CurrentCulture, "Virtual table error: {0}", error)); /* throw */ } } catch { // do nothing. } |
︙ | ︙ | |||
6271 6272 6273 6274 6275 6276 6277 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if (logExceptions) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | < | | 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if (logExceptions) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"SetTableError\" method: {0}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ | |||
6673 6674 6675 6676 6677 6678 6679 | if ((tables != null) && tables.TryGetValue(pVtab, out table)) { return table; } | | | 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 | if ((tables != null) && tables.TryGetValue(pVtab, out table)) { return table; } SetTableError(pVtab, String.Format( CultureInfo.CurrentCulture, "managed table for {0} not found", pVtab)); return null; } /////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
6767 6768 6769 6770 6771 6772 6773 | if ((cursors != null) && cursors.TryGetValue(pCursor, out cursor)) { return cursor; } | | | 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 | if ((cursors != null) && cursors.TryGetValue(pCursor, out cursor)) { return cursor; } SetTableError(pVtab, String.Format( CultureInfo.CurrentCulture, "managed cursor for {0} not found", pCursor)); return null; } /////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
6853 6854 6855 6856 6857 6858 6859 | /// </returns> protected virtual string GetFunctionKey( int argumentCount, string name, SQLiteFunction function ) { | < < | | 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 | /// </returns> protected virtual string GetFunctionKey( int argumentCount, string name, SQLiteFunction function ) { return String.Format("{0}:{1}", argumentCount, name); } #endregion /////////////////////////////////////////////////////////////////////// #region Table Declaration Helper Methods /// <summary> |
︙ | ︙ | |||
8680 8681 8682 8683 8684 8685 8686 | catch (Exception e) { try { if (LogExceptionsNoThrow) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, | < | | 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 | catch (Exception e) { try { if (LogExceptionsNoThrow) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Dispose\" method: {0}", e)); /* throw */ } } catch { // do nothing. |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteModuleCommon.cs.
︙ | ︙ | |||
19 20 21 22 23 24 25 | public class SQLiteModuleCommon : SQLiteModuleNoop /* NOT SEALED */ { #region Private Constants /// <summary> /// The CREATE TABLE statement used to declare the schema for the /// virtual table. /// </summary> | | < | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | public class SQLiteModuleCommon : SQLiteModuleNoop /* NOT SEALED */ { #region Private Constants /// <summary> /// The CREATE TABLE statement used to declare the schema for the /// virtual table. /// </summary> private static readonly string declareSql = String.Format( CultureInfo.CurrentCulture, "CREATE TABLE {0}(x);", typeof(SQLiteModuleCommon).Name); #endregion /////////////////////////////////////////////////////////////////////// #region Private Data /// <summary> /// Non-zero if different object instances with the same value should |
︙ | ︙ | |||
115 116 117 118 119 120 121 | protected virtual SQLiteErrorCode CursorTypeMismatchError( SQLiteVirtualTableCursor cursor, Type type ) { if (type != null) { | | | < | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | protected virtual SQLiteErrorCode CursorTypeMismatchError( SQLiteVirtualTableCursor cursor, Type type ) { if (type != null) { SetCursorError(cursor, String.Format("not a \"{0}\" cursor", type)); } else { SetCursorError(cursor, "cursor type mismatch"); } return SQLiteErrorCode.Error; |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteModuleEnumerable.cs.
︙ | ︙ | |||
499 500 501 502 503 504 505 | SQLiteIndex index ) { CheckDisposed(); if (!table.BestIndex(index)) { | < | | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | SQLiteIndex index ) { CheckDisposed(); if (!table.BestIndex(index)) { SetTableError(table, String.Format(CultureInfo.CurrentCulture, "failed to select best index for virtual table \"{0}\"", table.TableName)); return SQLiteErrorCode.Error; } return SQLiteErrorCode.Ok; |
︙ | ︙ | |||
827 828 829 830 831 832 833 | SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId ) { CheckDisposed(); | < | | 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId ) { CheckDisposed(); SetTableError(table, String.Format(CultureInfo.CurrentCulture, "virtual table \"{0}\" is read-only", table.TableName)); return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
857 858 859 860 861 862 863 | string newName ) { CheckDisposed(); if (!table.Rename(newName)) { | < | | 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | string newName ) { CheckDisposed(); if (!table.Rename(newName)) { SetTableError(table, String.Format(CultureInfo.CurrentCulture, "failed to rename virtual table from \"{0}\" to \"{1}\"", table.TableName, newName)); return SQLiteErrorCode.Error; } return SQLiteErrorCode.Ok; |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteParameterCollection.cs.
︙ | ︙ | |||
423 424 425 426 427 428 429 | foreach(SQLiteParameter p in _parameterList) { y ++; s = p.ParameterName; if (s == null) { | | | 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | foreach(SQLiteParameter p in _parameterList) { y ++; s = p.ParameterName; if (s == null) { s = String.Format(CultureInfo.InvariantCulture, ";{0}", nUnnamed); nUnnamed++; } int x; bool isMapped = false; if (activeStatement == null) |
︙ | ︙ | |||
452 453 454 455 456 457 458 | stmt = null; } // 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) { | | | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | stmt = null; } // 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 = String.Format(CultureInfo.InvariantCulture, ";{0}", y); stmt = activeStatement; for (n = 0; n < x; n++) { if (stmt == null) stmt = _command._statementList[n]; if (stmt._paramNames != null) { |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteStatement.cs.
1 2 3 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) | | | 1 2 3 4 5 6 7 8 9 10 11 | /******************************************************** * 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.Globalization; |
︙ | ︙ | |||
81 82 83 84 85 86 87 | _paramValues = new SQLiteParameter[n]; for (x = 0; x < n; x++) { s = _sql.Bind_ParamName(this, _flags, x + 1); if (String.IsNullOrEmpty(s)) { | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | _paramValues = new SQLiteParameter[n]; for (x = 0; x < n; x++) { s = _sql.Bind_ParamName(this, _flags, x + 1); if (String.IsNullOrEmpty(s)) { s = String.Format(CultureInfo.InvariantCulture, ";{0}", nCmdStart); nCmdStart++; _unnamedParameters++; } _paramNames[x] = s; _paramValues[x] = null; } } |
︙ | ︙ | |||
200 201 202 203 204 205 206 | /// this statement, and if so, keeps a reference to the parameter so it can be bound later. /// </summary> /// <param name="s">The parameter name to map</param> /// <param name="p">The parameter to assign it</param> internal bool MapParameter(string s, SQLiteParameter p) { if (_paramNames == null) return false; | | | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | /// this statement, and if so, keeps a reference to the parameter so it can be bound later. /// </summary> /// <param name="s">The parameter name to map</param> /// <param name="p">The parameter to assign it</param> internal bool MapParameter(string s, SQLiteParameter p) { if (_paramNames == null) return false; int startAt = 0; if (s.Length > 0) { if (":$@;".IndexOf(s[0]) == -1) startAt = 1; } |
︙ | ︙ | |||
254 255 256 257 258 259 260 | if ((obj != null) && (objType == DbType.Object)) objType = SQLiteConvert.TypeToDbType(obj.GetType()); if ((_flags & SQLiteConnectionFlags.LogPreBind) == SQLiteConnectionFlags.LogPreBind) { IntPtr handle = _sqlite_stmt; | | < | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | if ((obj != null) && (objType == DbType.Object)) objType = SQLiteConvert.TypeToDbType(obj.GetType()); if ((_flags & SQLiteConnectionFlags.LogPreBind) == SQLiteConnectionFlags.LogPreBind) { IntPtr handle = _sqlite_stmt; 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)) { _sql.Bind_Null(this, _flags, index); |
︙ | ︙ |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | ︙ | |||
119 120 121 122 123 124 125 | /// </summary> static UnsafeNativeMethods() { Initialize(); } ///////////////////////////////////////////////////////////////////////// | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | /// </summary> static UnsafeNativeMethods() { Initialize(); } ///////////////////////////////////////////////////////////////////////// /// <summary> /// Attempts to initialize this class by pre-loading the native SQLite /// library for the processor architecture of the current process. /// </summary> internal static void Initialize() { #if SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK |
︙ | ︙ | |||
369 370 371 372 373 374 375 | #if !PLATFORM_COMPACTFRAMEWORK bool expand = true; if (Environment.GetEnvironmentVariable("No_Expand") != null) { expand = false; } | | < | | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | #if !PLATFORM_COMPACTFRAMEWORK bool expand = true; if (Environment.GetEnvironmentVariable("No_Expand") != null) { expand = false; } else if (Environment.GetEnvironmentVariable(String.Format( "No_Expand_{0}", name)) != null) { expand = false; } value = Environment.GetEnvironmentVariable(name); if (expand && !String.IsNullOrEmpty(value)) |
︙ | ︙ | |||
396 397 398 399 400 401 402 | if (fileName == null) return @default; XmlDocument document = new XmlDocument(); document.Load(fileName); | | < | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | if (fileName == null) return @default; XmlDocument document = new XmlDocument(); document.Load(fileName); XmlElement element = document.SelectSingleNode(String.Format( "/configuration/appSettings/add[@key='{0}']", name)) as XmlElement; if (element != null) { if (element.HasAttribute("value")) value = element.GetAttribute("value"); |
︙ | ︙ | |||
424 425 426 427 428 429 430 | #else catch (Exception) #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { | | | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | #else catch (Exception) #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to get setting " + "\"{0}\" value: {1}", name, e)); /* throw */ } catch { // do nothing. |
︙ | ︙ | |||
540 541 542 543 544 545 546 | directory, XmlConfigFileName); if (File.Exists(xmlConfigFileName)) { #if !NET_COMPACT_20 && TRACE_DETECTION try { | | | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | directory, XmlConfigFileName); if (File.Exists(xmlConfigFileName)) { #if !NET_COMPACT_20 && TRACE_DETECTION try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader found XML configuration file " + "via code base for currently executing assembly: \"{0}\"", xmlConfigFileName)); /* throw */ } catch { |
︙ | ︙ | |||
563 564 565 566 567 568 569 | List<string> matches = null; if (CheckForArchitecturesAndPlatforms(directory, ref matches) > 0) { #if !NET_COMPACT_20 && TRACE_DETECTION try { | | | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | List<string> matches = null; if (CheckForArchitecturesAndPlatforms(directory, ref matches) > 0) { #if !NET_COMPACT_20 && TRACE_DETECTION try { 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 */ } catch { |
︙ | ︙ | |||
590 591 592 593 594 595 596 | #else catch (Exception) #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { | | | 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 | #else catch (Exception) #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to check code base " + "for currently executing assembly: {0}", e)); /* throw */ } catch { // do nothing. |
︙ | ︙ | |||
657 658 659 660 661 662 663 | #else catch (Exception) #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { | | | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | #else catch (Exception) #endif { #if !NET_COMPACT_20 && TRACE_SHARED try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to get directory " + "for currently executing assembly: {0}", e)); /* throw */ } catch { // do nothing. |
︙ | ︙ | |||
1027 1028 1029 1030 1031 1032 1033 | #if !NET_COMPACT_20 && TRACE_DETECTION try { // // NOTE: Show that we hit a fairly unusual situation (i.e. // the "wrong" processor architecture was detected). // | | | 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | #if !NET_COMPACT_20 && TRACE_DETECTION try { // // NOTE: Show that we hit a fairly unusual situation (i.e. // the "wrong" processor architecture was detected). // 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, processorArchitecture)); /* throw */ } |
︙ | ︙ | |||
1246 1247 1248 1249 1250 1251 1252 | #if !NET_COMPACT_20 && TRACE_PRELOAD try { // // NOTE: Show exactly where we are trying to load the native // SQLite library from. // | | | 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 | #if !NET_COMPACT_20 && TRACE_PRELOAD try { // // NOTE: Show exactly where we are trying to load the native // SQLite library from. // Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader is trying to load native " + "SQLite library \"{0}\"...", fileName)); /* throw */ } catch { // do nothing. |
︙ | ︙ | |||
1286 1287 1288 1289 1290 1291 1292 | int lastError = Marshal.GetLastWin32Error(); /* throw */ // // NOTE: Show where we failed to load the native SQLite // library from along with the Win32 error code and // exception information. // | | | 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | int lastError = Marshal.GetLastWin32Error(); /* throw */ // // NOTE: Show where we failed to load the native SQLite // library from along with the Win32 error code and // exception information. // Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "Native library pre-loader failed to load native " + "SQLite library \"{0}\" (getLastError = {1}): {2}", fileName, lastError, e)); /* throw */ } catch { |
︙ | ︙ | |||
3026 3027 3028 3029 3030 3031 3032 | if (localHandle != IntPtr.Zero) SQLiteBase.CloseConnection(this, localHandle); #endif #if !NET_COMPACT_20 && TRACE_HANDLE try { | | | 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 | if (localHandle != IntPtr.Zero) SQLiteBase.CloseConnection(this, localHandle); #endif #if !NET_COMPACT_20 && TRACE_HANDLE try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "CloseConnection: {0}", localHandle)); /* throw */ } catch { } #endif |
︙ | ︙ | |||
3061 3062 3063 3064 3065 3066 3067 | #else catch (SQLiteException) #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { | | | 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 | #else catch (SQLiteException) #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "CloseConnection: {0}, exception: {1}", handle, e)); /* throw */ } catch { } |
︙ | ︙ | |||
3214 3215 3216 3217 3218 3219 3220 | if (localHandle != IntPtr.Zero) SQLiteBase.FinalizeStatement(cnn, localHandle); #if !NET_COMPACT_20 && TRACE_HANDLE try { | | | 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 | if (localHandle != IntPtr.Zero) SQLiteBase.FinalizeStatement(cnn, localHandle); #if !NET_COMPACT_20 && TRACE_HANDLE try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinalizeStatement: {0}", localHandle)); /* throw */ } catch { } #endif |
︙ | ︙ | |||
3249 3250 3251 3252 3253 3254 3255 | #else catch (SQLiteException) #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { | | | 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 | #else catch (SQLiteException) #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinalizeStatement: {0}, exception: {1}", handle, e)); /* throw */ } catch { } |
︙ | ︙ | |||
3387 3388 3389 3390 3391 3392 3393 | if (localHandle != IntPtr.Zero) SQLiteBase.FinishBackup(cnn, localHandle); #if !NET_COMPACT_20 && TRACE_HANDLE try { | | | 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 | if (localHandle != IntPtr.Zero) SQLiteBase.FinishBackup(cnn, localHandle); #if !NET_COMPACT_20 && TRACE_HANDLE try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinishBackup: {0}", localHandle)); /* throw */ } catch { } #endif |
︙ | ︙ | |||
3422 3423 3424 3425 3426 3427 3428 | #else catch (SQLiteException) #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { | | | 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 | #else catch (SQLiteException) #endif { #if !NET_COMPACT_20 && TRACE_HANDLE try { Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "FinishBackup: {0}, exception: {1}", handle, e)); /* throw */ } catch { } |
︙ | ︙ |
Changes to Targets/SQLite.NET.targets.
︙ | ︙ | |||
114 115 116 117 118 119 120 | <Copy SourceFiles="$(TargetPath).config" DestinationFiles="$(TargetDir)$(TargetName)32$(TargetExt).config" Condition="Exists('$(TargetPath).config')" /> <Exec Condition="'$(DirForCloneAndMark32BitOnly)' != '' And HasTrailingSlash('$(DirForCloneAndMark32BitOnly)') And Exists('$(DirForCloneAndMark32BitOnly)bin\CorFlags.exe')" | | | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | <Copy SourceFiles="$(TargetPath).config" DestinationFiles="$(TargetDir)$(TargetName)32$(TargetExt).config" Condition="Exists('$(TargetPath).config')" /> <Exec Condition="'$(DirForCloneAndMark32BitOnly)' != '' And HasTrailingSlash('$(DirForCloneAndMark32BitOnly)') And Exists('$(DirForCloneAndMark32BitOnly)bin\CorFlags.exe')" Command=""$(DirForCloneAndMark32BitOnly)bin\CorFlags.exe" "$(TargetDir)$(TargetName)32$(TargetExt)" /32BIT+ /Force" /> <Exec Condition="'$(DirForCloneAndMark32BitOnly)' != '' And HasTrailingSlash('$(DirForCloneAndMark32BitOnly)') And Exists('$(DirForCloneAndMark32BitOnly)bin\sn.exe')" Command=""$(DirForCloneAndMark32BitOnly)bin\sn.exe" -Ra "$(TargetDir)$(TargetName)32$(TargetExt)" "$(AssemblyOriginatorKeyFile)"" /> <Touch Condition="'$(DirForCloneAndMark32BitOnly)' != '' And |
︙ | ︙ | |||
147 148 149 150 151 152 153 | <Copy SourceFiles="$(TargetPath).config" DestinationFiles="$(TargetDir)$(TargetName)32$(TargetExt).config" Condition="Exists('$(TargetPath).config')" /> <Exec Condition="'$(TargetFrameworkSDKToolsDirectory)' != '' And HasTrailingSlash('$(TargetFrameworkSDKToolsDirectory)') And Exists('$(TargetFrameworkSDKToolsDirectory)CorFlags.exe')" | | | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | <Copy SourceFiles="$(TargetPath).config" DestinationFiles="$(TargetDir)$(TargetName)32$(TargetExt).config" Condition="Exists('$(TargetPath).config')" /> <Exec Condition="'$(TargetFrameworkSDKToolsDirectory)' != '' And HasTrailingSlash('$(TargetFrameworkSDKToolsDirectory)') And Exists('$(TargetFrameworkSDKToolsDirectory)CorFlags.exe')" Command=""$(TargetFrameworkSDKToolsDirectory)CorFlags.exe" "$(TargetDir)$(TargetName)32$(TargetExt)" /32BIT+ /Force" /> <Exec Condition="'$(TargetFrameworkSDKToolsDirectory)' != '' And HasTrailingSlash('$(TargetFrameworkSDKToolsDirectory)') And Exists('$(TargetFrameworkSDKToolsDirectory)sn.exe')" Command=""$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetDir)$(TargetName)32$(TargetExt)" "$(AssemblyOriginatorKeyFile)"" /> <Touch Condition="'$(TargetFrameworkSDKToolsDirectory)' != '' And |
︙ | ︙ |
Changes to Tests/authorizer.eagle.
︙ | ︙ | |||
120 121 122 123 124 125 126 | set filter $name; set data [list] set code [catch {sql execute $db $value} result] set result [lindex [split [string map [list \r\n \n] $result] \n] 0] lappend results [list $name $data $code $result] } lappend results [isTableInDb tDeny] | < | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | set filter $name; set data [list] set code [catch {sql execute $db $value} result] set result [lindex [split [string map [list \r\n \n] $result] \n] 0] lappend results [list $name $data $code $result] } lappend results [isTableInDb tDeny] set results } -cleanup { catch {object invoke $connection remove_Authorize $callback} catch {object removecallback $callback} cleanupDb $fileName freeDbConnection |
︙ | ︙ | |||
158 159 160 161 162 163 164 | {{0 DropIndex i1 t1 main {}}} 0 0} {Recursive {{0 Recursive {} {} {} {}}} 0 -1}\ {DropTable {{0 DropTable t1 {} main {}}} 0 0} {Transaction {{0 Transaction\ 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\ | | | 157 158 159 160 161 162 163 164 165 166 167 168 169 | {{0 DropIndex i1 t1 main {}}} 0 0} {Recursive {{0 Recursive {} {} {} {}}} 0 -1}\ {DropTable {{0 DropTable t1 {} main {}}} 0 0} {Transaction {{0 Transaction\ 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 (0x80004005): authorization denied}} False}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
Changes to Tests/basic.eagle.
︙ | ︙ | |||
1570 1571 1572 1573 1574 1575 1576 | BuildTempSchema $connection } -cleanup { cleanupDb $fileName freeDbConnection unset -nocomplain providerServices connection db fileName | | | 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 | BuildTempSchema $connection } -cleanup { cleanupDb $fileName freeDbConnection unset -nocomplain providerServices connection db fileName } -constraints {eagle command.object SQLite System.Data.SQLite\ System.Data.SQLite.Linq} -result {}} ############################################################################### runTest {test data-1.30 {EF6 ISQLiteSchemaExtensions.BuildTempSchema} -setup { setupDb [set fileName data-1.30.db] } -body { |
︙ | ︙ | |||
1592 1593 1594 1595 1596 1597 1598 | BuildTempSchema $connection } -cleanup { cleanupDb $fileName freeDbConnection unset -nocomplain providerServices connection db fileName | | | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 | BuildTempSchema $connection } -cleanup { cleanupDb $fileName freeDbConnection unset -nocomplain providerServices connection db fileName } -constraints {eagle command.object SQLite System.Data.SQLite\ System.Data.SQLite.EF6} -result {}} ############################################################################### runTest {test data-1.31 {VARCHAR / NVARCHAR types with spaces} -body { list [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \ TypeNameToDbType null VARCHAR None] \ |
︙ | ︙ | |||
2379 2380 2381 2382 2383 2384 2385 | "SELECT replicate('1234', 4);"} output] $output set result } -cleanup { cleanupDb $fileName unset -nocomplain output result db fileName | | | < | | | 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 | "SELECT replicate('1234', 4);"} output] $output set result } -cleanup { cleanupDb $fileName unset -nocomplain output result db fileName } -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] } -body { sql execute $db { |
︙ | ︙ | |||
2695 2696 2697 2698 2699 2700 2701 | unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ | | | 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 | unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {1 {} 1.01 {}}} ############################################################################### runTest {test data-1.57 {regexp extension} -setup { setupDb [set fileName data-1.57.db] } -body { unset -nocomplain pattern result |
︙ | ︙ | |||
2755 2756 2757 2758 2759 2760 2761 | unset -nocomplain pattern result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ | | | | 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 | unset -nocomplain pattern result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {0 1 1 {unmatched '('} 0 1 1 {unmatched '('} 0 0 1\ {unmatched '('} 0 0 1 {unmatched '('}}} ############################################################################### reportSQLiteResources $test_channel ############################################################################### |
︙ | ︙ | |||
2837 2838 2839 2840 2841 2842 2843 | unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ | | | 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 | unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ 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 } -body { set connection [getDbConnection] |
︙ | ︙ | |||
3169 3170 3171 3172 3173 3174 3175 | cleanupDb $fileName restoreSQLiteConnectionEnvironment freeDbConnection unset -nocomplain connection db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ | | < | 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 | cleanupDb $fileName restoreSQLiteConnectionEnvironment freeDbConnection unset -nocomplain connection db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {Default Default}} ############################################################################### runTest {test data-1.69 {set env(DefaultFlags_SQLiteConnection)} -setup { saveSQLiteConnectionEnvironment set env(DefaultFlags_SQLiteConnection) "DetectTextAffinity, DetectStringType" |
︙ | ︙ | |||
3278 3279 3280 3281 3282 3283 3284 | unset -nocomplain x result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ | | | | | 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 | unset -nocomplain x result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ 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 } -body { set id [object invoke Interpreter.GetActive NextId] |
︙ | ︙ | |||
3588 3589 3590 3591 3592 3593 3594 | [string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\ \{\} 0 \{\} 0 (?:-)?\d+ 0 \{\} 1\ \{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 \{\}$}]} | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 | [string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\ \{\} 0 \{\} 0 (?:-)?\d+ 0 \{\} 1\ \{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 \{\}$}]} ############################################################################### reportSQLiteResources $test_channel ############################################################################### runSQLiteTestFilesEpilogue runSQLiteTestEpilogue runTestEpilogue |
Changes to Tests/linq.eagle.
︙ | ︙ | |||
87 88 89 90 91 92 93 | } else { lappend result [string trim $error] } set result } -cleanup { unset -nocomplain code output error result | < | | | | | | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | } 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 {{ 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 runTestEpilogue |
Changes to Tests/speed.eagle.
︙ | ︙ | |||
172 173 174 175 176 177 178 | } set result } -cleanup { cleanupDb $fileName unset -nocomplain time sql table column result char db fileName | | | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | } set result } -cleanup { cleanupDb $fileName unset -nocomplain time sql table column result char db fileName } -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {3 3 3 3}} ############################################################################### # # NOTE: Report after test. # |
︙ | ︙ |
Changes to Tests/stress.eagle.
︙ | ︙ | |||
1643 1644 1645 1646 1647 1648 1649 | rename cleanupLogging "" rename setupLogging "" 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 | | | 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 | rename cleanupLogging "" rename setupLogging "" 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 monoBug28 command.sql\ compile.DATA SQLite System.Data.SQLite compileCSharp} -result {0}} ############################################################################### # # NOTE: Report after test. # |
︙ | ︙ |
Deleted Tests/tkt-41aea496e0.eagle.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to Tests/tkt-47c6fa04d3.eagle.
︙ | ︙ | |||
113 114 115 116 117 118 119 | [expr {$code eq "Ok" ? [catch { object invoke -alias _Dynamic${id}.Test${id} GetDataTable } result] : [set result ""]}] $result [getRowsFromDataTable $result] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName | | | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | [expr {$code eq "Ok" ? [catch { object invoke -alias _Dynamic${id}.Test${id} GetDataTable } result] : [set result ""]}] $result [getRowsFromDataTable $result] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -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\}\}\}$}} ############################################################################### |
︙ | ︙ |
Changes to Tests/tkt-4a791e70ab.eagle.
︙ | ︙ | |||
67 68 69 70 71 72 73 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName | | | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
Changes to Tests/tkt-56b42d99c1.eagle.
︙ | ︙ | |||
95 96 97 98 99 100 101 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} TryEnlistInTransaction } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName | | | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} TryEnlistInTransaction } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code dataSource id db fileName } -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$}} ############################################################################### runTest {test tkt-56b42d99c1-1.2 {enlisted transaction isolation} -setup { setupDb [set fileName tkt-56b42d99c1-1.2.db] |
︙ | ︙ | |||
172 173 174 175 176 177 178 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName | | | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -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$}} ############################################################################### runTest {test tkt-56b42d99c1-1.3 {enlisted transaction isolation} -setup { setupDb [set fileName tkt-56b42d99c1-1.3.db] |
︙ | ︙ | |||
403 404 405 406 407 408 409 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName | | | 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -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$}} ############################################################################### set flags MapIsolationLevels |
︙ | ︙ |
Changes to Tests/tkt-964063da16.eagle.
︙ | ︙ | |||
25 26 27 28 29 30 31 | System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=False;"] $connection Open $connection Flags } -cleanup { unset -nocomplain connection | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=False;"] $connection Open $connection Flags } -cleanup { unset -nocomplain connection } -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 \ System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=True;"] |
︙ | ︙ | |||
53 54 55 56 57 58 59 | System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=False;"] $connection Flags NoExtensionFunctions; $connection Open $connection Flags } -cleanup { unset -nocomplain connection | | < | | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=False;"] $connection Flags NoExtensionFunctions; $connection Open $connection Flags } -cleanup { unset -nocomplain connection } -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 \ System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=True;"] |
︙ | ︙ |
Changes to Tests/tkt-aba4549801.eagle.
︙ | ︙ | |||
62 63 64 65 66 67 68 | rename onChanged "" } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ 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 \{\} \{\} \{\}\ | | | | | | | | | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | rename onChanged "" } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ 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 \{\} \{\} \{\}\ \{\}\} \{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+ \{\} \{\}\}\ \{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+\ \{\}\} \{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+\ \{\}\} \{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+\ \{\}\} \{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+\ \{\}\} \{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+\ \{\}\} \{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+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ \{System#Data#SQLite#SQLiteConnection#\d+ NewTransaction\ 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+\ \{\}\} \{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+\ \{\}\} \{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+\ \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\ System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\ |
︙ | ︙ |
Changes to Tests/tkt-ac47dd230a.eagle.
︙ | ︙ | |||
23 24 25 26 27 28 29 | runTest {test tkt-ac47dd230a-1.1 {multiple AppDomains} -setup { for {set i 1} {$i < 3} {incr i} { set appDomain($i) [object invoke AppDomain CreateDomain \ [appendArgs tkt-ac47dd230a-1.1. $i]] set result null set interpreterHelper($i) [object invoke -alias InterpreterHelper \ | | < | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | runTest {test tkt-ac47dd230a-1.1 {multiple AppDomains} -setup { for {set i 1} {$i < 3} {incr i} { 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 null null null result] if {[string length $interpreterHelper($i)] == 0} then { error [object invoke $result ToString] } set interpreter($i) [$interpreterHelper($i) -alias Interpreter] |
︙ | ︙ |
Changes to Tests/tkt-e06c4caff3.eagle.
︙ | ︙ | |||
27 28 29 30 31 32 33 | sql execute $db "INSERT INTO t1 (x) VALUES(?);" \ [list param1 Double [set NaN [object invoke Double NaN]]] } -cleanup { cleanupDb $fileName unset -nocomplain NaN db fileName | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | sql execute $db "INSERT INTO t1 (x) VALUES(?);" \ [list param1 Double [set NaN [object invoke Double NaN]]] } -cleanup { cleanupDb $fileName unset -nocomplain NaN db fileName } -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 .*$}]} ############################################################################### |
︙ | ︙ |
Changes to Tests/tkt-f8dbab8baf.eagle.
︙ | ︙ | |||
127 128 129 130 131 132 133 | [expr {[info exists rows(count)] ? $rows(count) : -1}] \ [expr {[info exists rows(names)] ? $rows(names) : ""}] } -cleanup { cleanupDb $fileName unset -nocomplain rows db fileName } -constraints \ | | | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | [expr {[info exists rows(count)] ? $rows(count) : -1}] \ [expr {[info exists rows(names)] ? $rows(names) : ""}] } -cleanup { cleanupDb $fileName unset -nocomplain rows db fileName } -constraints \ {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.*$}]} ############################################################################### |
︙ | ︙ |
Changes to data/exclude_bin.txt.
1 2 3 4 5 6 7 8 9 10 11 12 | *.done *.exp *.lib *.manifest *.map *.mda.config *.txt *32.exe *32.exe.config *EntityFramework.* *EnvDTE.* *Microsoft.* | < | 1 2 3 4 5 6 7 8 9 10 11 12 | *.done *.exp *.lib *.manifest *.map *.mda.config *.txt *32.exe *32.exe.config *EntityFramework.* *EnvDTE.* *Microsoft.* |
Changes to lib/System.Data.SQLite/common.eagle.
︙ | ︙ | |||
509 510 511 512 513 514 515 | # NOTE: If the primary assembly also contains the native components, # we have everything we need. # if {$native} then { return true } | < < < < < < < < < < < < < < < < < < < | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | # NOTE: If the primary assembly also contains the native components, # we have everything we need. # if {$native} then { return true } # # NOTE: What is the platform for this machine? # set platform [machineToPlatform $::tcl_platform(machine)] # # 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 \ $platform SQLite.Interop.dll]] if {[file exists $fileName]} then { return true } set fileName [file nativename [file join $directory \ SQLite.Interop.dll]] if {[file exists $fileName]} then { return true } # # 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 \ $platform sqlite3.dll]] if {[file exists $fileName]} then { return true } |
︙ | ︙ | |||
1216 1217 1218 1219 1220 1221 1222 | # always return zero. # return [expr { [haveConstraint System.Data.SQLite] && [haveConstraint SQLite] }] } | | | 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 | # always return zero. # return [expr { [haveConstraint System.Data.SQLite] && [haveConstraint SQLite] }] } 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 { return true } |
︙ | ︙ | |||
1344 1345 1346 1347 1348 1349 1350 | # if {[isBuildAvailable $native $directory]} then { # # NOTE: When in "select" mode, automatically select the first # available build of System.Data.SQLite and then return # immediately. # | | | 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | # if {[isBuildAvailable $native $directory]} then { # # NOTE: When in "select" mode, automatically select the first # available build of System.Data.SQLite and then return # immediately. # 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. # if {![changeNativeRuntimeOption $native]} then { tputs $channel [appendArgs \ |
︙ | ︙ | |||
1405 1406 1407 1408 1409 1410 1411 | $directory "\"... "] if {[isReleaseAvailable $directory platform]} then { if {[string length $platform] == 0} then { set platform unknown } | | | 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 | $directory "\"... "] if {[isReleaseAvailable $directory platform]} then { if {[string length $platform] == 0} then { set platform unknown } if {$select && [matchMachine $platform]} then { set ::build_directory $directory tputs $channel [appendArgs "yes, selected (" $platform ")\n"] return true } else { tputs $channel [appendArgs "yes (" $platform ")\n"] |
︙ | ︙ | |||
1428 1429 1430 1431 1432 1433 1434 | $path "\"... "] if {[isReleaseAvailable $path platform]} then { if {[string length $platform] == 0} then { set platform unknown } | | | 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 | $path "\"... "] if {[isReleaseAvailable $path platform]} then { if {[string length $platform] == 0} then { set platform unknown } if {$select && [matchMachine $platform]} then { set ::build_directory $path tputs $channel [appendArgs "yes, selected (" $platform ")\n"] return true } else { tputs $channel [appendArgs "yes (" $platform ")\n"] |
︙ | ︙ | |||
1538 1539 1540 1541 1542 1543 1544 | # so, make it easy to spot. # if {[string length $sourceId] == 0} then { set sourceId null } # | < < < < < | | | < < < < < | | 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 | # so, make it easy to spot. # if {[string length $sourceId] == 0} then { set sourceId null } # # NOTE: Yes, the SQLite interop assembly appears to be available. # addConstraint SQLiteInterop tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"] } else { tputs $channel no\n } } proc checkForSQLiteDefineConstant { channel name } { tputs $channel [appendArgs \ |
︙ | ︙ |
Changes to readme.htm.
1 2 3 4 5 6 7 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET SQLite Data Provider<br /> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET SQLite Data Provider<br /> Version 1.0.98.0 - August XX, 2015 <font color="red">(release scheduled)</font><br /> Using <a href="https://www.sqlite.org/releaselog/3_8_11_1.html">SQLite 3.8.11.1</a><br /> Originally written by Robert Simpson<br /> Released to the public domain, use at your own risk!<br /> Official provider website: <a href="https://system.data.sqlite.org/">https://system.data.sqlite.org/</a><br /> Legacy versions: <a href="http://sqlite.phxsoftware.com/">http://sqlite.phxsoftware.com/</a><br /> <br /> The current development version can be downloaded from <a href="https://system.data.sqlite.org/index.html/timeline?y=ci"> |
︙ | ︙ | |||
205 206 207 208 209 210 211 | designed for robustness and maximum backward compatibility with previously released versions of System.Data.SQLite. </p> <h2><b>Version History</b></h2> <p> | | < < < | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | designed for robustness and maximum backward compatibility with previously released versions of System.Data.SQLite. </p> <h2><b>Version History</b></h2> <p> <b>1.0.98.0 - August XX, 2015 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Updated to <a href="https://www.sqlite.org/releaselog/3_8_11_1.html">SQLite 3.8.11.1</a>.</li> <li>Add full support for Visual Studio 2015 and the .NET Framework 4.6.</li> <li>Implement the Substring method for LINQ using the "substr" core SQL function. <b>** Potentially Incompatible Change **</b></li> <li>Honor the second argument to Math.Round when using LINQ. <b>** Potentially Incompatible Change **</b></li> <li>Honor the pre-existing flags for connections during the Open method. Fix for [964063da16]. <b>** Potentially Incompatible Change **</b></li> <li>Remove errant semi-colons from the SQL used by LINQ to INSERT and then SELECT rows with composite primary keys. Fix for [9d353b0bd8].</li> <li>Change the base type for the SQLiteConnectionFlags enumeration to long integer. <b>** Potentially Incompatible Change **</b></li> <li>Add extended return codes to the SQLiteErrorCode enumeration. Pursuant to [71bedaca19]. <b>** Potentially Incompatible Change **</b></li> <li>Improve exception handling in all native callbacks implemented in the SQLiteConnection class.</li> <li>Add Progress event and ProgressOps connection string property to enable raising progress events during long-running queries.</li> <li>Add "Recursive Triggers" connection string property to enable or disable the recursive trigger capability. Pursuant to [3a82ee635b].</li> <li>Add NoDefaultFlags connection string property to prevent the default connection flags from being used. Pursuant to [964063da16].</li> <li>Add VfsName connection string property to allow a non-default VFS to be used by the SQLite core library.</li> |
︙ | ︙ |
Changes to test/TestCases.cs.
︙ | ︙ | |||
19 20 21 22 23 24 25 | { private const int NumThreads = 8; private const int ThreadTimeout = 60000; private List<string> droptables = new List<string>(); private List<string> maydroptable = new List<string>(); | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | { private const int NumThreads = 8; private const int ThreadTimeout = 60000; private List<string> droptables = new List<string>(); private List<string> maydroptable = new List<string>(); #if !INTEROP_LOG private long logevents = 0; #endif internal TestCases() { } |
︙ | ︙ | |||
1636 1637 1638 1639 1640 1641 1642 | SQLiteErrorCode rc = cnn.ResultCode(); SQLiteErrorCode xrc = cnn.ExtendedResultCode(); cnn.Close(); } } | | | 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 | SQLiteErrorCode rc = cnn.ResultCode(); SQLiteErrorCode xrc = cnn.ExtendedResultCode(); cnn.Close(); } } #if !INTEROP_LOG //Logging EventHandler public void OnLogEvent(object sender, LogEventArgs logEvent) { object errorCode = logEvent.ErrorCode; string err_msg = logEvent.Message; logevents++; } |
︙ | ︙ |
Changes to testce/TestCases.cs.
︙ | ︙ | |||
288 289 290 291 292 293 294 | try { UserCollation(cnn); frm.WriteLine("SUCCESS - UserCollation"); passed++; } catch (Exception) { frm.WriteLine("FAIL - UserCollation"); failed++; } total++; try { Int64Properties(cnn); frm.WriteLine("SUCCESS - Int64Properties"); passed++; } catch (Exception) { frm.WriteLine("FAIL - Int64Properties"); failed++; } | < < | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | try { UserCollation(cnn); frm.WriteLine("SUCCESS - UserCollation"); passed++; } catch (Exception) { frm.WriteLine("FAIL - UserCollation"); failed++; } total++; try { Int64Properties(cnn); frm.WriteLine("SUCCESS - Int64Properties"); passed++; } catch (Exception) { frm.WriteLine("FAIL - Int64Properties"); failed++; } total++; try { ManagedVirtualTable(cnn); frm.WriteLine("SUCCESS - ManagedVirtualTable"); passed++; } catch (Exception) { frm.WriteLine("FAIL - ManagedVirtualTable"); failed++; } total++; try { MultipleThreadStress(cnn); frm.WriteLine("SUCCESS - MultipleThreadStress"); passed++; } catch (Exception) { frm.WriteLine("FAIL - MultipleThreadStress"); failed++; } total++; try { SimpleRTree(cnn); frm.WriteLine("SUCCESS - SimpleRTree"); passed++; } |
︙ | ︙ | |||
1037 1038 1039 1040 1041 1042 1043 | return; } throw new NotSupportedException("not a SQLite connection"); } | < | 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | return; } throw new NotSupportedException("not a SQLite connection"); } // Make sure that managed virtual table support works on the .NET Compact Framework. internal void ManagedVirtualTable(DbConnection cnn) { SQLiteConnection cnn2 = cnn as SQLiteConnection; if (cnn2 != null) { |
︙ | ︙ | |||
1098 1099 1100 1101 1102 1103 1104 | } return; } throw new NotSupportedException("not a SQLite connection"); } | < | 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 | } return; } throw new NotSupportedException("not a SQLite connection"); } private int nextId = 0; private const int MAX_THREADS = 3; private const int MAX_ITERATIONS = 100; private ManualResetEvent goEvent = new ManualResetEvent(false); private static int GetThreadId() |
︙ | ︙ |
Changes to testce/testce.2005.csproj.
︙ | ︙ | |||
101 102 103 104 105 106 107 | </ItemGroup> <ItemGroup> <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.Compact.2005.csproj"> <Project>{AC139951-261A-4463-B6FA-AEBC25283A66}</Project> <Name>System.Data.SQLite.Compact.2005</Name> </ProjectReference> </ItemGroup> | < | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | </ItemGroup> <ItemGroup> <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.Compact.2005.csproj"> <Project>{AC139951-261A-4463-B6FA-AEBC25283A66}</Project> <Name>System.Data.SQLite.Compact.2005</Name> </ProjectReference> </ItemGroup> <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <ProjectExtensions> <VisualStudio> <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"> <HostingProcess disable="1" /> |
︙ | ︙ |
Changes to testce/testce.2008.csproj.
︙ | ︙ | |||
102 103 104 105 106 107 108 | </ItemGroup> <ItemGroup> <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.Compact.2008.csproj"> <Project>{AC139951-261A-4463-B6FA-AEBC25283A66}</Project> <Name>System.Data.SQLite.Compact.2008</Name> </ProjectReference> </ItemGroup> | < | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | </ItemGroup> <ItemGroup> <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.Compact.2008.csproj"> <Project>{AC139951-261A-4463-B6FA-AEBC25283A66}</Project> <Name>System.Data.SQLite.Compact.2008</Name> </ProjectReference> </ItemGroup> <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <ProjectExtensions> <VisualStudio> <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"> <HostingProcess disable="1" /> |
︙ | ︙ |
Changes to testce/testce.2012.csproj.
︙ | ︙ | |||
86 87 88 89 90 91 92 | </ItemGroup> <ItemGroup> <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.Compact.2012.csproj"> <Project>{AC139951-261A-4463-B6FA-AEBC25283A66}</Project> <Name>System.Data.SQLite.Compact.2012</Name> </ProjectReference> </ItemGroup> | < | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | </ItemGroup> <ItemGroup> <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.Compact.2012.csproj"> <Project>{AC139951-261A-4463-B6FA-AEBC25283A66}</Project> <Name>System.Data.SQLite.Compact.2012</Name> </ProjectReference> </ItemGroup> <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\v8.0\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" /> <ProjectExtensions> <VisualStudio> <FlavorProperties GUID="{fae04ec0-301f-11d3-bf4b-00c04f79efbc}"> |
︙ | ︙ |
Changes to testlinq/Program.cs.
1 2 3 4 5 6 7 8 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ using System; | < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /******************************************************** * 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! ********************************************************/ using System; using System.Data.Common; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; using System.Transactions; |
︙ | ︙ | |||
92 93 94 95 96 97 98 | return SkipTest(pageSize); } case "substring": { return SubStringTest(); } | < < | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | return SkipTest(pageSize); } case "substring": { return SubStringTest(); } case "unionall": { return UnionAllTest(); } case "endswith": { string value = null; if (args.Length > 1) { value = args[1]; |
︙ | ︙ | |||
196 197 198 199 200 201 202 | #endif #if NET_40 || NET_45 || NET_451 || NET_46 case "round": { return RoundTest(); } #endif | < < < < | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | #endif #if NET_40 || NET_45 || NET_451 || NET_46 case "round": { return RoundTest(); } #endif default: { Console.WriteLine("unknown test \"{0}\"", arg); return 1; } } } |
︙ | ︙ | |||
372 373 374 375 376 377 378 | once = true; } } return 0; } | < | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | once = true; } } return 0; } // // NOTE: Used to test the fix for ticket [0a32885109]. // private static int UnionAllTest() { using (northwindEFEntities db = new northwindEFEntities()) { |
︙ | ︙ | |||
443 444 445 446 447 448 449 | Console.Write(customer.CustomerID); once = true; } } return 0; } | < | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | Console.Write(customer.CustomerID); once = true; } } return 0; } // // NOTE: Used to test the fix for ticket [ccfa69fc32]. // private static int EFTransactionTest(bool add) { // |
︙ | ︙ | |||
565 566 567 568 569 570 571 572 573 | // // NOTE: Used to test the INSERT fix (i.e. an extra semi-colon in // the SQL statement after the actual INSERT statement in // the follow-up SELECT statement). // private static int InsertTest() { using (northwindEFEntities db = new northwindEFEntities()) { | > > > > < < < < < < < < < < | | < < < < < < < < | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | // // NOTE: Used to test the INSERT fix (i.e. an extra semi-colon in // 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()) { int[] counts = { 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(); OrderDetails newOrderDetails = new OrderDetails(); newOrderDetails.OrderID = 10248; newOrderDetails.ProductID = 1; newOrderDetails.UnitPrice = (decimal)1.23; newOrderDetails.Quantity = 1; newOrderDetails.Discount = 0.0f; db.AddObject("OrderDetails", newOrderDetails); try { db.SaveChanges(); counts[0]++; } |
︙ | ︙ | |||
771 772 773 774 775 776 777 | "AppendManifestToken_SQLiteProviderManifest", null); return 0; } #endif | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | "AppendManifestToken_SQLiteProviderManifest", null); return 0; } #endif private static int DateTimeTest() { using (northwindEFEntities db = new northwindEFEntities()) { DateTime dateTime = new DateTime(1997, 1, 1, 0, 0, 0, DateTimeKind.Local); int c1 = db.Orders.Where(i => i.OrderDate == new DateTime(1997, 1, 1, 0, 0, 0, DateTimeKind.Local)).Count(); int c2 = db.Orders.Where(i => i.OrderDate == dateTime).Count(); |
︙ | ︙ |
Changes to www/build.wiki.
︙ | ︙ | |||
393 394 395 396 397 398 399 400 401 402 403 | be able to simply delete these directories. </li> <li>Open a normal command prompt window with "cmd.exe".</li> <li>Change the current directory to "<root>\Setup".</li> <li> Enter the following command to build the managed-only binaries for Mono: <br /> <br /> | > > > > > > > > > > > > | | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | be able to simply delete these directories. </li> <li>Open a normal command prompt window with "cmd.exe".</li> <li>Change the current directory to "<root>\Setup".</li> <li> Enter the following command to set the environment variable used to pass the necessary extra arguments to MSBuild: <br /> <br /> <b>SET MSBUILD_ARGS=/property:UseInteropDll=false /property:UseSqliteStandard=true</b> <br /> <br /> </li> <li> Enter the following command to build the managed-only binaries for Mono: <br /> <br /> <b>SET NOUSER=1</b> <br /> <b>build.bat ReleaseManagedOnly</b> <br /> <br /> </li> <li> Make sure everything succeeds with no errors; the log file "%TEMP%\System.Data.SQLite.Build_ReleaseManagedOnly_Win32_<year>_Unknown.log" |
︙ | ︙ |
Changes to www/downloads.wiki.
︙ | ︙ | |||
439 440 441 442 443 444 445 | </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx-source"></a> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < < < < < < < < < < < < | < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | | | | | | | | | | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 | </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx-source"></a> <a href="/downloads/1.0.97.0/sqlite-netFx-source-1.0.97.0.zip">sqlite-netFx-source-1.0.97.0.zip</a> <br /> (5.16 MiB) </td> <td width="5"></td> <td valign="top"> This ZIP archive contains all current source code for System.Data.SQLite 1.0.97.0 (3.8.10.2) combined into a single archive file. <br /> (sha1: a2b071b74a9b8aa4530340e4654e82d17d4aa681) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 2.0 SP2)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-setup-bundle-x86-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-setup-bundle-x86-2005-1.0.97.0.exe">sqlite-netFx20-setup-bundle-x86-2005-1.0.97.0.exe</a> <br /> (5.10 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> <big><b>This is the only setup package that is capable of installing the design-time components for Visual Studio 2005. <br /> <br /> However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.</b></big> <br /> <br /> (sha1: daa0f42621b93769755fb7a6546eddd3d56b8e72) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-setup-x86-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-setup-x86-2005-1.0.97.0.exe">sqlite-netFx20-setup-x86-2005-1.0.97.0.exe</a> <br /> (5.09 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 7e9b562ffedefb316fdff45e18a0817fb47f8e84) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 2.0 SP2)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-setup-bundle-x64-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-setup-bundle-x64-2005-1.0.97.0.exe">sqlite-netFx20-setup-bundle-x64-2005-1.0.97.0.exe</a> <br /> (5.69 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: fb3dfb4c0295c9a6939c392cf9381fefbeebfe7b) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-setup-x64-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-setup-x64-2005-1.0.97.0.exe">sqlite-netFx20-setup-x64-2005-1.0.97.0.exe</a> <br /> (5.69 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 59195a366b7546c4a37a65475f8fa2d11c7ff517) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-setup-bundle-x86-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-setup-bundle-x86-2008-1.0.97.0.exe">sqlite-netFx35-setup-bundle-x86-2008-1.0.97.0.exe</a> <br /> (7.14 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> <big><b>This is the only setup package that is capable of installing the design-time components for Visual Studio 2008. <br /> <br /> However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.</b></big> <br /> <br /> (sha1: 03d86dba982e89dadfd19fc9bce775dcab040632) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-setup-x86-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-setup-x86-2008-1.0.97.0.exe">sqlite-netFx35-setup-x86-2008-1.0.97.0.exe</a> <br /> (7.13 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: b2a7403c7cbe50482972a05ec953f7414ae0ceb1) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-setup-bundle-x64-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-setup-bundle-x64-2008-1.0.97.0.exe">sqlite-netFx35-setup-bundle-x64-2008-1.0.97.0.exe</a> <br /> (7.88 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: a3a72d1368876f23f033968ff382d9907b8ca8f0) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-setup-x64-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-setup-x64-2008-1.0.97.0.exe">sqlite-netFx35-setup-x64-2008-1.0.97.0.exe</a> <br /> (7.87 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 041f8018ef021b9515bd7c58b9615f235ffb66cb) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-setup-bundle-x86-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.97.0.exe">sqlite-netFx40-setup-bundle-x86-2010-1.0.97.0.exe</a> <br /> (12.71 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 is included. The .NET Framework 4.0 is required. <br /> <big><b>This is the only setup package that is capable of installing the design-time components for Visual Studio 2010. <br /> <br /> However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.</b></big> <br /> <br /> (sha1: 182ae1db5c4747a4d24a8498a0c8ab14dfea3a55) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-setup-x86-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-setup-x86-2010-1.0.97.0.exe">sqlite-netFx40-setup-x86-2010-1.0.97.0.exe</a> <br /> (12.70 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 is included. The .NET Framework 4.0 is required. <br /> (sha1: 74b67854e77baf3d0a83fe48248b1043ecf47730) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-setup-bundle-x64-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-setup-bundle-x64-2010-1.0.97.0.exe">sqlite-netFx40-setup-bundle-x64-2010-1.0.97.0.exe</a> <br /> (13.96 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required. <br /> (sha1: 950ed58e2d57c7cdf91b238270e900cdfded5b56) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-setup-x64-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-setup-x64-2010-1.0.97.0.exe">sqlite-netFx40-setup-x64-2010-1.0.97.0.exe</a> <br /> (13.95 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required. <br /> (sha1: 58355a70f6394919420cea4aaed3399d18362741) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 4.5)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-setup-bundle-x86-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-setup-bundle-x86-2012-1.0.97.0.exe">sqlite-netFx45-setup-bundle-x86-2012-1.0.97.0.exe</a> <br /> (10.14 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> <big><b>This is the only setup package that is capable of installing the design-time components for Visual Studio 2012. <br /> <br /> However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.</b></big> <br /> <br /> <big><b>Using Entity Framework 6 design-time support may require installing the Visual Studio 2012 "flavor" of the <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762"> Entity Framework 6 Tools for Visual Studio 2012 & 2013</a>.</b></big> <br /> <br /> (sha1: ff9df099dce5e3f0d478e33f587a2866cae9c8ab) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-setup-x86-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-setup-x86-2012-1.0.97.0.exe">sqlite-netFx45-setup-x86-2012-1.0.97.0.exe</a> <br /> (10.17 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: be380d4cfee55b375730ca83796ec536d8d7b86e) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 4.5)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-setup-bundle-x64-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-setup-bundle-x64-2012-1.0.97.0.exe">sqlite-netFx45-setup-bundle-x64-2012-1.0.97.0.exe</a> <br /> (10.79 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: e7297d72638d5b4feaefb61ef600b4f40e226402) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-setup-x64-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-setup-x64-2012-1.0.97.0.exe">sqlite-netFx45-setup-x64-2012-1.0.97.0.exe</a> <br /> (10.84 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: edc0c92ed77d50b66ec27bdd38570cee9aaac754) </td> </tr> <tr> <td colspan="4"> <b>Setups for 32-bit Windows (.NET Framework 4.5.1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-setup-bundle-x86-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-setup-bundle-x86-2013-1.0.97.0.exe">sqlite-netFx451-setup-bundle-x86-2013-1.0.97.0.exe</a> <br /> (10.09 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> <big><b>This is the only setup package that is capable of installing the design-time components for Visual Studio 2013. <br /> <br /> However, if you do not require the design-time components, please consider downloading the associated "Precompiled Binaries" instead.</b></big> <br /> <br /> <big><b>Using Entity Framework 6 design-time support may require installing the Visual Studio 2013 "flavor" of the <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762"> Entity Framework 6 Tools for Visual Studio 2012 & 2013</a>.</b></big> <br /> <br /> (sha1: 15e31d48589c72d17e2269f72110c7e7a32cb6e3) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-setup-x86-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-setup-x86-2013-1.0.97.0.exe">sqlite-netFx451-setup-x86-2013-1.0.97.0.exe</a> <br /> (10.12 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 3071f6d4b93f52fea67f07409c5e13ea8f8d60ee) </td> </tr> <tr> <td colspan="4"> <b>Setups for 64-bit Windows (.NET Framework 4.5.1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-setup-bundle-x64-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-setup-bundle-x64-2013-1.0.97.0.exe">sqlite-netFx451-setup-bundle-x64-2013-1.0.97.0.exe</a> <br /> (10.78 MiB) </td> <td width="5"></td> <td valign="top"> This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 189a1279186423099603833c974f0c074098283f) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-setup-x64-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-setup-x64-2013-1.0.97.0.exe">sqlite-netFx451-setup-x64-2013-1.0.97.0.exe</a> <br /> (10.83 MiB) </td> <td width="5"></td> <td valign="top"> This setup package will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: ac38374fe3abaac5487081aa7c120a8a04dc84de) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 2.0 SP2)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-binary-bundle-Win32-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-binary-bundle-Win32-2005-1.0.97.0.zip">sqlite-netFx20-binary-bundle-Win32-2005-1.0.97.0.zip</a> <br /> (1.50 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 and the .NET Framework 2.0 SP2 are required. <br /> (sha1: cc734b0a7054a9a982667faaf6faf86c94f37b6f) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-binary-Win32-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-binary-Win32-2005-1.0.97.0.zip">sqlite-netFx20-binary-Win32-2005-1.0.97.0.zip</a> <br /> (1.49 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x86 and the .NET Framework 2.0 SP2 are required. <br /> (sha1: 72574347632bf2aada0703142ccaac197135c1cc) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 2.0 SP2)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-binary-bundle-x64-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-binary-bundle-x64-2005-1.0.97.0.zip">sqlite-netFx20-binary-bundle-x64-2005-1.0.97.0.zip</a> <br /> (1.71 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 and the .NET Framework 2.0 SP2 are required. <br /> (sha1: 3214c23872b129b3d1d955708f5e755b73635cc8) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-binary-x64-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-binary-x64-2005-1.0.97.0.zip">sqlite-netFx20-binary-x64-2005-1.0.97.0.zip</a> <br /> (1.70 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2005 SP1 runtime for x64 and the .NET Framework 2.0 SP2 are required. <br /> (sha1: 3c56ff6cc15dd0c0f2883fade40a0a352c205c87) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-binary-bundle-Win32-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-bundle-Win32-2008-1.0.97.0.zip">sqlite-netFx35-binary-bundle-Win32-2008-1.0.97.0.zip</a> <br /> (1.95 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: 68557106ccf5966c1b273e5d52e44203d0704d6e) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-binary-Win32-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-Win32-2008-1.0.97.0.zip">sqlite-netFx35-binary-Win32-2008-1.0.97.0.zip</a> <br /> (1.94 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: 3b8e7799d1463458fa0dcf8ca35b28b57d30da9e) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-binary-bundle-x64-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-bundle-x64-2008-1.0.97.0.zip">sqlite-netFx35-binary-bundle-x64-2008-1.0.97.0.zip</a> <br /> (2.03 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: 8b3197f83606afe6cc288da72a69310d5f797362) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-binary-x64-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-x64-2008-1.0.97.0.zip">sqlite-netFx35-binary-x64-2008-1.0.97.0.zip</a> <br /> (2.02 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2008 SP1 runtime for x64 and the .NET Framework 3.5 SP1 are required. <br /> (sha1: e30e32261f5003ca588eaaea789a0a49e0b20a08) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-binary-bundle-Win32-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-binary-bundle-Win32-2010-1.0.97.0.zip">sqlite-netFx40-binary-bundle-Win32-2010-1.0.97.0.zip</a> <br /> (2.17 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required. <br /> (sha1: a6c4403b321b8bf64e4f6c629e1734564fc68646) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-binary-Win32-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-binary-Win32-2010-1.0.97.0.zip">sqlite-netFx40-binary-Win32-2010-1.0.97.0.zip</a> <br /> (2.16 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required. <br /> (sha1: b1cd74abb20dd6f724cb25d34fab302c981fc46a) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-binary-bundle-x64-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-binary-bundle-x64-2010-1.0.97.0.zip">sqlite-netFx40-binary-bundle-x64-2010-1.0.97.0.zip</a> <br /> (2.19 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET Framework 4.0 are required. <br /> (sha1: 65d4f10bcdf5ce4bf6831de50740c174f879cb64) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-binary-x64-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-binary-x64-2010-1.0.97.0.zip">sqlite-netFx40-binary-x64-2010-1.0.97.0.zip</a> <br /> (2.18 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2010 SP1 runtime for x64 and the .NET Framework 4.0 are required. <br /> (sha1: d3de79ff9101c370def18a69f2cd0902ccbcaef3) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 4.5)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-binary-bundle-Win32-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip">sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip</a> <br /> (2.08 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 and the .NET Framework 4.5 are required. <br /> (sha1: 1adff0b8f1c8c855f047972ca7be1a6ea99eee5c) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-binary-Win32-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-Win32-2012-1.0.97.0.zip">sqlite-netFx45-binary-Win32-2012-1.0.97.0.zip</a> <br /> (2.13 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x86 and the .NET Framework 4.5 are required. <br /> (sha1: 7702faa724ec29a627ddea3cae5a69bd915320e2) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 4.5)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-binary-bundle-x64-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-x64-2012-1.0.97.0.zip">sqlite-netFx45-binary-bundle-x64-2012-1.0.97.0.zip</a> <br /> (2.11 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 and the .NET Framework 4.5 are required. <br /> (sha1: e3d1c61f1d960b8535577fc62ebad8651cf39cc6) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-binary-x64-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-x64-2012-1.0.97.0.zip">sqlite-netFx45-binary-x64-2012-1.0.97.0.zip</a> <br /> (2.19 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.97.0 (3.8.10.2) package. The Visual C++ 2012 Update 4 runtime for x64 and the .NET Framework 4.5 are required. <br /> (sha1: a4959439e8caec0a886c7a2758c336f3927df9a2) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 32-bit Windows (.NET Framework 4.5.1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-binary-bundle-Win32-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip">sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip</a> <br /> (2.09 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 1969fdc760e2b35633b9c5f33df17a7d9a37c656) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-binary-Win32-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-Win32-2013-1.0.97.0.zip">sqlite-netFx451-binary-Win32-2013-1.0.97.0.zip</a> <br /> (2.14 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: cc50caf9a77fe4559d58823849d953d8178603e9) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for 64-bit Windows (.NET Framework 4.5.1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-binary-bundle-x64-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-x64-2013-1.0.97.0.zip">sqlite-netFx451-binary-bundle-x64-2013-1.0.97.0.zip</a> <br /> (2.12 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: c945cd9013326d90dcb1b7473088b2d3b4a95d47) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-binary-x64-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-x64-2013-1.0.97.0.zip">sqlite-netFx451-binary-x64-2013-1.0.97.0.zip</a> <br /> (2.19 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 6faf09655f805ba76ab0909ad0d4acf2b1a23712) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 2.0 SP2)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-static-binary-bundle-Win32-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-static-binary-bundle-Win32-2005-1.0.97.0.zip">sqlite-netFx20-static-binary-bundle-Win32-2005-1.0.97.0.zip</a> <br /> (1.71 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 25577f16a03b9cebdf87de65590c8dcb10ec39c8) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-static-binary-Win32-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-static-binary-Win32-2005-1.0.97.0.zip">sqlite-netFx20-static-binary-Win32-2005-1.0.97.0.zip</a> <br /> (1.70 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 6a53f04340d0f577c0902087f9ae14c953331272) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 2.0 SP2)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-static-binary-bundle-x64-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-static-binary-bundle-x64-2005-1.0.97.0.zip">sqlite-netFx20-static-binary-bundle-x64-2005-1.0.97.0.zip</a> <br /> (1.87 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 1f15cd9479633f7698213f33280353a508674087) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx20-static-binary-x64-2005"></a> <a href="/downloads/1.0.97.0/sqlite-netFx20-static-binary-x64-2005-1.0.97.0.zip">sqlite-netFx20-static-binary-x64-2005-1.0.97.0.zip</a> <br /> (1.86 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 712ae5e5d34b3eddd17b20d25ebe0764ea710272) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-static-binary-bundle-Win32-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-static-binary-bundle-Win32-2008-1.0.97.0.zip">sqlite-netFx35-static-binary-bundle-Win32-2008-1.0.97.0.zip</a> <br /> (2.16 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: b307177dde284527d6daf8d7625376ee3db35d76) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-static-binary-Win32-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-static-binary-Win32-2008-1.0.97.0.zip">sqlite-netFx35-static-binary-Win32-2008-1.0.97.0.zip</a> <br /> (2.16 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: b5a820573ede8ee2d39e7539349e972d973eb32f) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 3.5 SP1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-static-binary-bundle-x64-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-static-binary-bundle-x64-2008-1.0.97.0.zip">sqlite-netFx35-static-binary-bundle-x64-2008-1.0.97.0.zip</a> <br /> (2.20 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: bbad7b401adc4ca39d11ddb994272fa4fa34d563) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-static-binary-x64-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-static-binary-x64-2008-1.0.97.0.zip">sqlite-netFx35-static-binary-x64-2008-1.0.97.0.zip</a> <br /> (2.20 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 1f1ad2fedbcb24a31ccd786282e2cec738e03064) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-static-binary-bundle-Win32-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.97.0.zip">sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.97.0.zip</a> <br /> (2.38 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: ddd78662fef2e9e9718bfcbd54c3a50b6668f5b7) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-static-binary-Win32-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-static-binary-Win32-2010-1.0.97.0.zip">sqlite-netFx40-static-binary-Win32-2010-1.0.97.0.zip</a> <br /> (2.38 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 4bc249674a5fa43372e7a4dfcf025eafee1436a4) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.0)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-static-binary-bundle-x64-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-static-binary-bundle-x64-2010-1.0.97.0.zip">sqlite-netFx40-static-binary-bundle-x64-2010-1.0.97.0.zip</a> <br /> (2.38 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 5dc31fa8bb58e25196654407d877c26ef841c468) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx40-static-binary-x64-2010"></a> <a href="/downloads/1.0.97.0/sqlite-netFx40-static-binary-x64-2010-1.0.97.0.zip">sqlite-netFx40-static-binary-x64-2010-1.0.97.0.zip</a> <br /> (2.38 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 7b07e8e6015a4d455cb8fd832b19c453972092c4) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.5)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-static-binary-bundle-Win32-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-static-binary-bundle-Win32-2012-1.0.97.0.zip">sqlite-netFx45-static-binary-bundle-Win32-2012-1.0.97.0.zip</a> <br /> (2.41 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 241f027ddb2f5496f98ffea9d9abb6158b6dd97b) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-static-binary-Win32-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-static-binary-Win32-2012-1.0.97.0.zip">sqlite-netFx45-static-binary-Win32-2012-1.0.97.0.zip</a> <br /> (2.46 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: a0474dde94bcea51de93f1d944df44a728326f40) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.5)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-static-binary-bundle-x64-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-static-binary-bundle-x64-2012-1.0.97.0.zip">sqlite-netFx45-static-binary-bundle-x64-2012-1.0.97.0.zip</a> <br /> (2.37 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 8c2a819f4cb4ec30a8aa7559a4ec4fe86960f9ff) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx45-static-binary-x64-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx45-static-binary-x64-2012-1.0.97.0.zip">sqlite-netFx45-static-binary-x64-2012-1.0.97.0.zip</a> <br /> (2.45 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 8e1505424513e9d3721172c582e3a8e900d88aab) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.5.1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-static-binary-bundle-Win32-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-static-binary-bundle-Win32-2013-1.0.97.0.zip">sqlite-netFx451-static-binary-bundle-Win32-2013-1.0.97.0.zip</a> <br /> (2.44 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: c71a13e48be86edd5679fcda601991d97ddbf5d7) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-static-binary-Win32-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-static-binary-Win32-2013-1.0.97.0.zip">sqlite-netFx451-static-binary-Win32-2013-1.0.97.0.zip</a> <br /> (2.49 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x86 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 62bad2092267770842b0da94e56d54bb21e14371) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.5.1)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-static-binary-bundle-x64-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-static-binary-bundle-x64-2013-1.0.97.0.zip">sqlite-netFx451-static-binary-bundle-x64-2013-1.0.97.0.zip</a> <br /> (2.42 MiB) </td> <td width="5"></td> <td valign="top"> This binary package features the mixed-mode assembly and contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 7884b038ffe7c913f31104cdca418c2b96eedfde) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx451-static-binary-x64-2013"></a> <a href="/downloads/1.0.97.0/sqlite-netFx451-static-binary-x64-2013-1.0.97.0.zip">sqlite-netFx451-static-binary-x64-2013-1.0.97.0.zip</a> <br /> (2.49 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the x64 version of the System.Data.SQLite 1.0.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. <br /> (sha1: 0640bb7f4013b5276b5c78a34c90dee82ca9af1d) </td> </tr> <tr> <td colspan="4"> <b>Precompiled Binaries for Windows CE (.NET Compact Framework)</b> </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx35-binary-PocketPC-ARM-2008"></a> <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.97.0.zip">sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.97.0.zip</a> <br /> (1.10 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the PocketPC version of the System.Data.SQLite 1.0.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. <br /> (sha1: 9e51df082ed93ee0379b0ba656d8d3a0698690bc) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx39-binary-WinCE-ARM-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx39-binary-WinCE-ARM-2012-1.0.97.0.zip">sqlite-netFx39-binary-WinCE-ARM-2012-1.0.97.0.zip</a> <br /> (1.22 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the Windows Embedded 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. <br /> (sha1: f5f0c1480a39eee937b6aaab72e527275dd7c70b) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a name="sqlite-netFx39-binary-WinCE-x86-2012"></a> <a href="/downloads/1.0.97.0/sqlite-netFx39-binary-WinCE-x86-2012-1.0.97.0.zip">sqlite-netFx39-binary-WinCE-x86-2012-1.0.97.0.zip</a> <br /> (1.26 MiB) </td> <td width="5"></td> <td valign="top"> This binary package contains all the binaries for the Windows Embedded 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. <br /> (sha1: 32c32545e144cbab0ee159559bf63c4641c378e8) </td> </tr> <tr> <td colspan="4"> <a name="nuGetPackages"></a> <b>Official NuGet Packages</b> |
︙ | ︙ | |||
2189 2190 2191 2192 2193 2194 2195 | below may be used for comparison purposes. </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | < | | | | | | | < | | | | | | | < | | 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 | below may be used for comparison purposes. </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.1.0.97.0.nupkg">System.Data.SQLite.1.0.97.0.nupkg</a> <br /> (0.00 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package includes all the binaries for both the x86 and x64 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. <br /> <big><b>This package depends on the "EntityFramework" package.</b></big> <br /> <br /> <big><b><i>As of version 1.0.92.0, this package will not directly contain any of the required binaries. Instead, this package will depend on the "System.Data.SQLite.Core", "System.Data.SQLite.Linq", and "System.Data.SQLite.EF6" packages.</i></b></big> <br /> <br /> (sha1: e7399030d60d82c3f49ce891cc0015225709fd9e) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.Core.1.0.97.0.nupkg">System.Data.SQLite.Core.1.0.97.0.nupkg</a> <br /> (5.07 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains all the binaries for both the x86 and x64 versions of System.Data.SQLite 1.0.97.0 (3.8.10.2), <big><b>except those needed to support LINQ and Entity Framework 6</b></big>. 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. <br /> <big><b>This package does not depend on any other package.</b></big> <br /> (sha1: 1f6b891b926d10dc9644dbca1e03d7b65a156ff8) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.Core.MSIL.1.0.97.0.nupkg">System.Data.SQLite.Core.MSIL.1.0.97.0.nupkg</a> <br /> (0.70 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains the managed binaries for System.Data.SQLite 1.0.97.0. The .NET Framework 3.5 SP1, 4.0, 4.5, or 4.5.1 is required. <br /> <big><b>This package does not depend on any other package.</b></big> <br /> <br /> <big><b><i>This NuGet package does not include any code from the native SQLite core library and will not work properly without the native assembly "SQLite.Interop.dll" compiled for the processor architecture of the host process being present in a directory in the native library search path.</i></b></big> <br /> <br /> (sha1: 8d34b6d6966b00e9c0f9d7ab5f431db58fe0bc09) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.EF6.1.0.97.0.nupkg">System.Data.SQLite.EF6.1.0.97.0.nupkg</a> <br /> (0.14 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains just the binaries to support Entity 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. <br /> <big><b>This package depends on the "EntityFramework" package.</b></big> <br /> (sha1: 3af8ed2aa3826aa2bbd00ad1fb84cf09447e6300) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.Linq.1.0.97.0.nupkg">System.Data.SQLite.Linq.1.0.97.0.nupkg</a> <br /> (0.18 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains just the binaries to support LINQ using 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. <br /> <big><b>This package does not depend on any other package.</b></big> <br /> (sha1: 5e2ebc5a5a6dc28e8ef41a4583ecd2ad55a39463) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.MSIL.1.0.97.0.nupkg">System.Data.SQLite.MSIL.1.0.97.0.nupkg</a> <br /> (0.00 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains the managed binaries for System.Data.SQLite 1.0.97.0. The .NET Framework 3.5 SP1, 4.0, 4.5, or 4.5.1 is required. <br /> <big><b>This is a legacy package; if possible, please use either the "System.Data.SQLite" or "System.Data.SQLite.Core" package instead.</b></big> <br /> <br /> <big><b><i>This NuGet package does not include any code from the native SQLite core library and will not work properly without the native assembly "SQLite.Interop.dll" compiled for the processor architecture of the host process being present in a directory in the native library search path.</i></b></big> <br /> <br /> <big><b><i>As of version 1.0.95.0, this package will not directly contain any of the required binaries. Instead, this package will depend on the "System.Data.SQLite.Core.MSIL", "System.Data.SQLite.Linq", and "System.Data.SQLite.EF6" packages.</i></b></big> <br /> <br /> (sha1: eed15134efd238186fd1be88dde7f19892fceb04) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.x86.1.0.97.0.nupkg">System.Data.SQLite.x86.1.0.97.0.nupkg</a> <br /> (2.61 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains all the binaries for the x86 version 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. <br /> <big><b>This is a legacy package; if possible, please use either the "System.Data.SQLite" or "System.Data.SQLite.Core" package instead.</b></big> <br /> (sha1: 9924cf29aeb6fbfbe7a4b085295d55fc19817d76) </td> </tr> <tr> <td width="10"> </td> <td width="30%" valign="top" align="right"> <a href="/downloads/1.0.97.0/System.Data.SQLite.x64.1.0.97.0.nupkg">System.Data.SQLite.x64.1.0.97.0.nupkg</a> <br /> (2.90 MiB) </td> <td width="5"></td> <td valign="top"> This NuGet package contains all the binaries for the x64 version 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. <br /> <big><b>This is a legacy package; if possible, please use either the "System.Data.SQLite" or "System.Data.SQLite.Core" package instead.</b></big> <br /> (sha1: 104d28413d2798d670c2d450db8d2016171dcad3) </td> </tr> <tr> <td colspan="4"> <a name="legacyVersions"></a> <b>Legacy Versions</b> |
︙ | ︙ | |||
2451 2452 2453 2454 2455 2456 2457 | mixed-mode assembly statically linked to the Visual C++ runtime. Template (9) is used for unofficial pre-release "snapshots" of source code. Templates (10) and (11) are used for the official NuGet packages. </p> <p> The <b>framework</b> in templates (3), (4), (5), (6), (7), and (8) will be | | | | 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 | mixed-mode assembly statically linked to the Visual C++ runtime. Template (9) is used for unofficial pre-release "snapshots" of source code. Templates (10) and (11) are used for the official NuGet packages. </p> <p> The <b>framework</b> in templates (3), (4), (5), (6), (7), and (8) will be one of netFx20, netFx35, netFx40, netFx45, netFx451. </p> <p> The <b>cpu</b> in templates (3) and (4) will be one of x86, x64, arm, ia64. </p> <p> The <b>platform</b> in templates (5), (6), (7), and (8) will be one of Win32, x64, PocketPC, PocketPC-ARM, PocketPC-x86, WinCE-ARM, WinCE-x86. </p> <p> The <b>year</b> in templates (3), (4), (5), (6), (7), and (8) will be one of 2005, 2008, 2010, 2012, 2013. </p> <p> The <b>version</b> in templates (1), (2), (3), (4), (5), (6), (7), and (8) is the dot-delimited version number of the primary System.Data.SQLite assembly. </p> |
︙ | ︙ |
Changes to www/news.wiki.
1 2 3 4 5 | <title>News</title> <b>Version History</b> <p> | | < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <title>News</title> <b>Version History</b> <p> <b>1.0.98.0 - August XX, 2015 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Updated to [https://www.sqlite.org/releaselog/3_8_11_1.html|SQLite 3.8.11.1].</li> <li>Add full support for Visual Studio 2015 and the .NET Framework 4.6.</li> <li>Implement the Substring method for LINQ using the "substr" core SQL function. <b>** Potentially Incompatible Change **</b></li> <li>Honor the second argument to Math.Round when using LINQ. <b>** Potentially Incompatible Change **</b></li> <li>Honor the pre-existing flags for connections during the Open method. Fix for [964063da16]. <b>** Potentially Incompatible Change **</b></li> <li>Remove errant semi-colons from the SQL used by LINQ to INSERT and then SELECT rows with composite primary keys. Fix for [9d353b0bd8].</li> <li>Change the base type for the SQLiteConnectionFlags enumeration to long integer. <b>** Potentially Incompatible Change **</b></li> <li>Add extended return codes to the SQLiteErrorCode enumeration. Pursuant to [71bedaca19]. <b>** Potentially Incompatible Change **</b></li> <li>Improve exception handling in all native callbacks implemented in the SQLiteConnection class.</li> <li>Add Progress event and ProgressOps connection string property to enable raising progress events during long-running queries.</li> <li>Add "Recursive Triggers" connection string property to enable or disable the recursive trigger capability. Pursuant to [3a82ee635b].</li> <li>Add NoDefaultFlags connection string property to prevent the default connection flags from being used. Pursuant to [964063da16].</li> <li>Add VfsName connection string property to allow a non-default VFS to be used by the SQLite core library.</li> |
︙ | ︙ |