Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch virtualTables Excluding Merge-Ins
This is equivalent to a diff from a86c8c24d8 to 1e947f24b6
2013-06-25
| ||
21:50 | Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for [9a544991be]. check-in: 2d35b79c48 user: mistachkin tags: trunk | |
21:49 | Add connection flags to allow loading of extensions and the creation of modules to be disabled. Closed-Leaf check-in: 1e947f24b6 user: mistachkin tags: virtualTables | |
21:31 | Modify the CHM building tool to fix internal links to inherited members. check-in: c888a45583 user: mistachkin tags: virtualTables | |
2013-06-24
| ||
22:50 | Merge updates from trunk. check-in: d4f5e0a0ef user: mistachkin tags: virtualTables | |
2013-06-22
| ||
03:56 | Update to the FAQ #22. check-in: a86c8c24d8 user: mistachkin tags: trunk | |
03:36 | Update several wiki pages. check-in: ef62d192d4 user: mistachkin tags: trunk | |
Changes to Doc/Extra/version.html.
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | </table> </div> <div id="mainSection"> <div id="mainBody"> <h1 class="heading">Version History</h1> <p><b>1.0.87.0 - June XX, 2013 <font color="red">(release scheduled)</font></b></p> <ul> <li>The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for <a href="http://system.data.sqlite.org/index.html/info/47f4bac575">[47f4bac575]</a>.</li> <li>Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.</li> <li>Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/bbdda6eae2">[bbdda6eae2]</a>.</li> </ul> <p><b>1.0.86.0 - May 23, 2013</b></p> <ul> <li>Updated to <a href="http://www.sqlite.org/releaselog/3_7_17.html">SQLite 3.7.17</a>.</li> | > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | </table> </div> <div id="mainSection"> <div id="mainBody"> <h1 class="heading">Version History</h1> <p><b>1.0.87.0 - June XX, 2013 <font color="red">(release scheduled)</font></b></p> <ul> <li>Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for <a href="http://system.data.sqlite.org/index.html/info/9a544991be">[9a544991be]</a>.</li> <li>The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for <a href="http://system.data.sqlite.org/index.html/info/47f4bac575">[47f4bac575]</a>.</li> <li>Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.</li> <li>Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/bbdda6eae2">[bbdda6eae2]</a>.</li> </ul> <p><b>1.0.86.0 - May 23, 2013</b></p> <ul> <li>Updated to <a href="http://www.sqlite.org/releaselog/3_7_17.html">SQLite 3.7.17</a>.</li> |
︙ | ︙ |
Changes to Doc/buildChm.tcl.
︙ | ︙ | |||
78 79 80 81 82 83 84 85 | if {[string length $xmlDocFile] == 0 || ![file exists $xmlDocFile]} then { puts stdout "Cannot find XML doc file: $xmlDocFile" exit 1 } set data [readFile $xmlDocFile] set pattern { cref="([A-Z]):System\.Data\.SQLite\.} | > > | > > > > | | | > > | > > > > > | 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 | if {[string length $xmlDocFile] == 0 || ![file exists $xmlDocFile]} then { puts stdout "Cannot find XML doc file: $xmlDocFile" exit 1 } set data [readFile $xmlDocFile] set count 0 set pattern { cref="([A-Z]):System\.Data\.SQLite\.} incr count [regsub -all -- $pattern $data { cref="\1:system.Data.SQLite.} data] if {$count > 0} then { writeFile $xmlDocFile $data } else { puts stdout "*WARNING* File \"$xmlDocFile\" does not match: $pattern" } # # TODO: If the NDoc version number ever changes, the next line of code will # probably need to be updated. # set outputPath [file join Output ndoc3_msdn_temp] set code [catch {exec [file join $nDocPath bin NDoc3Console.exe] \ "-project=[file nativename $projectFile]"} result] puts stdout $result; if {$code != 0} then {exit $code} set fileNames [list SQLite.NET.hhp SQLite.NET.hhc] foreach fileName [glob -nocomplain [file join $outputPath *.html]] { lappend fileNames [file tail $fileName] } set patterns(.hhc,1) {<!--This document contains Table of Contents information\ for the HtmlHelp compiler\.--><UL>} set patterns(.hhp,1) {Default topic=~System\.Data\.SQLite\.html} set patterns(.hhp,2) \ {"~System\.Data\.SQLite\.html","~System\.Data\.SQLite\.html",,,,,} set patterns(.html,1) \ {"http://msdn\.microsoft\.com/en-us/library/(System\.Data\.SQLite\.(?:.*?))\(VS\.\d+\)\.aspx"} set subSpecs(.hhc,1) [readFileAsSubSpec [file join $path SQLite.NET.hhc]] set subSpecs(.hhp,1) {Default topic=welcome.html} set subSpecs(.hhp,2) {"welcome.html","welcome.html",,,,,} set subSpecs(.html,1) {"System.Data.SQLite~\1.html"} foreach fileName $fileNames { set fileName [file join $path $outputPath $fileName] # # NOTE: Make sure the file we need actually exists. # |
︙ | ︙ | |||
131 132 133 134 135 136 137 | set data [readFile $fileName] # # NOTE: No replacements have been performed yet. # set count 0 | | | | | | | | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | set data [readFile $fileName] # # NOTE: No replacements have been performed yet. # set count 0 foreach name [lsort [array names patterns [file extension $fileName],*]] { set pattern $patterns($name) set subSpec "" if {[info exists subSpecs($name)]} then { set subSpec $subSpecs($name) } set patternCount [regsub -all -- $pattern $data $subSpec data] if {$patternCount > 0} then { incr count $patternCount } else { puts stdout "*WARNING* File \"$fileName\" does not match: $pattern" } } # # NOTE: If we actually performed some replacements, rewrite the file. # if {$count > 0} then { |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.2005.vcproj.
︙ | ︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
242 243 244 245 246 247 248 249 250 251 252 253 254 255 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
333 334 335 336 337 338 339 340 341 342 343 344 345 346 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
426 427 428 429 430 431 432 433 434 435 436 437 438 439 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
525 526 527 528 529 530 531 532 533 534 535 536 537 538 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
716 717 718 719 720 721 722 723 724 725 726 727 728 729 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
927 928 929 930 931 932 933 934 935 936 937 938 939 940 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\ext\vtshim.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.2008.vcproj.
︙ | ︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
242 243 244 245 246 247 248 249 250 251 252 253 254 255 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
333 334 335 336 337 338 339 340 341 342 343 344 345 346 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" | > | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
426 427 428 429 430 431 432 433 434 435 436 437 438 439 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
525 526 527 528 529 530 531 532 533 534 535 536 537 538 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
716 717 718 719 720 721 722 723 724 725 726 727 728 729 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
927 928 929 930 931 932 933 934 935 936 937 938 939 940 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\ext\vtshim.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.2010.vcxproj.
︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 136 137 138 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 180 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
209 210 211 212 213 214 215 216 217 218 219 220 221 222 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
244 245 246 247 248 249 250 251 252 253 254 255 256 257 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
325 326 327 328 329 330 331 332 333 334 335 336 337 338 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
369 370 371 372 373 374 375 376 377 378 379 380 381 382 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
407 408 409 410 411 412 413 414 415 416 417 418 419 420 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
450 451 452 453 454 455 456 457 458 459 460 461 462 463 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2010.props" /> | > > > | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2010.props" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.2010.vcxproj.filters.
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> | > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.2012.vcxproj.
︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
174 175 176 177 178 179 180 181 182 183 184 185 186 187 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
216 217 218 219 220 221 222 223 224 225 226 227 228 229 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
251 252 253 254 255 256 257 258 259 260 261 262 263 264 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
288 289 290 291 292 293 294 295 296 297 298 299 300 301 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
332 333 334 335 336 337 338 339 340 341 342 343 344 345 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
376 377 378 379 380 381 382 383 384 385 386 387 388 389 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
414 415 416 417 418 419 420 421 422 423 424 425 426 427 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
457 458 459 460 461 462 463 464 465 466 467 468 469 470 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2012.props" /> | > > > | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2012.props" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.2012.vcxproj.filters.
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> | > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.CE.2005.vcproj.
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | Name="VCMIDLTool" TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" | > | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | Name="VCMIDLTool" TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" |
︙ | ︙ | |||
151 152 153 154 155 156 157 158 159 160 161 162 163 164 | TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" | > | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" |
︙ | ︙ | |||
248 249 250 251 252 253 254 255 256 257 258 259 260 261 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" | > | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" |
︙ | ︙ | |||
342 343 344 345 346 347 348 349 350 351 352 353 354 355 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" | > | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" |
︙ | ︙ | |||
437 438 439 440 441 442 443 444 445 446 447 448 449 450 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" | > | 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" |
︙ | ︙ | |||
533 534 535 536 537 538 539 540 541 542 543 544 545 546 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" | > | 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" |
︙ | ︙ | |||
717 718 719 720 721 722 723 724 725 726 727 728 729 730 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\ext\vtshim.c" > <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.CE.2008.vcproj.
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | Name="VCMIDLTool" TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" | > | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | Name="VCMIDLTool" TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" |
︙ | ︙ | |||
151 152 153 154 155 156 157 158 159 160 161 162 163 164 | TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" | > | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" |
︙ | ︙ | |||
248 249 250 251 252 253 254 255 256 257 258 259 260 261 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" | > | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" |
︙ | ︙ | |||
342 343 344 345 346 347 348 349 350 351 352 353 354 355 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" | > | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="true" RuntimeLibrary="1" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" |
︙ | ︙ | |||
437 438 439 440 441 442 443 444 445 446 447 448 449 450 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" | > | 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" |
︙ | ︙ | |||
533 534 535 536 537 538 539 540 541 542 543 544 545 546 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" | > | 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" Optimization="2" FavorSizeOrSpeed="2" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(SQLITE_WINCE_DEFINES);$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" RuntimeLibrary="0" FloatingPointModel="0" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" CompileAs="1" |
︙ | ︙ | |||
717 718 719 720 721 722 723 724 725 726 727 728 729 730 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\ext\vtshim.c" > <FileConfiguration Name="Debug|Pocket PC 2003 (ARMV4)" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.Static.2005.vcproj.
︙ | ︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
242 243 244 245 246 247 248 249 250 251 252 253 254 255 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
333 334 335 336 337 338 339 340 341 342 343 344 345 346 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
426 427 428 429 430 431 432 433 434 435 436 437 438 439 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
525 526 527 528 529 530 531 532 533 534 535 536 537 538 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
716 717 718 719 720 721 722 723 724 725 726 727 728 729 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
927 928 929 930 931 932 933 934 935 936 937 938 939 940 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\ext\vtshim.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.Static.2008.vcproj.
︙ | ︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
242 243 244 245 246 247 248 249 250 251 252 253 254 255 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
333 334 335 336 337 338 339 340 341 342 343 344 345 346 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" | > | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | <Tool Name="VCMIDLTool" TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES)" MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="4" |
︙ | ︙ | |||
426 427 428 429 430 431 432 433 434 435 436 437 438 439 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
525 526 527 528 529 530 531 532 533 534 535 536 537 538 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
716 717 718 719 720 721 722 723 724 725 726 727 728 729 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" | > | 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" Optimization="3" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="$(INTEROP_INCLUDE_DIRECTORIES)" PreprocessorDefinitions="WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES)" StringPooling="true" ExceptionHandling="0" RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="4" DebugInformationFormat="3" |
︙ | ︙ | |||
927 928 929 930 931 932 933 934 935 936 937 938 939 940 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\contrib\extension-functions.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="DebugNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> <FileConfiguration Name="ReleaseNativeOnly|x64" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> </FileConfiguration> </File> <File RelativePath=".\src\ext\vtshim.c" > <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" > <Tool Name="VCCLCompilerTool" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.Static.2010.vcxproj.
︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 136 137 138 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 180 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
209 210 211 212 213 214 215 216 217 218 219 220 221 222 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
244 245 246 247 248 249 250 251 252 253 254 255 256 257 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
325 326 327 328 329 330 331 332 333 334 335 336 337 338 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
369 370 371 372 373 374 375 376 377 378 379 380 381 382 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
407 408 409 410 411 412 413 414 415 416 417 418 419 420 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
450 451 452 453 454 455 456 457 458 459 460 461 462 463 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2010.props" /> | > > > | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2010.props" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.Static.2010.vcxproj.filters.
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> | > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.Static.2012.vcxproj.
︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkDelaySign> <LinkDelaySign Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkDelaySign> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
174 175 176 177 178 179 180 181 182 183 184 185 186 187 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
216 217 218 219 220 221 222 223 224 225 226 227 228 229 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'==''">"$(FrameworkSDKDir)Bin\sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> <Command Condition="'$(TargetFrameworkSDKToolsDirectory)'!=''">"$(TargetFrameworkSDKToolsDirectory)sn.exe" -Ra "$(TargetPath)" "$(INTEROP_KEY_FILE)"</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
251 252 253 254 255 256 257 258 259 260 261 262 263 264 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> | > | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | <Command>XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\$(Platform)\" /D /E /V /I /F /H /Y XCOPY "$(TargetPath)" "$(OutDir)..\..\Debug\bin\" /D /E /V /I /F /H /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugNativeOnly|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;_DEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_DEBUG_DEFINES);$(INTEROP_EXTRA_DEFINES);$(INTEROP_DEBUG_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> |
︙ | ︙ | |||
288 289 290 291 292 293 294 295 296 297 298 299 300 301 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
332 333 334 335 336 337 338 339 340 341 342 343 344 345 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
376 377 378 379 380 381 382 383 384 385 386 387 388 389 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|Win32'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
414 415 416 417 418 419 420 421 422 423 424 425 426 427 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | > | 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNativeOnly|x64'"> <ClCompile> <Optimization>Full</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <AdditionalIncludeDirectories>$(INTEROP_INCLUDE_DIRECTORIES);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;x64;NDEBUG;_WINDOWS;_USRDLL;$(SQLITE_COMMON_DEFINES);$(SQLITE_EXTRA_DEFINES);$(SQLITE_RELEASE_DEFINES);$(INTEROP_EXTRA_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
︙ | ︙ | |||
457 458 459 460 461 462 463 464 465 466 467 468 469 470 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2012.props" /> | > > > | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | </ClCompile> <ClCompile Include="src\win\crypt.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> <ClCompile Include="src\win\interop.c" /> <ClCompile Include="src\core\sqlite3.c"> <ExcludedFromBuild>true</ExcludedFromBuild> </ClCompile> </ItemGroup> <ItemGroup> <None Include="props\SQLite.Interop.2012.props" /> |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.Static.2012.vcxproj.filters.
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> | > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\crypt.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\contrib\extension-functions.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\ext\vtshim.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\win\interop.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="src\core\sqlite3.c"> <Filter>Source Files</Filter> </ClCompile> |
︙ | ︙ |
Changes to SQLite.Interop/props/SQLite.Interop.2005.vsprops.
︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_RC_VERSION" Value="1,0,87,0" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_DEBUG_DEFINES" Value="INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_EXTRA_DEFINES" | > > > > > | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_RC_VERSION" Value="1,0,87,0" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_INCLUDE_DIRECTORIES" Value="src\core" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_DEBUG_DEFINES" Value="INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_EXTRA_DEFINES" Value="INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_ASSEMBLY_RESOURCES" Value="/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp" PerformEnvironmentSet="true" /> |
︙ | ︙ |
Changes to SQLite.Interop/props/SQLite.Interop.2008.vsprops.
︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_RC_VERSION" Value="1,0,87,0" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_DEBUG_DEFINES" Value="INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_EXTRA_DEFINES" | > > > > > | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_RC_VERSION" Value="1,0,87,0" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_INCLUDE_DIRECTORIES" Value="src\core" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_DEBUG_DEFINES" Value="INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_EXTRA_DEFINES" Value="INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1" PerformEnvironmentSet="true" /> <UserMacro Name="INTEROP_ASSEMBLY_RESOURCES" Value="/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp" PerformEnvironmentSet="true" /> |
︙ | ︙ |
Changes to SQLite.Interop/props/SQLite.Interop.2010.props.
︙ | ︙ | |||
10 11 12 13 14 15 16 17 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <ConfigurationYear>2010</ConfigurationYear> <INTEROP_BUILD_NUMBER>087</INTEROP_BUILD_NUMBER> <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION> <INTEROP_MANIFEST_VERSION>1.0.87.0</INTEROP_MANIFEST_VERSION> <INTEROP_RC_VERSION>1,0,87,0</INTEROP_RC_VERSION> <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES> | > | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <ConfigurationYear>2010</ConfigurationYear> <INTEROP_BUILD_NUMBER>087</INTEROP_BUILD_NUMBER> <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION> <INTEROP_MANIFEST_VERSION>1.0.87.0</INTEROP_MANIFEST_VERSION> <INTEROP_RC_VERSION>1,0,87,0</INTEROP_RC_VERSION> <INTEROP_INCLUDE_DIRECTORIES>src\core</INTEROP_INCLUDE_DIRECTORIES> <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES> <INTEROP_EXTRA_DEFINES>INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1</INTEROP_EXTRA_DEFINES> <INTEROP_ASSEMBLY_RESOURCES>/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp</INTEROP_ASSEMBLY_RESOURCES> <INTEROP_KEY_FILE>$(ProjectDir)..\System.Data.SQLite\System.Data.SQLite.snk</INTEROP_KEY_FILE> <INTEROP_NATIVE_NAME>SQLite.Interop</INTEROP_NATIVE_NAME> <INTEROP_MIXED_NAME>System.Data.SQLite</INTEROP_MIXED_NAME> </PropertyGroup> <ItemGroup> <BuildMacro Include="ConfigurationYear"> |
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <BuildMacro Include="INTEROP_MANIFEST_VERSION"> <Value>$(INTEROP_MANIFEST_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_RC_VERSION"> <Value>$(INTEROP_RC_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_DEBUG_DEFINES"> <Value>$(INTEROP_DEBUG_DEFINES)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_EXTRA_DEFINES"> <Value>$(INTEROP_EXTRA_DEFINES)</Value> | > > > > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | <BuildMacro Include="INTEROP_MANIFEST_VERSION"> <Value>$(INTEROP_MANIFEST_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_RC_VERSION"> <Value>$(INTEROP_RC_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_INCLUDE_DIRECTORIES"> <Value>$(INTEROP_INCLUDE_DIRECTORIES)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_DEBUG_DEFINES"> <Value>$(INTEROP_DEBUG_DEFINES)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_EXTRA_DEFINES"> <Value>$(INTEROP_EXTRA_DEFINES)</Value> |
︙ | ︙ |
Changes to SQLite.Interop/props/SQLite.Interop.2012.props.
︙ | ︙ | |||
10 11 12 13 14 15 16 17 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <ConfigurationYear>2012</ConfigurationYear> <INTEROP_BUILD_NUMBER>087</INTEROP_BUILD_NUMBER> <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION> <INTEROP_MANIFEST_VERSION>1.0.87.0</INTEROP_MANIFEST_VERSION> <INTEROP_RC_VERSION>1,0,87,0</INTEROP_RC_VERSION> <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES> | > | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup Label="UserMacros"> <ConfigurationYear>2012</ConfigurationYear> <INTEROP_BUILD_NUMBER>087</INTEROP_BUILD_NUMBER> <INTEROP_LINKER_VERSION>1.0</INTEROP_LINKER_VERSION> <INTEROP_MANIFEST_VERSION>1.0.87.0</INTEROP_MANIFEST_VERSION> <INTEROP_RC_VERSION>1,0,87,0</INTEROP_RC_VERSION> <INTEROP_INCLUDE_DIRECTORIES>src\core</INTEROP_INCLUDE_DIRECTORIES> <INTEROP_DEBUG_DEFINES>INTEROP_DEBUG=0x31F;INTEROP_LOG=1;INTEROP_TEST_EXTENSION=1</INTEROP_DEBUG_DEFINES> <INTEROP_EXTRA_DEFINES>INTEROP_EXTENSION_FUNCTIONS=1;INTEROP_CODEC=1;INTEROP_VIRTUAL_TABLE=1</INTEROP_EXTRA_DEFINES> <INTEROP_ASSEMBLY_RESOURCES>/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp /ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp</INTEROP_ASSEMBLY_RESOURCES> <INTEROP_KEY_FILE>$(ProjectDir)..\System.Data.SQLite\System.Data.SQLite.snk</INTEROP_KEY_FILE> <INTEROP_NATIVE_NAME>SQLite.Interop</INTEROP_NATIVE_NAME> <INTEROP_MIXED_NAME>System.Data.SQLite</INTEROP_MIXED_NAME> </PropertyGroup> <ItemGroup> <BuildMacro Include="ConfigurationYear"> |
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <BuildMacro Include="INTEROP_MANIFEST_VERSION"> <Value>$(INTEROP_MANIFEST_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_RC_VERSION"> <Value>$(INTEROP_RC_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_DEBUG_DEFINES"> <Value>$(INTEROP_DEBUG_DEFINES)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_EXTRA_DEFINES"> <Value>$(INTEROP_EXTRA_DEFINES)</Value> | > > > > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | <BuildMacro Include="INTEROP_MANIFEST_VERSION"> <Value>$(INTEROP_MANIFEST_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_RC_VERSION"> <Value>$(INTEROP_RC_VERSION)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_INCLUDE_DIRECTORIES"> <Value>$(INTEROP_INCLUDE_DIRECTORIES)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_DEBUG_DEFINES"> <Value>$(INTEROP_DEBUG_DEFINES)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="INTEROP_EXTRA_DEFINES"> <Value>$(INTEROP_EXTRA_DEFINES)</Value> |
︙ | ︙ |
Added SQLite.Interop/src/ext/vtshim.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 | /* ** 2013-06-12 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** ** A shim that sits between the SQLite virtual table interface and ** runtimes with garbage collector based memory management. */ #include "sqlite3ext.h" SQLITE_EXTENSION_INIT1 #include <assert.h> #include <string.h> #ifndef SQLITE_OMIT_VIRTUALTABLE /* Forward references */ typedef struct vtshim_aux vtshim_aux; typedef struct vtshim_vtab vtshim_vtab; typedef struct vtshim_cursor vtshim_cursor; /* The vtshim_aux argument is the auxiliary parameter that is passed ** into sqlite3_create_module_v2(). */ struct vtshim_aux { void *pChildAux; /* pAux for child virtual tables */ void (*xChildDestroy)(void*); /* Destructor for pChildAux */ sqlite3_module *pMod; /* Methods for child virtual tables */ sqlite3 *db; /* The database to which we are attached */ char *zName; /* Name of the module */ int bDisposed; /* True if disposed */ vtshim_vtab *pAllVtab; /* List of all vtshim_vtab objects */ sqlite3_module sSelf; /* Methods used by this shim */ }; /* A vtshim virtual table object */ struct vtshim_vtab { sqlite3_vtab base; /* Base class - must be first */ sqlite3_vtab *pChild; /* Child virtual table */ vtshim_aux *pAux; /* Pointer to vtshim_aux object */ vtshim_cursor *pAllCur; /* List of all cursors */ vtshim_vtab **ppPrev; /* Previous on list */ vtshim_vtab *pNext; /* Next on list */ }; /* A vtshim cursor object */ struct vtshim_cursor { sqlite3_vtab_cursor base; /* Base class - must be first */ sqlite3_vtab_cursor *pChild; /* Cursor generated by the managed subclass */ vtshim_cursor **ppPrev; /* Previous on list of all cursors */ vtshim_cursor *pNext; /* Next on list of all cursors */ }; /* Macro used to copy the child vtable error message to outer vtable */ #define VTSHIM_COPY_ERRMSG() \ do { \ sqlite3_free(pVtab->base.zErrMsg); \ pVtab->base.zErrMsg = sqlite3_mprintf("%s", pVtab->pChild->zErrMsg); \ } while (0) /* Methods for the vtshim module */ static int vtshimCreate( sqlite3 *db, void *ppAux, int argc, const char *const*argv, sqlite3_vtab **ppVtab, char **pzErr ){ vtshim_aux *pAux = (vtshim_aux*)ppAux; vtshim_vtab *pNew; int rc; assert( db==pAux->db ); if( pAux->bDisposed ){ if( pzErr ){ *pzErr = sqlite3_mprintf("virtual table was disposed: \"%s\"", pAux->zName); } return SQLITE_ERROR; } pNew = sqlite3_malloc( sizeof(*pNew) ); *ppVtab = (sqlite3_vtab*)pNew; if( pNew==0 ) return SQLITE_NOMEM; memset(pNew, 0, sizeof(*pNew)); rc = pAux->pMod->xCreate(db, pAux->pChildAux, argc, argv, &pNew->pChild, pzErr); if( rc ){ sqlite3_free(pNew); *ppVtab = 0; } pNew->pAux = pAux; pNew->ppPrev = &pAux->pAllVtab; pNew->pNext = pAux->pAllVtab; if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext; pAux->pAllVtab = pNew; return rc; } static int vtshimConnect( sqlite3 *db, void *ppAux, int argc, const char *const*argv, sqlite3_vtab **ppVtab, char **pzErr ){ vtshim_aux *pAux = (vtshim_aux*)ppAux; vtshim_vtab *pNew; int rc; assert( db==pAux->db ); if( pAux->bDisposed ){ if( pzErr ){ *pzErr = sqlite3_mprintf("virtual table was disposed: \"%s\"", pAux->zName); } return SQLITE_ERROR; } pNew = sqlite3_malloc( sizeof(*pNew) ); *ppVtab = (sqlite3_vtab*)pNew; if( pNew==0 ) return SQLITE_NOMEM; memset(pNew, 0, sizeof(*pNew)); rc = pAux->pMod->xConnect(db, pAux->pChildAux, argc, argv, &pNew->pChild, pzErr); if( rc ){ sqlite3_free(pNew); *ppVtab = 0; } pNew->pAux = pAux; pNew->ppPrev = &pAux->pAllVtab; pNew->pNext = pAux->pAllVtab; if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext; pAux->pAllVtab = pNew; return rc; } static int vtshimBestIndex( sqlite3_vtab *pBase, sqlite3_index_info *pIdxInfo ){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xBestIndex(pVtab->pChild, pIdxInfo); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimDisconnect(sqlite3_vtab *pBase){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc = SQLITE_OK; if( !pAux->bDisposed ){ rc = pAux->pMod->xDisconnect(pVtab->pChild); } if( pVtab->pNext ) pVtab->pNext->ppPrev = pVtab->ppPrev; *pVtab->ppPrev = pVtab->pNext; sqlite3_free(pVtab); return rc; } static int vtshimDestroy(sqlite3_vtab *pBase){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc = SQLITE_OK; if( !pAux->bDisposed ){ rc = pAux->pMod->xDestroy(pVtab->pChild); } if( pVtab->pNext ) pVtab->pNext->ppPrev = pVtab->ppPrev; *pVtab->ppPrev = pVtab->pNext; sqlite3_free(pVtab); return rc; } static int vtshimOpen(sqlite3_vtab *pBase, sqlite3_vtab_cursor **ppCursor){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; vtshim_cursor *pCur; int rc; *ppCursor = 0; if( pAux->bDisposed ) return SQLITE_ERROR; pCur = sqlite3_malloc( sizeof(*pCur) ); if( pCur==0 ) return SQLITE_NOMEM; memset(pCur, 0, sizeof(*pCur)); rc = pAux->pMod->xOpen(pVtab->pChild, &pCur->pChild); if( rc ){ sqlite3_free(pCur); VTSHIM_COPY_ERRMSG(); return rc; } pCur->pChild->pVtab = pVtab->pChild; *ppCursor = &pCur->base; pCur->ppPrev = &pVtab->pAllCur; if( pVtab->pAllCur ) pVtab->pAllCur->ppPrev = &pCur->pNext; pCur->pNext = pVtab->pAllCur; pVtab->pAllCur = pCur; return SQLITE_OK; } static int vtshimClose(sqlite3_vtab_cursor *pX){ vtshim_cursor *pCur = (vtshim_cursor*)pX; vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab; vtshim_aux *pAux = pVtab->pAux; int rc = SQLITE_OK; if( !pAux->bDisposed ){ rc = pAux->pMod->xClose(pCur->pChild); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } } if( pCur->pNext ) pCur->pNext->ppPrev = pCur->ppPrev; *pCur->ppPrev = pCur->pNext; sqlite3_free(pCur); return rc; } static int vtshimFilter( sqlite3_vtab_cursor *pX, int idxNum, const char *idxStr, int argc, sqlite3_value **argv ){ vtshim_cursor *pCur = (vtshim_cursor*)pX; vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xFilter(pCur->pChild, idxNum, idxStr, argc, argv); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimNext(sqlite3_vtab_cursor *pX){ vtshim_cursor *pCur = (vtshim_cursor*)pX; vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xNext(pCur->pChild); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimEof(sqlite3_vtab_cursor *pX){ vtshim_cursor *pCur = (vtshim_cursor*)pX; vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return 1; rc = pAux->pMod->xEof(pCur->pChild); VTSHIM_COPY_ERRMSG(); return rc; } static int vtshimColumn(sqlite3_vtab_cursor *pX, sqlite3_context *ctx, int i){ vtshim_cursor *pCur = (vtshim_cursor*)pX; vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xColumn(pCur->pChild, ctx, i); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimRowid(sqlite3_vtab_cursor *pX, sqlite3_int64 *pRowid){ vtshim_cursor *pCur = (vtshim_cursor*)pX; vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xRowid(pCur->pChild, pRowid); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimUpdate( sqlite3_vtab *pBase, int argc, sqlite3_value **argv, sqlite3_int64 *pRowid ){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xUpdate(pVtab->pChild, argc, argv, pRowid); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimBegin(sqlite3_vtab *pBase){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xBegin(pVtab->pChild); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimSync(sqlite3_vtab *pBase){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xSync(pVtab->pChild); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimCommit(sqlite3_vtab *pBase){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xCommit(pVtab->pChild); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimRollback(sqlite3_vtab *pBase){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xRollback(pVtab->pChild); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimFindFunction( sqlite3_vtab *pBase, int nArg, const char *zName, void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), void **ppArg ){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return 0; rc = pAux->pMod->xFindFunction(pVtab->pChild, nArg, zName, pxFunc, ppArg); VTSHIM_COPY_ERRMSG(); return rc; } static int vtshimRename(sqlite3_vtab *pBase, const char *zNewName){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xRename(pVtab->pChild, zNewName); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimSavepoint(sqlite3_vtab *pBase, int n){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xSavepoint(pVtab->pChild, n); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimRelease(sqlite3_vtab *pBase, int n){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xRelease(pVtab->pChild, n); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } static int vtshimRollbackTo(sqlite3_vtab *pBase, int n){ vtshim_vtab *pVtab = (vtshim_vtab*)pBase; vtshim_aux *pAux = pVtab->pAux; int rc; if( pAux->bDisposed ) return SQLITE_ERROR; rc = pAux->pMod->xRollbackTo(pVtab->pChild, n); if( rc!=SQLITE_OK ){ VTSHIM_COPY_ERRMSG(); } return rc; } /* The destructor function for a disposible module */ static void vtshimAuxDestructor(void *pXAux){ vtshim_aux *pAux = (vtshim_aux*)pXAux; assert( pAux->pAllVtab==0 ); if( !pAux->bDisposed && pAux->xChildDestroy ){ pAux->xChildDestroy(pAux->pChildAux); } sqlite3_free(pAux->zName); sqlite3_free(pAux->pMod); sqlite3_free(pAux); } static int vtshimCopyModule( const sqlite3_module *pMod, /* Source module to be copied */ sqlite3_module **ppMod /* Destination for copied module */ ){ sqlite3_module *p; if( !pMod || !ppMod ) return SQLITE_ERROR; p = sqlite3_malloc( sizeof(*p) ); if( p==0 ) return SQLITE_NOMEM; memcpy(p, pMod, sizeof(*p)); *ppMod = p; return SQLITE_OK; } #ifdef _WIN32 __declspec(dllexport) #endif void *sqlite3_create_disposable_module( sqlite3 *db, /* SQLite connection to register module with */ const char *zName, /* Name of the module */ const sqlite3_module *p, /* Methods for the module */ void *pClientData, /* Client data for xCreate/xConnect */ void(*xDestroy)(void*) /* Module destructor function */ ){ vtshim_aux *pAux; sqlite3_module *pMod; int rc; pAux = sqlite3_malloc( sizeof(*pAux) ); if( pAux==0 ){ if( xDestroy ) xDestroy(pClientData); return 0; } rc = vtshimCopyModule(p, &pMod); if( rc!=SQLITE_OK ){ sqlite3_free(pAux); return 0; } pAux->pChildAux = pClientData; pAux->xChildDestroy = xDestroy; pAux->pMod = pMod; pAux->db = db; pAux->zName = sqlite3_mprintf("%s", zName); pAux->bDisposed = 0; pAux->pAllVtab = 0; pAux->sSelf.iVersion = p->iVersion<=2 ? p->iVersion : 2; pAux->sSelf.xCreate = p->xCreate ? vtshimCreate : 0; pAux->sSelf.xConnect = p->xConnect ? vtshimConnect : 0; pAux->sSelf.xBestIndex = p->xBestIndex ? vtshimBestIndex : 0; pAux->sSelf.xDisconnect = p->xDisconnect ? vtshimDisconnect : 0; pAux->sSelf.xDestroy = p->xDestroy ? vtshimDestroy : 0; pAux->sSelf.xOpen = p->xOpen ? vtshimOpen : 0; pAux->sSelf.xClose = p->xClose ? vtshimClose : 0; pAux->sSelf.xFilter = p->xFilter ? vtshimFilter : 0; pAux->sSelf.xNext = p->xNext ? vtshimNext : 0; pAux->sSelf.xEof = p->xEof ? vtshimEof : 0; pAux->sSelf.xColumn = p->xColumn ? vtshimColumn : 0; pAux->sSelf.xRowid = p->xRowid ? vtshimRowid : 0; pAux->sSelf.xUpdate = p->xUpdate ? vtshimUpdate : 0; pAux->sSelf.xBegin = p->xBegin ? vtshimBegin : 0; pAux->sSelf.xSync = p->xSync ? vtshimSync : 0; pAux->sSelf.xCommit = p->xCommit ? vtshimCommit : 0; pAux->sSelf.xRollback = p->xRollback ? vtshimRollback : 0; pAux->sSelf.xFindFunction = p->xFindFunction ? vtshimFindFunction : 0; pAux->sSelf.xRename = p->xRename ? vtshimRename : 0; if( p->iVersion>=2 ){ pAux->sSelf.xSavepoint = p->xSavepoint ? vtshimSavepoint : 0; pAux->sSelf.xRelease = p->xRelease ? vtshimRelease : 0; pAux->sSelf.xRollbackTo = p->xRollbackTo ? vtshimRollbackTo : 0; }else{ pAux->sSelf.xSavepoint = 0; pAux->sSelf.xRelease = 0; pAux->sSelf.xRollbackTo = 0; } rc = sqlite3_create_module_v2(db, zName, &pAux->sSelf, pAux, vtshimAuxDestructor); return rc==SQLITE_OK ? (void*)pAux : 0; } #ifdef _WIN32 __declspec(dllexport) #endif void sqlite3_dispose_module(void *pX){ vtshim_aux *pAux = (vtshim_aux*)pX; if( !pAux->bDisposed ){ vtshim_vtab *pVtab; vtshim_cursor *pCur; for(pVtab=pAux->pAllVtab; pVtab; pVtab=pVtab->pNext){ for(pCur=pVtab->pAllCur; pCur; pCur=pCur->pNext){ pAux->pMod->xClose(pCur->pChild); } pAux->pMod->xDisconnect(pVtab->pChild); } pAux->bDisposed = 1; if( pAux->xChildDestroy ) pAux->xChildDestroy(pAux->pChildAux); } } #endif /* SQLITE_OMIT_VIRTUALTABLE */ #ifdef _WIN32 __declspec(dllexport) #endif int sqlite3_vtshim_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi ){ SQLITE_EXTENSION_INIT2(pApi); return SQLITE_OK; } |
Changes to SQLite.Interop/src/win/interop.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ #define SQLITE_API __declspec(dllexport) #include "../core/sqlite3.c" #if defined(INTEROP_EXTENSION_FUNCTIONS) #include "../contrib/extension-functions.c" extern int RegisterExtensionFunctions(sqlite3 *db); #endif #ifdef SQLITE_OS_WIN | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /******************************************************** * 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! ********************************************************/ #define SQLITE_API __declspec(dllexport) #include "../core/sqlite3.c" #if defined(INTEROP_VIRTUAL_TABLE) #include "../ext/vtshim.c" #endif #if defined(INTEROP_EXTENSION_FUNCTIONS) #include "../contrib/extension-functions.c" extern int RegisterExtensionFunctions(sqlite3 *db); #endif #ifdef SQLITE_OS_WIN |
︙ | ︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 | #if defined(INTEROP_LOG) SQLITE_PRIVATE int logConfigured = 0; SQLITE_PRIVATE void sqlite3InteropLogCallback(void *pArg, int iCode, const char *zMsg){ sqlite3InteropDebug("INTEROP_LOG (%d) %s\n", iCode, zMsg); } #endif #if defined(INTEROP_LEGACY_CLOSE) || SQLITE_VERSION_NUMBER < 3007014 SQLITE_PRIVATE void * sqlite3DbMallocZero_interop(sqlite3 *db, int n) { void *p; if (db) { sqlite3_mutex_enter(db->mutex); | > > > > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #if defined(INTEROP_LOG) SQLITE_PRIVATE int logConfigured = 0; SQLITE_PRIVATE void sqlite3InteropLogCallback(void *pArg, int iCode, const char *zMsg){ sqlite3InteropDebug("INTEROP_LOG (%d) %s\n", iCode, zMsg); } #endif SQLITE_API int WINAPI sqlite3_malloc_size_interop(void *p){ return sqlite3MallocSize(p); } #if defined(INTEROP_LEGACY_CLOSE) || SQLITE_VERSION_NUMBER < 3007014 SQLITE_PRIVATE void * sqlite3DbMallocZero_interop(sqlite3 *db, int n) { void *p; if (db) { sqlite3_mutex_enter(db->mutex); |
︙ | ︙ | |||
321 322 323 324 325 326 327 328 329 330 331 332 333 334 | sqlite3InteropDebug("sqlite3_prepare_interop(): sqlite3_prepare16(%p, \"%s\", %d, %p) returned %d.\n", db, sql, nchars, ppstmt, n); #endif *plen = (*pztail != 0) ? wcslen((wchar_t *)*pztail) * sizeof(wchar_t) : 0; return n; } SQLITE_API int WINAPI sqlite3_bind_double_interop(sqlite3_stmt *stmt, int iCol, double *val) { return sqlite3_bind_double(stmt,iCol,*val); } SQLITE_API int WINAPI sqlite3_bind_int64_interop(sqlite3_stmt *stmt, int iCol, sqlite_int64 *val) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | sqlite3InteropDebug("sqlite3_prepare_interop(): sqlite3_prepare16(%p, \"%s\", %d, %p) returned %d.\n", db, sql, nchars, ppstmt, n); #endif *plen = (*pztail != 0) ? wcslen((wchar_t *)*pztail) * sizeof(wchar_t) : 0; return n; } SQLITE_API void *WINAPI sqlite3_create_disposable_module_interop( sqlite3 *db, const char *zName, sqlite3_module *pModule, int iVersion, int (*xCreate)(sqlite3*, void *, int, const char *const*, sqlite3_vtab **, char**), int (*xConnect)(sqlite3*, void *, int, const char *const*, sqlite3_vtab **, char**), int (*xBestIndex)(sqlite3_vtab *, sqlite3_index_info*), int (*xDisconnect)(sqlite3_vtab *), int (*xDestroy)(sqlite3_vtab *), int (*xOpen)(sqlite3_vtab *, sqlite3_vtab_cursor **), int (*xClose)(sqlite3_vtab_cursor*), int (*xFilter)(sqlite3_vtab_cursor*, int, const char *, int, sqlite3_value **), int (*xNext)(sqlite3_vtab_cursor*), int (*xEof)(sqlite3_vtab_cursor*), int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int), int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *), int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *), int (*xBegin)(sqlite3_vtab *), int (*xSync)(sqlite3_vtab *), int (*xCommit)(sqlite3_vtab *), int (*xRollback)(sqlite3_vtab *), int (*xFindFunction)(sqlite3_vtab *, int, const char *, void (**pxFunc)(sqlite3_context*, int, sqlite3_value**), void **ppArg), int (*xRename)(sqlite3_vtab *, const char *), int (*xSavepoint)(sqlite3_vtab *, int), int (*xRelease)(sqlite3_vtab *, int), int (*xRollbackTo)(sqlite3_vtab *, int), void *pClientData, void(*xDestroyModule)(void*) ){ memset(pModule, 0, sizeof(*pModule)); pModule->iVersion = iVersion; pModule->xCreate = xCreate; pModule->xConnect = xConnect; pModule->xBestIndex = xBestIndex; pModule->xDisconnect = xDisconnect; pModule->xDestroy = xDestroy; pModule->xOpen = xOpen; pModule->xClose = xClose; pModule->xFilter = xFilter; pModule->xNext = xNext; pModule->xEof = xEof; pModule->xColumn = xColumn; pModule->xRowid = xRowid; pModule->xUpdate = xUpdate; pModule->xBegin = xBegin; pModule->xSync = xSync; pModule->xCommit = xCommit; pModule->xRollback = xRollback; pModule->xFindFunction = xFindFunction; pModule->xRename = xRename; pModule->xSavepoint = xSavepoint; pModule->xRelease = xRelease; pModule->xRollbackTo = xRollbackTo; return sqlite3_create_disposable_module(db, zName, pModule, pClientData, xDestroyModule); } SQLITE_API void WINAPI sqlite3_dispose_module_interop(void *pModule) { sqlite3_dispose_module(pModule); } SQLITE_API int WINAPI sqlite3_bind_double_interop(sqlite3_stmt *stmt, int iCol, double *val) { return sqlite3_bind_double(stmt,iCol,*val); } SQLITE_API int WINAPI sqlite3_bind_int64_interop(sqlite3_stmt *stmt, int iCol, sqlite_int64 *val) |
︙ | ︙ |
Changes to SQLite.NET.Settings.targets.
︙ | ︙ | |||
194 195 196 197 198 199 200 201 202 203 204 205 206 207 | critical handle class is constructed and decremented when the ReleaseHandle method is completed successfully on an instance. These counts are intended to be used by the test suite to detect possible resource leaks. --> <CountHandle Condition="'$(CountHandle)' == ''">false</CountHandle> <!-- NOTE: For interaction with the native SQLite implementation, use the custom built interop DLL (i.e. "SQLite.Interop.dll")? By default, this is enabled. This property is mutually exclusive with the "UseSqliteStandard" one, below. This should always be disabled in the project file that builds the NetModule target. --> | > > > > > > > > > | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | critical handle class is constructed and decremented when the ReleaseHandle method is completed successfully on an instance. These counts are intended to be used by the test suite to detect possible resource leaks. --> <CountHandle Condition="'$(CountHandle)' == ''">false</CountHandle> <!-- NOTE: Enable tracking of all outstanding bytes allocated by the SQLiteMemory class. By default, this is disabled. If this is enabled, this library will keep track of all outstanding bytes allocated by the SQLiteMemory class. This has the potential to slow down the library a bit. --> <TrackMemoryBytes Condition="'$(TrackMemoryBytes)' == ''">false</TrackMemoryBytes> <!-- NOTE: For interaction with the native SQLite implementation, use the custom built interop DLL (i.e. "SQLite.Interop.dll")? By default, this is enabled. This property is mutually exclusive with the "UseSqliteStandard" one, below. This should always be disabled in the project file that builds the NetModule target. --> |
︙ | ︙ | |||
359 360 361 362 363 364 365 366 367 368 369 370 371 372 | "SQLite.Interop\props\SQLite.Interop.20YY.[vs]props" for the corresponding version(s) of Visual Studio. --> <InteropLog Condition="'$(InteropLog)' == '' And '$(Configuration)' == 'Debug'">true</InteropLog> <InteropLog Condition="'$(InteropLog)' == '' And '$(Configuration)' != 'Debug'">false</InteropLog> <!-- NOTE: Enable the use of native Windows APIs, when available? By default, this is enabled. If this is disabled, all features that require the use of native Windows APIs will be unavailable. --> <UseWindows Condition="'$(UseWindows)' == ''">true</UseWindows> </PropertyGroup> | > > > > > > > > > > > > > > > > | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | "SQLite.Interop\props\SQLite.Interop.20YY.[vs]props" for the corresponding version(s) of Visual Studio. --> <InteropLog Condition="'$(InteropLog)' == '' And '$(Configuration)' == 'Debug'">true</InteropLog> <InteropLog Condition="'$(InteropLog)' == '' And '$(Configuration)' != 'Debug'">false</InteropLog> <!-- NOTE: Enable including the vtshim module as a statically available extension? This will allow virtual tables to be implemented in managed code. By default, this is enabled. If this is disabled, support for implementing virtual tables in managed code will be unavailable. If this is enabled, it must also be enabled via the "INTEROP_VIRTUAL_TABLE=1" preprocessor define being present in the "INTEROP_EXTRA_DEFINES" macro in the build properties file: "SQLite.Interop\props\SQLite.Interop.20YY.[vs]props" both for the corresponding version(s) of Visual Studio. --> <InteropVirtualTable Condition="'$(InteropVirtualTable)' == ''">true</InteropVirtualTable> <!-- NOTE: Enable the use of native Windows APIs, when available? By default, this is enabled. If this is disabled, all features that require the use of native Windows APIs will be unavailable. --> <UseWindows Condition="'$(UseWindows)' == ''">true</UseWindows> </PropertyGroup> |
︙ | ︙ |
Changes to Setup/set_user_mistachkin_Debug.bat.
︙ | ︙ | |||
13 14 15 16 17 18 19 | REM NOTE: Enables the extra debug code helpful in troubleshooting issues. REM SET MSBUILD_ARGS=/p:CheckState=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:CountHandle=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceConnection=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceHandle=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceStatement=true | > | 13 14 15 16 17 18 19 20 | REM NOTE: Enables the extra debug code helpful in troubleshooting issues. REM SET MSBUILD_ARGS=/p:CheckState=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:CountHandle=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceConnection=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceHandle=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceStatement=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TrackMemoryBytes=true |
Changes to System.Data.SQLite/SQLite3.cs.
︙ | ︙ | |||
73 74 75 76 77 78 79 | #endif /// <summary> /// The user-defined functions registered on this connection /// </summary> protected SQLiteFunction[] _functionsArray; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > | 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 | #endif /// <summary> /// The user-defined functions registered on this connection /// </summary> protected SQLiteFunction[] _functionsArray; #if INTEROP_VIRTUAL_TABLE /// <summary> /// The modules created using this connection. /// </summary> protected Dictionary<string, SQLiteModule> _modules; #endif /////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Constructs the object used to interact with the SQLite core library /// using the UTF-8 text encoding. /// </summary> /// <param name="fmt"> /// The DateTime format to be used when converting string values to a /// DateTime and binding DateTime parameters. /// </param> /// <param name="kind"> /// The <see cref="DateTimeKind" /> to be used when creating DateTime /// values. /// </param> /// <param name="fmtString"> /// The format string to be used when parsing and formatting DateTime /// values. /// </param> /// <param name="db"> /// The native handle to be associated with the database connection. /// </param> /// <param name="fileName"> /// The fully qualified file name associated with <paramref name="db "/>. /// </param> /// <param name="ownHandle"> /// Non-zero if the newly created object instance will need to dispose /// of <paramref name="db" /> when it is no longer needed. /// </param> internal SQLite3( SQLiteDateFormats fmt, DateTimeKind kind, string fmtString, IntPtr db, string fileName, bool ownHandle ) : base(fmt, kind, fmtString) { if (db != IntPtr.Zero) { _sql = new SQLiteConnectionHandle(db, ownHandle); _fileName = fileName; } } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; private void CheckDisposed() /* throw */ |
︙ | ︙ | |||
108 109 110 111 112 113 114 115 116 117 118 119 120 121 | // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// Close(false); /* Disposing, cannot throw. */ disposed = true; } } finally | > > > > > > > > > > > > > > > > > > > > > | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// #if INTEROP_VIRTUAL_TABLE // // NOTE: If any modules were created, attempt to dispose of // them now. This code is designed to avoid throwing // exceptions unless the Dispose method of the module // itself throws an exception. // if (_modules != null) { foreach (KeyValuePair<string, SQLiteModule> pair in _modules) { SQLiteModule module = pair.Value; if (module == null) continue; module.Dispose(); } } #endif Close(false); /* Disposing, cannot throw. */ disposed = true; } } finally |
︙ | ︙ | |||
131 132 133 134 135 136 137 138 139 140 141 142 143 144 | // goes to the pool and is resurrected later, re-registered functions will overwrite the // previous functions. The SQLiteFunctionCookieHandle will take care of freeing unmanaged // resources belonging to the previously-registered functions. internal override void Close(bool canThrow) { if (_sql != null) { if (_usePool) { if (SQLiteBase.ResetConnection(_sql, _sql, canThrow)) { SQLiteConnectionPool.Add(_fileName, _sql, _poolVersion); #if !NET_COMPACT_20 && TRACE_CONNECTION | > > > > > > | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | // goes to the pool and is resurrected later, re-registered functions will overwrite the // previous functions. The SQLiteFunctionCookieHandle will take care of freeing unmanaged // resources belonging to the previously-registered functions. internal override void Close(bool canThrow) { if (_sql != null) { if (!_sql.OwnHandle) { _sql = null; return; } if (_usePool) { if (SQLiteBase.ResetConnection(_sql, _sql, canThrow)) { SQLiteConnectionPool.Add(_fileName, _sql, _poolVersion); #if !NET_COMPACT_20 && TRACE_CONNECTION |
︙ | ︙ | |||
242 243 244 245 246 247 248 | internal override long LastInsertRowId { get { #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_last_insert_rowid(_sql); | | > > | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | internal override long LastInsertRowId { get { #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_last_insert_rowid(_sql); #elif !SQLITE_STANDARD long rowId = 0; UnsafeNativeMethods.sqlite3_last_insert_rowid_interop(_sql, ref rowId); return rowId; #else throw new NotImplementedException(); #endif } } internal override int Changes { get |
︙ | ︙ | |||
268 269 270 271 272 273 274 | internal override long MemoryUsed { get { #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_memory_used(); | | > > | > > > > > > > > > > > > > > > > > | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | internal override long MemoryUsed { get { #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_memory_used(); #elif !SQLITE_STANDARD long bytes = 0; UnsafeNativeMethods.sqlite3_memory_used_interop(ref bytes); return bytes; #else throw new NotImplementedException(); #endif } } internal override long MemoryHighwater { get { #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_memory_highwater(0); #elif !SQLITE_STANDARD long bytes = 0; UnsafeNativeMethods.sqlite3_memory_highwater_interop(0, ref bytes); return bytes; #else throw new NotImplementedException(); #endif } } /// <summary> /// Returns non-zero if the underlying native connection handle is owned /// by this instance. /// </summary> internal override bool OwnHandle { get { if (_sql == null) throw new SQLiteException("no connection handle available"); return _sql.OwnHandle; } } internal override SQLiteErrorCode SetMemoryStatus(bool value) { return StaticSetMemoryStatus(value); } internal static SQLiteErrorCode StaticSetMemoryStatus(bool value) |
︙ | ︙ | |||
321 322 323 324 325 326 327 | internal override bool IsOpen() { return (_sql != null) && !_sql.IsInvalid && !_sql.IsClosed; } internal override void Open(string strFilename, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, int maxPoolSize, bool usePool) { | > > > > > > | > > > > > > > | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | internal override bool IsOpen() { return (_sql != null) && !_sql.IsInvalid && !_sql.IsClosed; } internal override void Open(string strFilename, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, int maxPoolSize, bool usePool) { // // NOTE: If the database connection is currently open, attempt to // close it now. This must be done because the file name or // other parameters that may impact the underlying database // connection may have changed. // if (_sql != null) Close(true); // // NOTE: If the connection was not closed successfully, throw an // exception now. // if (_sql != null) throw new SQLiteException("connection handle is still active"); _usePool = usePool; _fileName = strFilename; if (usePool) { _sql = SQLiteConnectionPool.Remove(strFilename, maxPoolSize, out _poolVersion); |
︙ | ︙ | |||
362 363 364 365 366 367 368 | } #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format("Open: {0}", db)); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null); | | | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | } #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format("Open: {0}", db)); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null); _sql = new SQLiteConnectionHandle(db, true); } lock (_sql) { /* HACK: Force the SyncBlock to be "created" now. */ } } // Bind functions to this connection. If any previous functions of the same name // were already bound, then the new bindings replace the old. _functionsArray = SQLiteFunction.BindFunctions(this, connectionFlags); SetTimeout(0); |
︙ | ︙ | |||
471 472 473 474 475 476 477 | // Reassign a new statement pointer to the old statement and clear the temporary one stmt._sqlite_stmt = tmp._sqlite_stmt; tmp._sqlite_stmt = null; // Reapply parameters stmt.BindParameters(); } | | | | 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | // Reassign a new statement pointer to the old statement and clear the temporary one stmt._sqlite_stmt = tmp._sqlite_stmt; tmp._sqlite_stmt = null; // Reapply parameters stmt.BindParameters(); } return SQLiteErrorCode.Unknown; // Reset was OK, with schema change } else if (n == SQLiteErrorCode.Locked || n == SQLiteErrorCode.Busy) return n; if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError()); return n; // We reset OK, no schema changes } internal override string GetLastError() { return SQLiteBase.GetLastError(_sql, _sql); } |
︙ | ︙ | |||
656 657 658 659 660 661 662 663 664 665 666 667 668 669 | } protected static void LogBind(SQLiteStatementHandle handle, int index) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( "Binding statement {0} paramter #{1} as NULL...", handleIntPtr, index)); } protected static void LogBind(SQLiteStatementHandle handle, int index, ValueType value) { IntPtr handleIntPtr = handle; | > | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | } 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; |
︙ | ︙ | |||
737 738 739 740 741 742 743 | if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } #if !PLATFORM_COMPACTFRAMEWORK SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_double(handle, index, value); | | > > | 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 | 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; |
︙ | ︙ | |||
775 776 777 778 779 780 781 | if ((flags & SQLiteConnectionFlags.BindUInt32AsInt64) == SQLiteConnectionFlags.BindUInt32AsInt64) { long value2 = value; #if !PLATFORM_COMPACTFRAMEWORK n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value2); | | > > | > > | > > | 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 | if ((flags & SQLiteConnectionFlags.BindUInt32AsInt64) == SQLiteConnectionFlags.BindUInt32AsInt64) { long value2 = value; #if !PLATFORM_COMPACTFRAMEWORK n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value2); #elif !SQLITE_STANDARD n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value2); #else throw new NotImplementedException(); #endif } else { n = UnsafeNativeMethods.sqlite3_bind_uint(handle, index, value); } if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError()); } internal override void Bind_Int64(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, long value) { SQLiteStatementHandle handle = stmt._sqlite_stmt; #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; |
︙ | ︙ | |||
868 869 870 871 872 873 874 | #if !PLATFORM_COMPACTFRAMEWORK if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { LogBind(handle, index, value); } SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value); | | > > | > > | > > | 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 | #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); |
︙ | ︙ | |||
966 967 968 969 970 971 972 973 974 975 976 977 978 979 | int value = UnsafeNativeMethods.sqlite3_bind_parameter_count(handle); if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( "Statement {0} paramter count is {1}.", handleIntPtr, value)); } return value; } | > | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 | 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; } |
︙ | ︙ | |||
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 | #endif if ((flags & SQLiteConnectionFlags.LogBind) == SQLiteConnectionFlags.LogBind) { IntPtr handleIntPtr = handle; SQLiteLog.LogMessage(String.Format( "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( "Statement {0} paramter index of name {{{1}}} is #{2}.", handleIntPtr, paramName, index)); } return index; } | > > | 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 | #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; } |
︙ | ︙ | |||
1146 1147 1148 1149 1150 1151 1152 | } internal override double GetDouble(SQLiteStatement stmt, int index) { double value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_column_double(stmt._sqlite_stmt, index); | | > > | 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 | } 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 UnsafeNativeMethods.sqlite3_column_double_interop(stmt._sqlite_stmt, index, out value); #else throw new NotImplementedException(); #endif return value; } internal override sbyte GetSByte(SQLiteStatement stmt, int index) { return unchecked((sbyte)(GetInt32(stmt, index) & byte.MaxValue)); |
︙ | ︙ | |||
1187 1188 1189 1190 1191 1192 1193 | } internal override long GetInt64(SQLiteStatement stmt, int index) { long value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_column_int64(stmt._sqlite_stmt, index); | | > > | 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 | } 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 UnsafeNativeMethods.sqlite3_column_int64_interop(stmt._sqlite_stmt, index, out value); #else throw new NotImplementedException(); #endif return value; } internal override ulong GetUInt64(SQLiteStatement stmt, int index) { return unchecked((ulong)GetInt64(stmt, index)); |
︙ | ︙ | |||
1406 1407 1408 1409 1410 1411 1412 | } internal override double GetParamValueDouble(IntPtr ptr) { double value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_value_double(ptr); | | > > | > > | 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 | } internal override double GetParamValueDouble(IntPtr ptr) { double value; #if !PLATFORM_COMPACTFRAMEWORK value = UnsafeNativeMethods.sqlite3_value_double(ptr); #elif !SQLITE_STANDARD UnsafeNativeMethods.sqlite3_value_double_interop(ptr, out 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 UnsafeNativeMethods.sqlite3_value_int64_interop(ptr, out value); #else throw new NotImplementedException(); #endif return value; } internal override string GetParamValueText(IntPtr ptr) { #if !SQLITE_STANDARD |
︙ | ︙ | |||
1453 1454 1455 1456 1457 1458 1459 | UnsafeNativeMethods.sqlite3_result_blob(context, value, value.Length, (IntPtr)(-1)); } internal override void ReturnDouble(IntPtr context, double value) { #if !PLATFORM_COMPACTFRAMEWORK UnsafeNativeMethods.sqlite3_result_double(context, value); | | > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | UnsafeNativeMethods.sqlite3_result_blob(context, value, value.Length, (IntPtr)(-1)); } internal override void ReturnDouble(IntPtr context, double value) { #if !PLATFORM_COMPACTFRAMEWORK UnsafeNativeMethods.sqlite3_result_double(context, value); #elif !SQLITE_STANDARD UnsafeNativeMethods.sqlite3_result_double_interop(context, ref value); #else throw new NotImplementedException(); #endif } internal override void ReturnError(IntPtr context, string value) { UnsafeNativeMethods.sqlite3_result_error(context, ToUTF8(value), value.Length); } internal override void ReturnInt32(IntPtr context, int value) { UnsafeNativeMethods.sqlite3_result_int(context, value); } internal override void ReturnInt64(IntPtr context, long value) { #if !PLATFORM_COMPACTFRAMEWORK UnsafeNativeMethods.sqlite3_result_int64(context, value); #elif !SQLITE_STANDARD UnsafeNativeMethods.sqlite3_result_int64_interop(context, ref value); #else throw new NotImplementedException(); #endif } internal override void ReturnNull(IntPtr context) { UnsafeNativeMethods.sqlite3_result_null(context); } internal override void ReturnText(IntPtr context, string value) { byte[] b = ToUTF8(value); UnsafeNativeMethods.sqlite3_result_text(context, ToUTF8(value), b.Length - 1, (IntPtr)(-1)); } #if INTEROP_VIRTUAL_TABLE /// <summary> /// Calls the native SQLite core library in order to create a disposable /// module containing the implementation of a virtual table. /// </summary> /// <param name="module"> /// The module object to be used when creating the native disposable module. /// </param> internal override void CreateModule(SQLiteModule module) { if (module == null) throw new ArgumentNullException("module"); if (_sql == null) throw new SQLiteException("connection has an invalid handle"); SetLoadExtension(true); LoadExtension(UnsafeNativeMethods.SQLITE_DLL, "sqlite3_vtshim_init"); IntPtr pName = IntPtr.Zero; try { pName = SQLiteString.Utf8IntPtrFromString(module.Name); UnsafeNativeMethods.sqlite3_module nativeModule = module.CreateNativeModule(); #if !PLATFORM_COMPACTFRAMEWORK if (UnsafeNativeMethods.sqlite3_create_disposable_module( _sql, pName, ref nativeModule, IntPtr.Zero, null) != IntPtr.Zero) #elif !SQLITE_STANDARD if (UnsafeNativeMethods.sqlite3_create_disposable_module_interop( _sql, pName, module.CreateNativeModuleInterop(), nativeModule.iVersion, nativeModule.xCreate, nativeModule.xConnect, nativeModule.xBestIndex, nativeModule.xDisconnect, nativeModule.xDestroy, nativeModule.xOpen, nativeModule.xClose, nativeModule.xFilter, nativeModule.xNext, nativeModule.xEof, nativeModule.xColumn, nativeModule.xRowId, nativeModule.xUpdate, nativeModule.xBegin, nativeModule.xSync, nativeModule.xCommit, nativeModule.xRollback, nativeModule.xFindFunction, nativeModule.xRename, nativeModule.xSavepoint, nativeModule.xRelease, nativeModule.xRollbackTo, IntPtr.Zero, null) != IntPtr.Zero) #else throw new NotImplementedException(); #endif #if !PLATFORM_COMPACTFRAMEWORK || !SQLITE_STANDARD { if (_modules == null) _modules = new Dictionary<string, SQLiteModule>(); _modules.Add(module.Name, module); } else { throw new SQLiteException(GetLastError()); } #endif } finally { if (pName != IntPtr.Zero) { SQLiteMemory.Free(pName); pName = IntPtr.Zero; } } } /// <summary> /// Calls the native SQLite core library in order to cleanup the resources /// associated with a module containing the implementation of a virtual table. /// </summary> /// <param name="module"> /// The module object previously passed to the <see cref="CreateModule" /> /// method. /// </param> internal override void DisposeModule(SQLiteModule module) { if (module == null) throw new ArgumentNullException("module"); module.Dispose(); } #endif internal override IntPtr AggregateContext(IntPtr context) { return UnsafeNativeMethods.sqlite3_aggregate_context(context, 1); } #if INTEROP_VIRTUAL_TABLE /// <summary> /// Calls the native SQLite core library in order to declare a virtual table /// in response to a call into the xCreate or xConnect virtual table methods. /// </summary> /// <param name="module"> /// The virtual table module that is to be responsible for the virtual table /// being declared. /// </param> /// <param name="strSql"> /// The string containing the SQL statement describing the virtual table to /// be declared. /// </param> /// <param name="error"> /// Upon success, the contents of this parameter are undefined. Upon failure, /// it should contain an appropriate error message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> internal override SQLiteErrorCode DeclareVirtualTable( SQLiteModule module, string strSql, ref string error ) { if (_sql == null) { error = "connection has an invalid handle"; return SQLiteErrorCode.Error; } IntPtr pSql = IntPtr.Zero; try { pSql = SQLiteString.Utf8IntPtrFromString(strSql); SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_declare_vtab( _sql, pSql); if ((n == SQLiteErrorCode.Ok) && (module != null)) module.Declared = true; if (n != SQLiteErrorCode.Ok) error = GetLastError(); return n; } finally { if (pSql != IntPtr.Zero) { SQLiteMemory.Free(pSql); pSql = IntPtr.Zero; } } } #endif /// <summary> /// Enables or disabled extension loading by SQLite. /// </summary> /// <param name="bOnOff"> /// True to enable loading of extensions, false to disable. /// </param> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLite3_UTF16.cs.
︙ | ︙ | |||
17 18 19 20 21 22 23 | using System.Runtime.InteropServices; /// <summary> /// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode) /// </summary> internal sealed class SQLite3_UTF16 : SQLite3 { | > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 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> /// Constructs the object used to interact with the SQLite core library /// using the UTF-8 text encoding. /// </summary> /// <param name="fmt"> /// The DateTime format to be used when converting string values to a /// DateTime and binding DateTime parameters. /// </param> /// <param name="kind"> /// The <see cref="DateTimeKind" /> to be used when creating DateTime /// values. /// </param> /// <param name="fmtString"> /// The format string to be used when parsing and formatting DateTime /// values. /// </param> /// <param name="db"> /// The native handle to be associated with the database connection. /// </param> /// <param name="fileName"> /// The fully qualified file name associated with <paramref name="db "/>. /// </param> /// <param name="ownHandle"> /// Non-zero if the newly created object instance will need to dispose /// of <paramref name="db" /> when it is no longer needed. /// </param> internal SQLite3_UTF16( SQLiteDateFormats fmt, DateTimeKind kind, string fmtString, IntPtr db, string fileName, bool ownHandle ) : base(fmt, kind, fmtString, db, fileName, ownHandle) { } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; |
︙ | ︙ | |||
89 90 91 92 93 94 95 | return Marshal.PtrToStringUni(b); else return Marshal.PtrToStringUni(b, nbytelen / 2); } internal override void Open(string strFilename, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, int maxPoolSize, bool usePool) { | > > > > > > | > > > > > > > | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | return Marshal.PtrToStringUni(b); else return Marshal.PtrToStringUni(b, nbytelen / 2); } internal override void Open(string strFilename, SQLiteConnectionFlags connectionFlags, SQLiteOpenFlagsEnum openFlags, int maxPoolSize, bool usePool) { // // NOTE: If the database connection is currently open, attempt to // close it now. This must be done because the file name or // other parameters that may impact the underlying database // connection may have changed. // if (_sql != null) Close(true); // // NOTE: If the connection was not closed successfully, throw an // exception now. // if (_sql != null) throw new SQLiteException("connection handle is still active"); _usePool = usePool; _fileName = strFilename; if (usePool) { _sql = SQLiteConnectionPool.Remove(strFilename, maxPoolSize, out _poolVersion); |
︙ | ︙ | |||
139 140 141 142 143 144 145 | } #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format("Open16: {0}", db)); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null); | | | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | } #if !NET_COMPACT_20 && TRACE_CONNECTION Trace.WriteLine(String.Format("Open16: {0}", db)); #endif if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, null); _sql = new SQLiteConnectionHandle(db, true); } lock (_sql) { /* HACK: Force the SyncBlock to be "created" now. */ } } _functionsArray = SQLiteFunction.BindFunctions(this, connectionFlags); SetTimeout(0); GC.KeepAlive(_sql); } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteBase.cs.
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /// <summary> /// This internal class provides the foundation of SQLite support. It defines all the abstract members needed to implement /// a SQLite data provider, and inherits from SQLiteConvert which allows for simple translations of string to and from SQLite. /// </summary> internal abstract class SQLiteBase : SQLiteConvert, IDisposable { internal SQLiteBase(SQLiteDateFormats fmt, DateTimeKind kind, string fmtString) : base(fmt, kind, fmtString) { } /// <summary> /// Returns a string representing the active version of SQLite /// </summary> internal abstract string Version { get; } | > > > > > > > > > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | /// <summary> /// This internal class provides the foundation of SQLite support. It defines all the abstract members needed to implement /// a SQLite data provider, and inherits from SQLiteConvert which allows for simple translations of string to and from SQLite. /// </summary> internal abstract class SQLiteBase : SQLiteConvert, IDisposable { #region Private Constants /// <summary> /// The error code used for logging exceptions caught in user-provided /// code. /// </summary> internal const int COR_E_EXCEPTION = unchecked((int)0x80131500); #endregion ///////////////////////////////////////////////////////////////////////// internal SQLiteBase(SQLiteDateFormats fmt, DateTimeKind kind, string fmtString) : base(fmt, kind, fmtString) { } /// <summary> /// Returns a string representing the active version of SQLite /// </summary> internal abstract string Version { get; } |
︙ | ︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /// </summary> internal abstract long MemoryUsed { get; } /// <summary> /// Returns the maximum amount of memory (in bytes) used by the SQLite core library since the high-water mark was last reset. /// This is not really a per-connection value, it is global to the process. /// </summary> internal abstract long MemoryHighwater { get; } /// <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> /// <returns>A standard SQLite return code (i.e. zero for success and non-zero for failure).</returns> | > > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | /// </summary> internal abstract long MemoryUsed { get; } /// <summary> /// Returns the maximum amount of memory (in bytes) used by the SQLite core library since the high-water mark was last reset. /// This is not really a per-connection value, it is global to the process. /// </summary> internal abstract long MemoryHighwater { get; } /// <summary> /// Returns non-zero if the underlying native connection handle is owned by this instance. /// </summary> internal abstract bool OwnHandle { get; } /// <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> /// <returns>A standard SQLite return code (i.e. zero for success and non-zero for failure).</returns> |
︙ | ︙ | |||
196 197 198 199 200 201 202 203 204 205 206 207 208 209 | internal abstract void ReturnBlob(IntPtr context, byte[] value); internal abstract void ReturnDouble(IntPtr context, double value); internal abstract void ReturnError(IntPtr context, string value); internal abstract void ReturnInt32(IntPtr context, Int32 value); internal abstract void ReturnInt64(IntPtr context, Int64 value); internal abstract void ReturnNull(IntPtr context); internal abstract void ReturnText(IntPtr context, string value); /// <summary> /// Enables or disabled extension loading by SQLite. /// </summary> /// <param name="bOnOff"> /// True to enable loading of extensions, false to disable. /// </param> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | internal abstract void ReturnBlob(IntPtr context, byte[] value); internal abstract void ReturnDouble(IntPtr context, double value); internal abstract void ReturnError(IntPtr context, string value); internal abstract void ReturnInt32(IntPtr context, Int32 value); internal abstract void ReturnInt64(IntPtr context, Int64 value); internal abstract void ReturnNull(IntPtr context); internal abstract void ReturnText(IntPtr context, string value); #if INTEROP_VIRTUAL_TABLE /// <summary> /// Calls the native SQLite core library in order to create a disposable /// module containing the implementation of a virtual table. /// </summary> /// <param name="module"> /// The module object to be used when creating the native disposable module. /// </param> internal abstract void CreateModule(SQLiteModule module); /// <summary> /// Calls the native SQLite core library in order to cleanup the resources /// associated with a module containing the implementation of a virtual table. /// </summary> /// <param name="module"> /// The module object previously passed to the <see cref="CreateModule" /> /// method. /// </param> internal abstract void DisposeModule(SQLiteModule module); /// <summary> /// Calls the native SQLite core library in order to declare a virtual table /// in response to a call into the xCreate or xConnect virtual table methods. /// </summary> /// <param name="module"> /// The virtual table module that is to be responsible for the virtual table /// being declared. /// </param> /// <param name="strSql"> /// The string containing the SQL statement describing the virtual table to /// be declared. /// </param> /// <param name="error"> /// Upon success, the contents of this parameter are undefined. Upon failure, /// it should contain an appropriate error message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> internal abstract SQLiteErrorCode DeclareVirtualTable(SQLiteModule module, string strSql, ref string error); #endif /// <summary> /// Enables or disabled extension loading by SQLite. /// </summary> /// <param name="bOnOff"> /// True to enable loading of extensions, false to disable. /// </param> |
︙ | ︙ | |||
801 802 803 804 805 806 807 808 809 810 811 812 813 814 | /// <summary> /// When returning column values, always return them as though they were /// plain text (i.e. no numeric, date/time, or other conversions should /// be attempted). /// </summary> GetAllAsText = 0x100, /// <summary> /// When binding and returning column values, always treat them as though /// they were plain text (i.e. no numeric, date/time, or other conversions /// should be attempted). /// </summary> BindAndGetAllAsText = BindAllAsText | GetAllAsText, | > > > > > > > > > > > > | 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 | /// <summary> /// When returning column values, always return them as though they were /// plain text (i.e. no numeric, date/time, or other conversions should /// be attempted). /// </summary> GetAllAsText = 0x100, /// <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> /// When binding and returning column values, always treat them as though /// they were plain text (i.e. no numeric, date/time, or other conversions /// should be attempted). /// </summary> BindAndGetAllAsText = BindAllAsText | GetAllAsText, |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
399 400 401 402 403 404 405 406 407 408 409 410 411 412 | #if !PLATFORM_COMPACTFRAMEWORK /// <summary> /// Whether or not the connection is enlisted in a distrubuted transaction /// </summary> internal SQLiteEnlistment _enlistment; #endif /// <summary> /// The base SQLite object to interop with /// </summary> internal SQLiteBase _sql; /// <summary> /// The database filename minus path and extension /// </summary> | > | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | #if !PLATFORM_COMPACTFRAMEWORK /// <summary> /// Whether or not the connection is enlisted in a distrubuted transaction /// </summary> internal SQLiteEnlistment _enlistment; #endif /// <summary> /// The base SQLite object to interop with /// </summary> internal SQLiteBase _sql; /// <summary> /// The database filename minus path and extension /// </summary> |
︙ | ︙ | |||
470 471 472 473 474 475 476 | ///<overloads> /// Constructs a new SQLiteConnection object /// </overloads> /// <summary> /// Default constructor /// </summary> public SQLiteConnection() | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 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 | ///<overloads> /// Constructs a new SQLiteConnection object /// </overloads> /// <summary> /// Default constructor /// </summary> public SQLiteConnection() : this((string)null) { } /// <summary> /// Initializes the connection with the specified connection string. /// </summary> /// <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. /// </summary> /// <param name="db"> /// The native connection handle to use. /// </param> /// <param name="fileName"> /// The file name corresponding to the native connection handle. /// </param> /// <param name="ownHandle"> /// Non-zero if this instance owns the native connection handle and /// should dispose of it when it is no longer needed. /// </param> internal SQLiteConnection(IntPtr db, string fileName, bool ownHandle) : this() { _sql = new SQLite3( SQLiteDateFormats.Default, DateTimeKind.Unspecified, null, db, fileName, ownHandle); _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> /// <param name="parseViaFramework"> /// Non-zero to parse the connection string using the built-in (i.e. /// framework provided) parser when opening the connection. /// </param> public SQLiteConnection(string connectionString, bool parseViaFramework) { |
︙ | ︙ | |||
539 540 541 542 543 544 545 | SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized.")); } #endif _parseViaFramework = parseViaFramework; _flags = SQLiteConnectionFlags.Default; _connectionState = ConnectionState.Closed; | | < | < < | | 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 | SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized.")); } #endif _parseViaFramework = parseViaFramework; _flags = SQLiteConnectionFlags.Default; _connectionState = ConnectionState.Closed; _connectionString = null; if (connectionString != null) ConnectionString = connectionString; } /// <summary> /// Clones the settings and connection string from an existing connection. If the existing connection is already open, this /// function will open its own connection, enumerate any attached databases of the original connection, and automatically /// attach to them. /// </summary> /// <param name="connection">The connection to copy the settings from.</param> public SQLiteConnection(SQLiteConnection connection) : this(connection.ConnectionString, connection.ParseViaFramework) { if (connection.State == ConnectionState.Open) { Open(); // Reattach all attached databases from the existing connection using (DataTable tbl = connection.GetSchema("Catalogs")) { foreach (DataRow row in tbl.Rows) { 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(); |
︙ | ︙ | |||
683 684 685 686 687 688 689 | /// created. /// </returns> public static object CreateHandle( IntPtr nativeHandle ) { if (nativeHandle == IntPtr.Zero) return null; | | | 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | /// created. /// </returns> public static object CreateHandle( IntPtr nativeHandle ) { if (nativeHandle == IntPtr.Zero) return null; return new SQLiteConnectionHandle(nativeHandle, true); } /////////////////////////////////////////////////////////////////////////////////////////////// #region Backup API Members /// <summary> /// Backs up the database, using the specified database connection as the |
︙ | ︙ | |||
831 832 833 834 835 836 837 838 839 840 841 842 843 844 | if (handle.IsInvalid) throw new InvalidOperationException("The connection handle is invalid."); if (handle.IsClosed) throw new InvalidOperationException("The connection handle is closed."); } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; private void CheckDisposed() /* throw */ { | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | if (handle.IsInvalid) throw new InvalidOperationException("The connection handle is invalid."); if (handle.IsClosed) throw new InvalidOperationException("The connection handle is closed."); } /////////////////////////////////////////////////////////////////////////////////////////////// private static SortedList<string, string> ParseConnectionString( string connectionString, bool parseViaFramework ) { return parseViaFramework ? ParseConnectionStringViaFramework(connectionString, false) : ParseConnectionString(connectionString); } /////////////////////////////////////////////////////////////////////////////////////////////// private void SetupSQLiteBase(SortedList<string, string> opts) { object enumValue; enumValue = TryParseEnum( typeof(SQLiteDateFormats), FindKey(opts, "DateTimeFormat", DefaultDateTimeFormat.ToString()), true); SQLiteDateFormats dateFormat = (enumValue is SQLiteDateFormats) ? (SQLiteDateFormats)enumValue : DefaultDateTimeFormat; enumValue = TryParseEnum( typeof(DateTimeKind), FindKey(opts, "DateTimeKind", DefaultDateTimeKind.ToString()), true); DateTimeKind kind = (enumValue is DateTimeKind) ? (DateTimeKind)enumValue : DefaultDateTimeKind; string dateTimeFormat = FindKey(opts, "DateTimeFormatString", DefaultDateTimeFormatString); // // NOTE: SQLite automatically sets the encoding of the database // to UTF16 if called from sqlite3_open16(). // if (SQLiteConvert.ToBoolean(FindKey(opts, "UseUTF16Encoding", DefaultUseUTF16Encoding.ToString()))) { _sql = new SQLite3_UTF16( dateFormat, kind, dateTimeFormat, IntPtr.Zero, null, false); } else { _sql = new SQLite3( dateFormat, kind, dateTimeFormat, IntPtr.Zero, null, false); } } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; private void CheckDisposed() /* throw */ { |
︙ | ︙ | |||
1435 1436 1437 1438 1439 1440 1441 | arParts = SQLiteConvert.Split(s, ';'); else #endif arParts = SQLiteConvert.NewSplit(s, ';', true, ref error); if (arParts == null) { | | | 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 | arParts = SQLiteConvert.Split(s, ';'); else #endif 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++) |
︙ | ︙ | |||
1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 | bool enable ) { CheckDisposed(); if (_sql == null) throw new InvalidOperationException(String.Format( "Database connection not valid for {0} extensions.", enable ? "enabling" : "disabling")); _sql.SetLoadExtension(enable); } /// <summary> /// Loads a SQLite extension library from the named dynamic link library file. /// </summary> | > > > > | 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 | 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."); _sql.SetLoadExtension(enable); } /// <summary> /// Loads a SQLite extension library from the named dynamic link library file. /// </summary> |
︙ | ︙ | |||
1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 | { CheckDisposed(); if (_sql == null) throw new InvalidOperationException( "Database connection not valid for loading extensions."); _sql.LoadExtension(fileName, procName); } /// <summary> /// Parses a string containing a sequence of zero or more hexadecimal /// encoded byte values and returns the resulting byte array. The /// "0x" prefix is not allowed on the input string. /// </summary> /// <param name="text"> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | { CheckDisposed(); if (_sql == null) throw new InvalidOperationException( "Database connection not valid for loading extensions."); if ((_flags & SQLiteConnectionFlags.NoLoadExtension) == SQLiteConnectionFlags.NoLoadExtension) throw new SQLiteException("Loading extensions is disabled for this database connection."); _sql.LoadExtension(fileName, procName); } #if INTEROP_VIRTUAL_TABLE /// <summary> /// Creates a disposable module containing the implementation of a virtual /// table. /// </summary> /// <param name="module"> /// The module object to be used when creating the disposable module. /// </param> public void CreateModule( SQLiteModule module ) { CheckDisposed(); if (_sql == null) throw new InvalidOperationException( "Database connection not valid for creating modules."); if ((_flags & SQLiteConnectionFlags.NoCreateModule) == SQLiteConnectionFlags.NoCreateModule) throw new SQLiteException("Creating modules is disabled for this database connection."); _sql.CreateModule(module); } #endif /// <summary> /// Parses a string containing a sequence of zero or more hexadecimal /// encoded byte values and returns the resulting byte array. The /// "0x" prefix is not allowed on the input string. /// </summary> /// <param name="text"> |
︙ | ︙ | |||
1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 | { string value = text.Substring(index, 2); if (!TryParseByte(value, NumberStyles.HexNumber, out result[index / 2])) { error = String.Format( "string contains \"{0}\", which cannot be converted to a byte value", value); return null; } } | > | 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 | { 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; } } |
︙ | ︙ | |||
1811 1812 1813 1814 1815 1816 1817 | SQLiteConnectionEventType.Opening, null, null, null, null, null)); if (_connectionState != ConnectionState.Closed) throw new InvalidOperationException(); Close(); | | < | | 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 | SQLiteConnectionEventType.Opening, null, null, null, null, null)); if (_connectionState != ConnectionState.Closed) throw new InvalidOperationException(); Close(); SortedList<string, string> opts = ParseConnectionString( _connectionString, _parseViaFramework); OnChanged(this, new ConnectionEventArgs( SQLiteConnectionEventType.ConnectionString, null, null, null, _connectionString, opts)); object enumValue; enumValue = TryParseEnum(typeof(SQLiteConnectionFlags), FindKey(opts, "Flags", DefaultFlags.ToString()), true); |
︙ | ︙ | |||
1880 1881 1882 1883 1884 1885 1886 | if (_defaultIsolation != IsolationLevel.Serializable && _defaultIsolation != IsolationLevel.ReadCommitted) throw new NotSupportedException("Invalid Default IsolationLevel specified"); _baseSchemaName = FindKey(opts, "BaseSchemaName", DefaultBaseSchemaName); if (_sql == null) { | < < | < < < < < < < < < < < < < < < < < < < < < < < < < | 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 | if (_defaultIsolation != IsolationLevel.Serializable && _defaultIsolation != IsolationLevel.ReadCommitted) throw new NotSupportedException("Invalid Default IsolationLevel specified"); _baseSchemaName = FindKey(opts, "BaseSchemaName", DefaultBaseSchemaName); if (_sql == null) { SetupSQLiteBase(opts); } SQLiteOpenFlagsEnum flags = SQLiteOpenFlagsEnum.None; if (!SQLiteConvert.ToBoolean(FindKey(opts, "FailIfMissing", DefaultFailIfMissing.ToString()))) flags |= SQLiteOpenFlagsEnum.Create; |
︙ | ︙ | |||
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 | { string error = null; byte[] hexPasswordBytes = FromHexString(hexPassword, ref error); if (hexPasswordBytes == null) { throw new FormatException(String.Format( "Cannot parse 'HexPassword' property value into byte values: {0}", error)); } _sql.SetPassword(hexPasswordBytes); } else | > | 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 | { 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); } else |
︙ | ︙ | |||
2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 | /// possible values. /// </summary> public SQLiteConnectionFlags Flags { get { CheckDisposed(); return _flags; } set { CheckDisposed(); _flags = value; } } /// <summary> /// Returns the version of the underlying SQLite database engine /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif | > > > > > > > > > > > > > > > > > | 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 | /// possible values. /// </summary> public SQLiteConnectionFlags Flags { get { CheckDisposed(); return _flags; } set { CheckDisposed(); _flags = value; } } /// <summary> /// Returns non-zero if the underlying native connection handle is /// owned by this instance. /// </summary> public bool OwnHandle { get { CheckDisposed(); if (_sql == null) throw new InvalidOperationException("Database connection not valid for checking handle."); return _sql.OwnHandle; } } /// <summary> /// Returns the version of the underlying SQLite database engine /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif |
︙ | ︙ | |||
2306 2307 2308 2309 2310 2311 2312 | public SQLiteErrorCode Shutdown() { CheckDisposed(); // make sure we have an instance of the base class if (_sql == null) { | | < | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 | public SQLiteErrorCode Shutdown() { CheckDisposed(); // make sure we have an instance of the base class if (_sql == null) { SortedList<string, string> opts = ParseConnectionString( _connectionString, _parseViaFramework); SetupSQLiteBase(opts); } if (_sql != null) return _sql.Shutdown(); throw new InvalidOperationException("Database connection not active."); } /// Enables or disabled extended result codes returned by SQLite public void SetExtendedResultCodes(bool bOnOff) |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConvert.cs.
︙ | ︙ | |||
944 945 946 947 948 949 950 951 952 953 954 955 956 957 | return value.typeName; } string defaultTypeName = String.Empty; #if !NET_COMPACT_20 && TRACE_WARNING Trace.WriteLine(String.Format( "WARNING: Type mapping failed, returning default name \"{0}\" for type {1}.", defaultTypeName, typ)); #endif return defaultTypeName; } | > | 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | return value.typeName; } string defaultTypeName = String.Empty; #if !NET_COMPACT_20 && TRACE_WARNING Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Type mapping failed, returning default name \"{0}\" for type {1}.", defaultTypeName, typ)); #endif return defaultTypeName; } |
︙ | ︙ | |||
1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 | } } DbType defaultDbType = DbType.Object; #if !NET_COMPACT_20 && TRACE_WARNING Trace.WriteLine(String.Format( "WARNING: Type mapping failed, returning default type {0} for name \"{1}\".", defaultDbType, Name)); #endif return defaultDbType; } #endregion | > | 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 | } } DbType defaultDbType = DbType.Object; #if !NET_COMPACT_20 && TRACE_WARNING Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "WARNING: Type mapping failed, returning default type {0} for name \"{1}\".", defaultDbType, Name)); #endif return defaultDbType; } #endregion |
︙ | ︙ | |||
1195 1196 1197 1198 1199 1200 1201 | /// </summary> Null = 5, /// <summary> /// Used internally by this provider /// </summary> DateTime = 10, /// <summary> | | | 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 | /// </summary> Null = 5, /// <summary> /// Used internally by this provider /// </summary> DateTime = 10, /// <summary> /// Used internally by this provider /// </summary> None = 11, } /// <summary> /// These are the event types associated with the /// <see cref="SQLiteConnectionEventHandler" /> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDataReader.cs.
︙ | ︙ | |||
232 233 234 235 236 237 238 | if (!_throwOnDisposed) return; if (_command == null) throw new InvalidOperationException("DataReader has been closed"); if (_version == 0) | | | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | if (!_throwOnDisposed) return; if (_command == null) throw new InvalidOperationException("DataReader has been closed"); if (_version == 0) throw new SQLiteException("Execution was aborted by the user"); if (_command.Connection.State != ConnectionState.Open || _command.Connection._version != _version) throw new InvalidOperationException("Connection was closed, statement was terminated"); } /// <summary> /// Throw an error if a row is not loaded |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDefineConstants.cs.
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #if INTEROP_LOG "INTEROP_LOG", #endif #if INTEROP_TEST_EXTENSION "INTEROP_TEST_EXTENSION", #endif #if NET_20 "NET_20", #endif #if NET_35 "NET_35", | > > > > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | #if INTEROP_LOG "INTEROP_LOG", #endif #if INTEROP_TEST_EXTENSION "INTEROP_TEST_EXTENSION", #endif #if INTEROP_VIRTUAL_TABLE "INTEROP_VIRTUAL_TABLE", #endif #if NET_20 "NET_20", #endif #if NET_35 "NET_35", |
︙ | ︙ | |||
107 108 109 110 111 112 113 114 115 116 117 118 119 120 | #if TRACE_STATEMENT "TRACE_STATEMENT", #endif #if TRACE_WARNING "TRACE_WARNING", #endif #if USE_INTEROP_DLL "USE_INTEROP_DLL", #endif #if USE_PREPARE_V2 "USE_PREPARE_V2", | > > > > | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | #if TRACE_STATEMENT "TRACE_STATEMENT", #endif #if TRACE_WARNING "TRACE_WARNING", #endif #if TRACK_MEMORY_BYTES "TRACK_MEMORY_BYTES", #endif #if USE_INTEROP_DLL "USE_INTEROP_DLL", #endif #if USE_PREPARE_V2 "USE_PREPARE_V2", |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteException.cs.
︙ | ︙ | |||
63 64 65 66 67 68 69 | /// <summary> /// Public constructor that uses the base class constructor for the error /// message. /// </summary> /// <param name="message">Error message text.</param> public SQLiteException(string message) | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /// <summary> /// Public constructor that uses the base class constructor for the error /// message. /// </summary> /// <param name="message">Error message text.</param> public SQLiteException(string message) : this(SQLiteErrorCode.Unknown, message) { } /// <summary> /// Public constructor that uses the default base class constructor. /// </summary> public SQLiteException() |
︙ | ︙ | |||
196 197 198 199 200 201 202 203 204 205 206 207 208 209 | /// SQLite error codes. Actually, this enumeration represents a return code, /// which may also indicate success in one of several ways (e.g. SQLITE_OK, /// SQLITE_ROW, and SQLITE_DONE). Therefore, the name of this enumeration is /// something of a misnomer. /// </summary> public enum SQLiteErrorCode { /// <summary> /// Successful result /// </summary> Ok /* 0 */, /// <summary> /// SQL error or missing database /// </summary> | > > > > > | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | /// SQLite error codes. Actually, this enumeration represents a return code, /// which may also indicate success in one of several ways (e.g. SQLITE_OK, /// SQLITE_ROW, and SQLITE_DONE). Therefore, the name of this enumeration is /// something of a misnomer. /// </summary> public enum SQLiteErrorCode { /// <summary> /// The error code is unknown. This error code /// is only used by the managed wrapper itself. /// </summary> Unknown = -1, /// <summary> /// Successful result /// </summary> Ok /* 0 */, /// <summary> /// SQL error or missing database /// </summary> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteFunction.cs.
︙ | ︙ | |||
34 35 36 37 38 39 40 | { internal int _count = 1; internal object _data; } ///////////////////////////////////////////////////////////////////////// | < < < < < < < < < < | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | { internal int _count = 1; internal object _data; } ///////////////////////////////////////////////////////////////////////// /// <summary> /// The base connection this function is attached to /// </summary> internal SQLiteBase _base; /// <summary> /// Internal array used to keep track of aggregate function context data |
︙ | ︙ | |||
386 387 388 389 390 391 392 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { | | | | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | catch (Exception e) /* NOTE: Must catch ALL. */ { 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. |
︙ | ︙ | |||
424 425 426 427 428 429 430 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { | | | | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | catch (Exception e) /* NOTE: Must catch ALL. */ { 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. |
︙ | ︙ | |||
471 472 473 474 475 476 477 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { | | | | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | catch (Exception e) /* NOTE: Must catch ALL. */ { 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. |
︙ | ︙ | |||
544 545 546 547 548 549 550 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { | | | | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | catch (Exception e) /* NOTE: Must catch ALL. */ { 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. |
︙ | ︙ | |||
599 600 601 602 603 604 605 | catch (Exception e) /* NOTE: Must catch ALL. */ { try { if ((_flags & SQLiteConnectionFlags.LogCallbackException) == SQLiteConnectionFlags.LogCallbackException) { | | | | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | catch (Exception e) /* NOTE: Must catch ALL. */ { 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. |
︙ | ︙ | |||
842 843 844 845 846 847 848 | /// </summary> Collation = 2, } /// <summary> /// An internal callback delegate declaration. /// </summary> | | | | | | 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 | /// </summary> Collation = 2, } /// <summary> /// An internal callback delegate declaration. /// </summary> /// <param name="context">Raw native context pointer for the user function.</param> /// <param name="argc">Total number of arguments to the user function.</param> /// <param name="argv">Raw native pointer to the array of raw native argument pointers.</param> #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate void SQLiteCallback(IntPtr context, int argc, IntPtr argv); /// <summary> /// An internal final callback delegate declaration. /// </summary> /// <param name="context">Raw context pointer for the user function</param> #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteLog.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /******************************************************** * 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; using System.Diagnostics; /// <summary> /// Event data for logging event handlers. /// </summary> public class LogEventArgs : EventArgs { /// <summary> | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /******************************************************** * 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; using System.Diagnostics; using System.Globalization; /// <summary> /// Event data for logging event handlers. /// </summary> public class LogEventArgs : EventArgs { /// <summary> |
︙ | ︙ | |||
176 177 178 179 180 181 182 | } #endif // // NOTE: Create an instance of the SQLite wrapper class. // if (_sql == null) | > | | > > | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | } #endif // // NOTE: Create an instance of the SQLite wrapper class. // if (_sql == null) { _sql = new SQLite3( SQLiteDateFormats.Default, DateTimeKind.Unspecified, null, IntPtr.Zero, null, false); } // // NOTE: Create a single "global" (i.e. per-process) callback // to register with SQLite. This callback will pass the // event on to any registered handler. We only want to // do this once. // |
︙ | ︙ | |||
519 520 521 522 523 524 525 | bool success = false; if (errorCode is SQLiteErrorCode) success = ((SQLiteErrorCode)errorCode == SQLiteErrorCode.Ok); else if (errorCode is int) success = ((int)errorCode == 0); | | > | 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | bool success = false; if (errorCode is SQLiteErrorCode) success = ((SQLiteErrorCode)errorCode == SQLiteErrorCode.Ok); else if (errorCode is int) success = ((int)errorCode == 0); Trace.WriteLine(String.Format( CultureInfo.CurrentCulture, "SQLite {0} ({1}): {2}", success ? "message" : "error", errorCode, message)); #endif } } } |
Added System.Data.SQLite/SQLiteModule.cs.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 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 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 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 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 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 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 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 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 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 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 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 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 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 4617 4618 4619 4620 4621 4622 4623 4624 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 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 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 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 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 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 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 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 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 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 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 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 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 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 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 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Joe Mistachkin (joe@mistachkin.com) * * Released to the public domain, use at your own risk! ********************************************************/ using System.Collections.Generic; using System.Globalization; using System.Runtime.InteropServices; using System.Text; namespace System.Data.SQLite { #region SQLiteContext Helper Class /// <summary> /// This class represents a context from the SQLite core library that can /// be passed to the sqlite3_result_*() and associated functions. /// </summary> public sealed class SQLiteContext : ISQLiteNativeHandle { #region Private Data /// <summary> /// The native context handle. /// </summary> private IntPtr pContext; #endregion /////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified native /// context handle. /// </summary> /// <param name="pContext"> /// The native context handle to use. /// </param> internal SQLiteContext(IntPtr pContext) { this.pContext = pContext; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteNativeHandle Members /// <summary> /// Returns the underlying SQLite native handle associated with this /// object instance. /// </summary> public IntPtr NativeHandle { get { return pContext; } } #endregion /////////////////////////////////////////////////////////////////////// #region Public Methods /// <summary> /// Sets the context result to NULL. /// </summary> public void SetNull() { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); UnsafeNativeMethods.sqlite3_result_null(pContext); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="Double" /> /// value. /// </summary> /// <param name="value"> /// The <see cref="Double" /> value to use. /// </param> public void SetDouble(double value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); #if !PLATFORM_COMPACTFRAMEWORK UnsafeNativeMethods.sqlite3_result_double(pContext, value); #elif !SQLITE_STANDARD UnsafeNativeMethods.sqlite3_result_double_interop(pContext, ref value); #else throw new NotImplementedException(); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="Int32" /> /// value. /// </summary> /// <param name="value"> /// The <see cref="Int32" /> value to use. /// </param> public void SetInt(int value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); UnsafeNativeMethods.sqlite3_result_int(pContext, value); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="Int64" /> /// value. /// </summary> /// <param name="value"> /// The <see cref="Int64" /> value to use. /// </param> public void SetInt64(long value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); #if !PLATFORM_COMPACTFRAMEWORK UnsafeNativeMethods.sqlite3_result_int64(pContext, value); #elif !SQLITE_STANDARD UnsafeNativeMethods.sqlite3_result_int64_interop(pContext, ref value); #else throw new NotImplementedException(); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="String" /> /// value. /// </summary> /// <param name="value"> /// The <see cref="String" /> value to use. This value will be /// converted to the UTF-8 encoding prior to being used. /// </param> public void SetString(string value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); byte[] bytes = SQLiteString.GetUtf8BytesFromString(value); if (bytes == null) throw new ArgumentNullException("value"); UnsafeNativeMethods.sqlite3_result_text( pContext, bytes, bytes.Length, (IntPtr)(-1)); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="String" /> /// value containing an error message. /// </summary> /// <param name="value"> /// The <see cref="String" /> value containing the error message text. /// This value will be converted to the UTF-8 encoding prior to being /// used. /// </param> public void SetError(string value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); byte[] bytes = SQLiteString.GetUtf8BytesFromString(value); if (bytes == null) throw new ArgumentNullException("value"); UnsafeNativeMethods.sqlite3_result_error( pContext, bytes, bytes.Length); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="SQLiteErrorCode" /> /// value. /// </summary> /// <param name="value"> /// The <see cref="SQLiteErrorCode" /> value to use. /// </param> public void SetErrorCode(SQLiteErrorCode value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); UnsafeNativeMethods.sqlite3_result_error_code(pContext, value); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to contain the error code SQLITE_TOOBIG. /// </summary> public void SetErrorTooBig() { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); UnsafeNativeMethods.sqlite3_result_error_toobig(pContext); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to contain the error code SQLITE_NOMEM. /// </summary> public void SetErrorNoMemory() { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); UnsafeNativeMethods.sqlite3_result_error_nomem(pContext); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="Byte" /> array /// value. /// </summary> /// <param name="value"> /// The <see cref="Byte" /> array value to use. /// </param> public void SetBlob(byte[] value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); if (value == null) throw new ArgumentNullException("value"); UnsafeNativeMethods.sqlite3_result_blob( pContext, value, value.Length, (IntPtr)(-1)); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to a BLOB of zeros of the specified size. /// </summary> /// <param name="value"> /// The number of zero bytes to use for the BLOB context result. /// </param> public void SetZeroBlob(int value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); UnsafeNativeMethods.sqlite3_result_zeroblob(pContext, value); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the context result to the specified <see cref="SQLiteValue" />. /// </summary> /// <param name="value"> /// The <see cref="SQLiteValue" /> to use. /// </param> public void SetValue(SQLiteValue value) { if (pContext == IntPtr.Zero) throw new InvalidOperationException(); if (value == null) throw new ArgumentNullException("value"); UnsafeNativeMethods.sqlite3_result_value( pContext, value.NativeHandle); } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteValue Helper Class /// <summary> /// This class represents a value from the SQLite core library that can be /// passed to the sqlite3_value_*() and associated functions. /// </summary> public sealed class SQLiteValue : ISQLiteNativeHandle { #region Private Data /// <summary> /// The native value handle. /// </summary> private IntPtr pValue; #endregion /////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified native /// value handle. /// </summary> /// <param name="pValue"> /// The native value handle to use. /// </param> internal SQLiteValue(IntPtr pValue) { this.pValue = pValue; } #endregion /////////////////////////////////////////////////////////////////////// #region Private Methods /// <summary> /// Invalidates the native value handle, thereby preventing further /// access to it from this object instance. /// </summary> private void PreventNativeAccess() { pValue = IntPtr.Zero; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteNativeHandle Members /// <summary> /// Returns the underlying SQLite native handle associated with this /// object instance. /// </summary> public IntPtr NativeHandle { get { return pValue; } } #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private bool persisted; /// <summary> /// Returns non-zero if the native SQLite value has been successfully /// persisted as a managed value within this object instance (i.e. the /// <see cref="Value" /> property may then be read successfully). /// </summary> public bool Persisted { get { return persisted; } } /////////////////////////////////////////////////////////////////////// private object value; /// <summary> /// If the managed value for this object instance is available (i.e. it /// has been previously persisted via the <see cref="Persist"/>) method, /// that value is returned; otherwise, an exception is thrown. The /// returned value may be null. /// </summary> public object Value { get { if (!persisted) { throw new InvalidOperationException( "value was not persisted"); } return value; } } #endregion /////////////////////////////////////////////////////////////////////// #region Public Methods /// <summary> /// Gets and returns the type affinity associated with this value. /// </summary> /// <returns> /// The type affinity associated with this value. /// </returns> public TypeAffinity GetTypeAffinity() { if (pValue == IntPtr.Zero) return TypeAffinity.None; return UnsafeNativeMethods.sqlite3_value_type(pValue); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the number of bytes associated with this value, if /// it refers to a UTF-8 encoded string. /// </summary> /// <returns> /// The number of bytes associated with this value. The returned value /// may be zero. /// </returns> public int GetBytes() { if (pValue == IntPtr.Zero) return 0; return UnsafeNativeMethods.sqlite3_value_bytes(pValue); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the <see cref="Int32" /> associated with this /// value. /// </summary> /// <returns> /// The <see cref="Int32" /> associated with this value. /// </returns> public int GetInt() { if (pValue == IntPtr.Zero) return default(int); return UnsafeNativeMethods.sqlite3_value_int(pValue); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the <see cref="Int64" /> associated with /// this value. /// </summary> /// <returns> /// The <see cref="Int64" /> associated with this value. /// </returns> public long GetInt64() { if (pValue == IntPtr.Zero) return default(long); #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_value_int64(pValue); #elif !SQLITE_STANDARD long value; UnsafeNativeMethods.sqlite3_value_int64_interop(pValue, out value); return value; #else throw new NotImplementedException(); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the <see cref="Double" /> associated with this /// value. /// </summary> /// <returns> /// The <see cref="Double" /> associated with this value. /// </returns> public double GetDouble() { if (pValue == IntPtr.Zero) return default(double); #if !PLATFORM_COMPACTFRAMEWORK return UnsafeNativeMethods.sqlite3_value_double(pValue); #elif !SQLITE_STANDARD double value; UnsafeNativeMethods.sqlite3_value_double_interop(pValue, out value); return value; #else throw new NotImplementedException(); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the <see cref="String" /> associated with this /// value. /// </summary> /// <returns> /// The <see cref="String" /> associated with this value. The value is /// converted from the UTF-8 encoding prior to being returned. /// </returns> public string GetString() { if (pValue == IntPtr.Zero) return null; return SQLiteString.StringFromUtf8IntPtr(pValue, GetBytes()); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the <see cref="Byte" /> array associated with this /// value. /// </summary> /// <returns> /// The <see cref="Byte" /> array associated with this value. /// </returns> public byte[] GetBlob() { if (pValue == IntPtr.Zero) return null; return SQLiteBytes.FromIntPtr(pValue, GetBytes()); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Uses the native value handle to obtain and store the managed value /// for this object instance, thus saving it for later use. The type /// of the managed value is determined by the type affinity of the /// native value. If the type affinity is not recognized by this /// method, no work is done and false is returned. /// </summary> /// <returns> /// Non-zero if the native value was persisted successfully. /// </returns> public bool Persist() { switch (GetTypeAffinity()) { case TypeAffinity.Uninitialized: { value = null; PreventNativeAccess(); return (persisted = true); } case TypeAffinity.Int64: { value = GetInt64(); PreventNativeAccess(); return (persisted = true); } case TypeAffinity.Double: { value = GetDouble(); PreventNativeAccess(); return (persisted = true); } case TypeAffinity.Text: { value = GetString(); PreventNativeAccess(); return (persisted = true); } case TypeAffinity.Blob: { value = GetBytes(); PreventNativeAccess(); return (persisted = true); } case TypeAffinity.Null: { value = DBNull.Value; PreventNativeAccess(); return (persisted = true); } default: { return false; } } } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndexConstraintOp Enumeration /// <summary> /// These are the allowed values for the operators that are part of a /// constraint term in the WHERE clause of a query that uses a virtual /// table. /// </summary> public enum SQLiteIndexConstraintOp : byte { /// <summary> /// This value represents the equality operator. /// </summary> EqualTo = 2, /// <summary> /// This value represents the greater than operator. /// </summary> GreaterThan = 4, /// <summary> /// This value represents the less than or equal to operator. /// </summary> LessThanOrEqualTo = 8, /// <summary> /// This value represents the less than operator. /// </summary> LessThan = 16, /// <summary> /// This value represents the greater than or equal to operator. /// </summary> GreaterThanOrEqualTo = 32, /// <summary> /// This value represents the MATCH operator. /// </summary> Match = 64 } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndexConstraint Helper Class /// <summary> /// This class represents the native sqlite3_index_constraint structure /// from the SQLite core library. /// </summary> public sealed class SQLiteIndexConstraint { #region Internal Constructors /// <summary> /// Constructs an instance of this class using the specified native /// sqlite3_index_constraint structure. /// </summary> /// <param name="constraint"> /// The native sqlite3_index_constraint structure to use. /// </param> internal SQLiteIndexConstraint( UnsafeNativeMethods.sqlite3_index_constraint constraint ) : this(constraint.iColumn, constraint.op, constraint.usable, constraint.iTermOffset) { // do nothing. } #endregion ////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified field /// values. /// </summary> /// <param name="iColumn"> /// Column on left-hand side of constraint. /// </param> /// <param name="op"> /// Constraint operator (<see cref="SQLiteIndexConstraintOp" />). /// </param> /// <param name="usable"> /// True if this constraint is usable. /// </param> /// <param name="iTermOffset"> /// Used internally - <see cref="ISQLiteManagedModule.BestIndex" /> /// should ignore. /// </param> private SQLiteIndexConstraint( int iColumn, SQLiteIndexConstraintOp op, byte usable, int iTermOffset ) { this.iColumn = iColumn; this.op = op; this.usable = usable; this.iTermOffset = iTermOffset; } #endregion ////////////////////////////////////////////////////////////////////// #region Public Fields /// <summary> /// Column on left-hand side of constraint. /// </summary> public int iColumn; ////////////////////////////////////////////////////////////////////// /// <summary> /// Constraint operator (<see cref="SQLiteIndexConstraintOp" />). /// </summary> public SQLiteIndexConstraintOp op; ////////////////////////////////////////////////////////////////////// /// <summary> /// True if this constraint is usable. /// </summary> public byte usable; ////////////////////////////////////////////////////////////////////// /// <summary> /// Used internally - <see cref="ISQLiteManagedModule.BestIndex" /> /// should ignore. /// </summary> public int iTermOffset; #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndexOrderBy Helper Class /// <summary> /// This class represents the native sqlite3_index_orderby structure from /// the SQLite core library. /// </summary> public sealed class SQLiteIndexOrderBy { #region Internal Constructors /// <summary> /// Constructs an instance of this class using the specified native /// sqlite3_index_orderby structure. /// </summary> /// <param name="orderBy"> /// The native sqlite3_index_orderby structure to use. /// </param> internal SQLiteIndexOrderBy( UnsafeNativeMethods.sqlite3_index_orderby orderBy ) : this(orderBy.iColumn, orderBy.desc) { // do nothing. } #endregion ////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified field /// values. /// </summary> /// <param name="iColumn"> /// Column number. /// </param> /// <param name="desc"> /// True for DESC. False for ASC. /// </param> private SQLiteIndexOrderBy( int iColumn, byte desc ) { this.iColumn = iColumn; this.desc = desc; } #endregion ////////////////////////////////////////////////////////////////////// #region Public Fields /// <summary> /// Column number. /// </summary> public int iColumn; ////////////////////////////////////////////////////////////////////// /// <summary> /// True for DESC. False for ASC. /// </summary> public byte desc; #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndexConstraintUsage Helper Class /// <summary> /// This class represents the native sqlite3_index_constraint_usage /// structure from the SQLite core library. /// </summary> public sealed class SQLiteIndexConstraintUsage { #region Internal Constructors /// <summary> /// Constructs an instance of this class using the specified native /// sqlite3_index_constraint_usage structure. /// </summary> /// <param name="constraintUsage"> /// The native sqlite3_index_constraint_usage structure to use. /// </param> internal SQLiteIndexConstraintUsage( UnsafeNativeMethods.sqlite3_index_constraint_usage constraintUsage ) : this(constraintUsage.argvIndex, constraintUsage.omit) { // do nothing. } #endregion ////////////////////////////////////////////////////////////////////// #region Private Constructors /// <summary> /// Constructs an instance of this class using the specified field /// values. /// </summary> /// <param name="argvIndex"> /// If greater than 0, constraint is part of argv to xFilter. /// </param> /// <param name="omit"> /// Do not code a test for this constraint. /// </param> private SQLiteIndexConstraintUsage( int argvIndex, byte omit ) { this.argvIndex = argvIndex; this.omit = omit; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Fields /// <summary> /// If greater than 0, constraint is part of argv to xFilter. /// </summary> public int argvIndex; /////////////////////////////////////////////////////////////////////// /// <summary> /// Do not code a test for this constraint. /// </summary> public byte omit; #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndexInputs Helper Class /// <summary> /// This class represents the various inputs provided by the SQLite core /// library to the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> public sealed class SQLiteIndexInputs { #region Internal Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="nConstraint"> /// The number of <see cref="SQLiteIndexConstraint" /> instances to /// pre-allocate space for. /// </param> /// <param name="nOrderBy"> /// The number of <see cref="SQLiteIndexOrderBy" /> instances to /// pre-allocate space for. /// </param> internal SQLiteIndexInputs(int nConstraint, int nOrderBy) { constraints = new SQLiteIndexConstraint[nConstraint]; orderBys = new SQLiteIndexOrderBy[nOrderBy]; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private SQLiteIndexConstraint[] constraints; /// <summary> /// An array of <see cref="SQLiteIndexConstraint" /> object instances, /// each containing information supplied by the SQLite core library. /// </summary> public SQLiteIndexConstraint[] Constraints { get { return constraints; } } /////////////////////////////////////////////////////////////////////// private SQLiteIndexOrderBy[] orderBys; /// <summary> /// An array of <see cref="SQLiteIndexOrderBy" /> object instances, /// each containing information supplied by the SQLite core library. /// </summary> public SQLiteIndexOrderBy[] OrderBys { get { return orderBys; } } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndexOutputs Helper Class /// <summary> /// This class represents the various outputs provided to the SQLite core /// library by the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> public sealed class SQLiteIndexOutputs { #region Internal Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="nConstraint"> /// The number of <see cref="SQLiteIndexConstraintUsage" /> instances /// to pre-allocate space for. /// </param> internal SQLiteIndexOutputs(int nConstraint) { constraintUsages = new SQLiteIndexConstraintUsage[nConstraint]; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private SQLiteIndexConstraintUsage[] constraintUsages; /// <summary> /// An array of <see cref="SQLiteIndexConstraintUsage" /> object /// instances, each containing information to be supplied to the SQLite /// core library. /// </summary> public SQLiteIndexConstraintUsage[] ConstraintUsages { get { return constraintUsages; } } /////////////////////////////////////////////////////////////////////// private int indexNumber; /// <summary> /// Number used to help identify the selected index. This value will /// later be provided to the <see cref="ISQLiteManagedModule.Filter" /> /// method. /// </summary> public int IndexNumber { get { return indexNumber; } set { indexNumber = value; } } /////////////////////////////////////////////////////////////////////// private string indexString; /// <summary> /// String used to help identify the selected index. This value will /// later be provided to the <see cref="ISQLiteManagedModule.Filter" /> /// method. /// </summary> public string IndexString { get { return indexString; } set { indexString = value; } } /////////////////////////////////////////////////////////////////////// private int needToFreeIndexString; /// <summary> /// Non-zero if the index string must be freed by the SQLite core /// library. /// </summary> public int NeedToFreeIndexString { get { return needToFreeIndexString; } set { needToFreeIndexString = value; } } /////////////////////////////////////////////////////////////////////// private int orderByConsumed; /// <summary> /// True if output is already ordered. /// </summary> public int OrderByConsumed { get { return orderByConsumed; } set { orderByConsumed = value; } } /////////////////////////////////////////////////////////////////////// private double estimatedCost; /// <summary> /// Estimated cost of using this index. /// </summary> public double EstimatedCost { get { return estimatedCost; } set { estimatedCost = value; } } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteIndex Helper Class /// <summary> /// This class represents the various inputs and outputs used with the /// <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> public sealed class SQLiteIndex { #region Internal Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="nConstraint"> /// The number of <see cref="SQLiteIndexConstraint" /> (and /// <see cref="SQLiteIndexConstraintUsage" />) instances to /// pre-allocate space for. /// </param> /// <param name="nOrderBy"> /// The number of <see cref="SQLiteIndexOrderBy" /> instances to /// pre-allocate space for. /// </param> internal SQLiteIndex( int nConstraint, int nOrderBy ) { inputs = new SQLiteIndexInputs(nConstraint, nOrderBy); outputs = new SQLiteIndexOutputs(nConstraint); } #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private SQLiteIndexInputs inputs; /// <summary> /// The <see cref="SQLiteIndexInputs" /> object instance containing /// the inputs to the <see cref="ISQLiteManagedModule.BestIndex" /> /// method. /// </summary> public SQLiteIndexInputs Inputs { get { return inputs; } } /////////////////////////////////////////////////////////////////////// private SQLiteIndexOutputs outputs; /// <summary> /// The <see cref="SQLiteIndexOutputs" /> object instance containing /// the outputs from the <see cref="ISQLiteManagedModule.BestIndex" /> /// method. /// </summary> public SQLiteIndexOutputs Outputs { get { return outputs; } } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteVirtualTable Base Class /// <summary> /// This class represents a managed virtual table implementation. It is /// not sealed and should be used as the base class for any user-defined /// virtual table classes implemented in managed code. /// </summary> public class SQLiteVirtualTable : ISQLiteNativeHandle, IDisposable /* NOT SEALED */ { #region Private Constants /// <summary> /// The index within the array of strings provided to the /// <see cref="ISQLiteManagedModule.Create" /> and /// <see cref="ISQLiteManagedModule.Connect" /> methods containing the /// name of the module implementing this virtual table. /// </summary> private const int ModuleNameIndex = 0; /////////////////////////////////////////////////////////////////////// /// <summary> /// The index within the array of strings provided to the /// <see cref="ISQLiteManagedModule.Create" /> and /// <see cref="ISQLiteManagedModule.Connect" /> methods containing the /// name of the database containing this virtual table. /// </summary> private const int DatabaseNameIndex = 1; /////////////////////////////////////////////////////////////////////// /// <summary> /// The index within the array of strings provided to the /// <see cref="ISQLiteManagedModule.Create" /> and /// <see cref="ISQLiteManagedModule.Connect" /> methods containing the /// name of the virtual table. /// </summary> private const int TableNameIndex = 2; #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="arguments"> /// The original array of strings provided to the /// <see cref="ISQLiteManagedModule.Create" /> and /// <see cref="ISQLiteManagedModule.Connect" /> methods. /// </param> public SQLiteVirtualTable( string[] arguments ) { this.arguments = arguments; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private string[] arguments; /// <summary> /// The original array of strings provided to the /// <see cref="ISQLiteManagedModule.Create" /> and /// <see cref="ISQLiteManagedModule.Connect" /> methods. /// </summary> public virtual string[] Arguments { get { CheckDisposed(); return arguments; } } /////////////////////////////////////////////////////////////////////// /// <summary> /// The name of the module implementing this virtual table. /// </summary> public virtual string ModuleName { get { CheckDisposed(); string[] arguments = Arguments; if ((arguments != null) && (arguments.Length > ModuleNameIndex)) { return arguments[ModuleNameIndex]; } else { return null; } } } /////////////////////////////////////////////////////////////////////// /// <summary> /// The name of the database containing this virtual table. /// </summary> public virtual string DatabaseName { get { CheckDisposed(); string[] arguments = Arguments; if ((arguments != null) && (arguments.Length > DatabaseNameIndex)) { return arguments[DatabaseNameIndex]; } else { return null; } } } /////////////////////////////////////////////////////////////////////// /// <summary> /// The name of the virtual table. /// </summary> public virtual string TableName { get { CheckDisposed(); string[] arguments = Arguments; if ((arguments != null) && (arguments.Length > TableNameIndex)) { return arguments[TableNameIndex]; } else { return null; } } } #endregion /////////////////////////////////////////////////////////////////////// #region Public Methods /// <summary> /// Attempts to record the renaming of the virtual table associated /// with this object instance. /// </summary> /// <param name="name"> /// The new name for the virtual table. /// </param> /// <returns> /// Non-zero upon success. /// </returns> public virtual bool Rename( string name ) { CheckDisposed(); if ((arguments != null) && (arguments.Length > TableNameIndex)) { arguments[TableNameIndex] = name; return true; } return false; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteNativeHandle Members private IntPtr nativeHandle; /// <summary> /// Returns the underlying SQLite native handle associated with this /// object instance. /// </summary> public virtual IntPtr NativeHandle { get { CheckDisposed(); return nativeHandle; } internal set { nativeHandle = value; } } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable Members /// <summary> /// Disposes of this object instance. /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteVirtualTable).Name); } #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="Dispose()" /> method. Zero if this method is being called /// from the finalizer. /// </param> protected virtual void Dispose(bool disposing) { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// disposed = true; } } #endregion /////////////////////////////////////////////////////////////////////// #region Destructor /// <summary> /// Finalizes this object instance. /// </summary> ~SQLiteVirtualTable() { Dispose(false); } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteVirtualTableCursor Base Class /// <summary> /// This class represents a managed virtual table cursor implementation. /// It is not sealed and should be used as the base class for any /// user-defined virtual table cursor classes implemented in managed code. /// </summary> public class SQLiteVirtualTableCursor : ISQLiteNativeHandle, IDisposable /* NOT SEALED */ { #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this object instance. /// </param> public SQLiteVirtualTableCursor( SQLiteVirtualTable table ) { this.table = table; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private SQLiteVirtualTable table; /// <summary> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this object instance. /// </summary> public virtual SQLiteVirtualTable Table { get { CheckDisposed(); return table; } } /////////////////////////////////////////////////////////////////////// private int indexNumber; /// <summary> /// Number used to help identify the selected index. This value will /// be set via the <see cref="Filter" /> method. /// </summary> public virtual int IndexNumber { get { CheckDisposed(); return indexNumber; } } /////////////////////////////////////////////////////////////////////// private string indexString; /// <summary> /// String used to help identify the selected index. This value will /// be set via the <see cref="Filter" /> method. /// </summary> public virtual string IndexString { get { CheckDisposed(); return indexString; } } /////////////////////////////////////////////////////////////////////// private SQLiteValue[] values; /// <summary> /// The values used to filter the rows returned via this cursor object /// instance. This value will be set via the <see cref="Filter" /> /// method. /// </summary> public virtual SQLiteValue[] Values { get { CheckDisposed(); return values; } } #endregion /////////////////////////////////////////////////////////////////////// #region Protected Methods /// <summary> /// Attempts to persist the specified <see cref="SQLiteValue" /> object /// instances in order to make them available after the /// <see cref="ISQLiteManagedModule.Filter" /> method returns. /// </summary> /// <param name="values"> /// The array of <see cref="SQLiteValue" /> object instances to be /// persisted. /// </param> /// <returns> /// The number of <see cref="SQLiteValue" /> object instances that were /// successfully persisted. /// </returns> protected virtual int TryPersistValues( SQLiteValue[] values ) { int result = 0; if (values != null) { foreach (SQLiteValue value in values) { if (value == null) continue; if (value.Persist()) result++; } } return result; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Methods /// <summary> /// This method should normally be used by the /// <see cref="ISQLiteManagedModule.Filter" /> method in order to /// perform filtering of the result rows and/or to record the filtering /// criteria provided by the SQLite core library. /// </summary> /// <param name="indexNumber"> /// Number used to help identify the selected index. /// </param> /// <param name="indexString"> /// String used to help identify the selected index. /// </param> /// <param name="values"> /// The values corresponding to each column in the selected index. /// </param> public virtual void Filter( int indexNumber, string indexString, SQLiteValue[] values ) { CheckDisposed(); if ((values != null) && (TryPersistValues(values) != values.Length)) { throw new SQLiteException( "failed to persist one or more values"); } this.indexNumber = indexNumber; this.indexString = indexString; this.values = values; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteNativeHandle Members private IntPtr nativeHandle; /// <summary> /// Returns the underlying SQLite native handle associated with this /// object instance. /// </summary> public virtual IntPtr NativeHandle { get { CheckDisposed(); return nativeHandle; } internal set { nativeHandle = value; } } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable Members /// <summary> /// Disposes of this object instance. /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteVirtualTableCursor).Name); } #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="Dispose()" /> method. Zero if this method is being called /// from the finalizer. /// </param> protected virtual void Dispose(bool disposing) { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// disposed = true; } } #endregion /////////////////////////////////////////////////////////////////////// #region Destructor /// <summary> /// Finalizes this object instance. /// </summary> ~SQLiteVirtualTableCursor() { Dispose(false); } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region ISQLiteNativeHandle Interface /// <summary> /// This interface represents a native handle provided by the SQLite core /// library. /// </summary> public interface ISQLiteNativeHandle { /// <summary> /// The native handle value. /// </summary> IntPtr NativeHandle { get; } } #endregion /////////////////////////////////////////////////////////////////////////// #region ISQLiteNativeModule Interface /// <summary> /// This interface represents a virtual table implementation written in /// native code. /// </summary> public interface ISQLiteNativeModule { /// <summary> /// <para> /// This method is called to create a new instance of a virtual table /// in response to a CREATE VIRTUAL TABLE statement. The db parameter /// is a pointer to the SQLite database connection that is executing /// the CREATE VIRTUAL TABLE statement. The pAux argument is the copy /// of the client data pointer that was the fourth argument to the /// sqlite3_create_module() or sqlite3_create_module_v2() call that /// registered the virtual table module. The argv parameter is an /// array of argc pointers to null terminated strings. The first /// string, argv[0], is the name of the module being invoked. The /// module name is the name provided as the second argument to /// sqlite3_create_module() and as the argument to the USING clause of /// the CREATE VIRTUAL TABLE statement that is running. The second, /// argv[1], is the name of the database in which the new virtual table /// is being created. The database name is "main" for the primary /// database, or "temp" for TEMP database, or the name given at the /// end of the ATTACH statement for attached databases. The third /// element of the array, argv[2], is the name of the new virtual /// table, as specified following the TABLE keyword in the CREATE /// VIRTUAL TABLE statement. If present, the fourth and subsequent /// strings in the argv[] array report the arguments to the module name /// in the CREATE VIRTUAL TABLE statement. /// </para> /// <para> /// The job of this method is to construct the new virtual table object /// (an sqlite3_vtab object) and return a pointer to it in *ppVTab. /// </para> /// <para> /// As part of the task of creating a new sqlite3_vtab structure, this /// method must invoke sqlite3_declare_vtab() to tell the SQLite core /// about the columns and datatypes in the virtual table. The /// sqlite3_declare_vtab() API has the following prototype: /// </para> /// <para> /// <code> /// int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable) /// </code> /// </para> /// <para> /// The first argument to sqlite3_declare_vtab() must be the same /// database connection pointer as the first parameter to this method. /// The second argument to sqlite3_declare_vtab() must a /// zero-terminated UTF-8 string that contains a well-formed CREATE /// TABLE statement that defines the columns in the virtual table and /// their data types. The name of the table in this CREATE TABLE /// statement is ignored, as are all constraints. Only the column names /// and datatypes matter. The CREATE TABLE statement string need not to /// be held in persistent memory. The string can be deallocated and/or /// reused as soon as the sqlite3_declare_vtab() routine returns. /// </para> /// </summary> /// <param name="pDb"> /// The native database connection handle. /// </param> /// <param name="pAux"> /// The original native pointer value that was provided to the /// sqlite3_create_module(), sqlite3_create_module_v2() or /// sqlite3_create_disposable_module() functions. /// </param> /// <param name="argc"> /// The number of arguments from the CREATE VIRTUAL TABLE statement. /// </param> /// <param name="argv"> /// The array of string arguments from the CREATE VIRTUAL TABLE /// statement. /// </param> /// <param name="pVtab"> /// Upon success, this parameter must be modified to point to the newly /// created native sqlite3_vtab derived structure. /// </param> /// <param name="pError"> /// Upon failure, this parameter must be modified to point to the error /// message, with the underlying memory having been obtained from the /// sqlite3_malloc() function. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xCreate( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// The xConnect method is very similar to xCreate. It has the same /// parameters and constructs a new sqlite3_vtab structure just like /// xCreate. And it must also call sqlite3_declare_vtab() like xCreate. /// </para> /// <para> /// The difference is that xConnect is called to establish a new /// connection to an existing virtual table whereas xCreate is called /// to create a new virtual table from scratch. /// </para> /// <para> /// The xCreate and xConnect methods are only different when the /// virtual table has some kind of backing store that must be /// initialized the first time the virtual table is created. The /// xCreate method creates and initializes the backing store. The /// xConnect method just connects to an existing backing store. /// </para> /// <para> /// As an example, consider a virtual table implementation that /// provides read-only access to existing comma-separated-value (CSV) /// files on disk. There is no backing store that needs to be created /// or initialized for such a virtual table (since the CSV files /// already exist on disk) so the xCreate and xConnect methods will be /// identical for that module. /// </para> /// <para> /// Another example is a virtual table that implements a full-text /// index. The xCreate method must create and initialize data /// structures to hold the dictionary and posting lists for that index. /// The xConnect method, on the other hand, only has to locate and use /// an existing dictionary and posting lists that were created by a /// prior xCreate call. /// </para> /// <para> /// The xConnect method must return SQLITE_OK if it is successful in /// creating the new virtual table, or SQLITE_ERROR if it is not /// successful. If not successful, the sqlite3_vtab structure must not /// be allocated. An error message may optionally be returned in *pzErr /// if unsuccessful. Space to hold the error message string must be /// allocated using an SQLite memory allocation function like /// sqlite3_malloc() or sqlite3_mprintf() as the SQLite core will /// attempt to free the space using sqlite3_free() after the error has /// been reported up to the application. /// </para> /// <para> /// The xConnect method is required for every virtual table /// implementation, though the xCreate and xConnect pointers of the /// sqlite3_module object may point to the same function the virtual /// table does not need to initialize backing store. /// </para> /// </summary> /// <param name="pDb"> /// The native database connection handle. /// </param> /// <param name="pAux"> /// The original native pointer value that was provided to the /// sqlite3_create_module(), sqlite3_create_module_v2() or /// sqlite3_create_disposable_module() functions. /// </param> /// <param name="argc"> /// The number of arguments from the CREATE VIRTUAL TABLE statement. /// </param> /// <param name="argv"> /// The array of string arguments from the CREATE VIRTUAL TABLE /// statement. /// </param> /// <param name="pVtab"> /// Upon success, this parameter must be modified to point to the newly /// created native sqlite3_vtab derived structure. /// </param> /// <param name="pError"> /// Upon failure, this parameter must be modified to point to the error /// message, with the underlying memory having been obtained from the /// sqlite3_malloc() function. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xConnect( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// SQLite uses the xBestIndex method of a virtual table module to /// determine the best way to access the virtual table. The xBestIndex /// method has a prototype like this: /// </para> /// <code> /// int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); /// </code> /// <para> /// The SQLite core communicates with the xBestIndex method by filling /// in certain fields of the sqlite3_index_info structure and passing a /// pointer to that structure into xBestIndex as the second parameter. /// The xBestIndex method fills out other fields of this structure /// which forms the reply. The sqlite3_index_info structure looks like /// this: /// </para> /// <code> /// struct sqlite3_index_info { /// /* Inputs */ /// const int nConstraint; /* Number of entries in aConstraint */ /// const struct sqlite3_index_constraint { /// int iColumn; /* Column on left-hand side of /// * constraint */ /// unsigned char op; /* Constraint operator */ /// unsigned char usable; /* True if this constraint is usable */ /// int iTermOffset; /* Used internally - xBestIndex should /// * ignore */ /// } *const aConstraint; /* Table of WHERE clause constraints */ /// const int nOrderBy; /* Number of terms in the ORDER BY /// * clause */ /// const struct sqlite3_index_orderby { /// int iColumn; /* Column number */ /// unsigned char desc; /* True for DESC. False for ASC. */ /// } *const aOrderBy; /* The ORDER BY clause */ /// /* Outputs */ /// struct sqlite3_index_constraint_usage { /// int argvIndex; /* if greater than zero, constraint is /// * part of argv to xFilter */ /// unsigned char omit; /* Do not code a test for this /// * constraint */ /// } *const aConstraintUsage; /// int idxNum; /* Number used to identify the index */ /// char *idxStr; /* String, possibly obtained from /// * sqlite3_malloc() */ /// int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if /// * true */ /// int orderByConsumed; /* True if output is already ordered */ /// double estimatedCost; /* Estimated cost of using this index */ /// }; /// </code> /// <para> /// In addition, there are some defined constants: /// </para> /// <code> /// #define SQLITE_INDEX_CONSTRAINT_EQ 2 /// #define SQLITE_INDEX_CONSTRAINT_GT 4 /// #define SQLITE_INDEX_CONSTRAINT_LE 8 /// #define SQLITE_INDEX_CONSTRAINT_LT 16 /// #define SQLITE_INDEX_CONSTRAINT_GE 32 /// #define SQLITE_INDEX_CONSTRAINT_MATCH 64 /// </code> /// <para> /// The SQLite core calls the xBestIndex method when it is compiling a /// query that involves a virtual table. In other words, SQLite calls /// this method when it is running sqlite3_prepare() or the equivalent. /// By calling this method, the SQLite core is saying to the virtual /// table that it needs to access some subset of the rows in the /// virtual table and it wants to know the most efficient way to do /// that access. The xBestIndex method replies with information that /// the SQLite core can then use to conduct an efficient search of the /// virtual table. /// </para> /// <para> /// While compiling a single SQL query, the SQLite core might call /// xBestIndex multiple times with different settings in /// sqlite3_index_info. The SQLite core will then select the /// combination that appears to give the best performance. /// </para> /// <para> /// Before calling this method, the SQLite core initializes an instance /// of the sqlite3_index_info structure with information about the /// query that it is currently trying to process. This information /// derives mainly from the WHERE clause and ORDER BY or GROUP BY /// clauses of the query, but also from any ON or USING clauses if the /// query is a join. The information that the SQLite core provides to /// the xBestIndex method is held in the part of the structure that is /// marked as "Inputs". The "Outputs" section is initialized to zero. /// </para> /// <para> /// The information in the sqlite3_index_info structure is ephemeral /// and may be overwritten or deallocated as soon as the xBestIndex /// method returns. If the xBestIndex method needs to remember any part /// of the sqlite3_index_info structure, it should make a copy. Care /// must be take to store the copy in a place where it will be /// deallocated, such as in the idxStr field with needToFreeIdxStr set /// to 1. /// </para> /// <para> /// Note that xBestIndex will always be called before xFilter, since /// the idxNum and idxStr outputs from xBestIndex are required inputs /// to xFilter. However, there is no guarantee that xFilter will be /// called following a successful xBestIndex. /// </para> /// <para> /// The xBestIndex method is required for every virtual table /// implementation. /// </para> /// <para> /// 2.3.1 Inputs /// </para> /// <para> /// The main thing that the SQLite core is trying to communicate to the /// virtual table is the constraints that are available to limit the /// number of rows that need to be searched. The aConstraint[] array /// contains one entry for each constraint. There will be exactly /// nConstraint entries in that array. /// </para> /// <para> /// Each constraint will correspond to a term in the WHERE clause or in /// a USING or ON clause that is of the form /// </para> /// <code> /// column OP EXPR /// </code> /// <para> /// Where "column" is a column in the virtual table, OP is an operator /// like "=" or "<", and EXPR is an arbitrary expression. So, for /// example, if the WHERE clause contained a term like this: /// </para> /// <code> /// a = 5 /// </code> /// <para> /// Then one of the constraints would be on the "a" column with /// operator "=" and an expression of "5". Constraints need not have a /// literal representation of the WHERE clause. The query optimizer /// might make transformations to the WHERE clause in order to extract /// as many constraints as it can. So, for example, if the WHERE clause /// contained something like this: /// </para> /// <code> /// x BETWEEN 10 AND 100 AND 999>y /// </code> /// <para> /// The query optimizer might translate this into three separate /// constraints: /// </para> /// <code> /// x >= 10 /// x <= 100 /// y < 999 /// </code> /// <para> /// For each constraint, the aConstraint[].iColumn field indicates /// which column appears on the left-hand side of the constraint. The /// first column of the virtual table is column 0. The rowid of the /// virtual table is column -1. The aConstraint[].op field indicates /// which operator is used. The SQLITE_INDEX_CONSTRAINT_* constants map /// integer constants into operator values. Columns occur in the order /// they were defined by the call to sqlite3_declare_vtab() in the /// xCreate or xConnect method. Hidden columns are counted when /// determining the column index. /// </para> /// <para> /// The aConstraint[] array contains information about all constraints /// that apply to the virtual table. But some of the constraints might /// not be usable because of the way tables are ordered in a join. The /// xBestIndex method must therefore only consider constraints that /// have an aConstraint[].usable flag which is true. /// </para> /// <para> /// In addition to WHERE clause constraints, the SQLite core also tells /// the xBestIndex method about the ORDER BY clause. (In an aggregate /// query, the SQLite core might put in GROUP BY clause information in /// place of the ORDER BY clause information, but this fact should not /// make any difference to the xBestIndex method.) If all terms of the /// ORDER BY clause are columns in the virtual table, then nOrderBy /// will be the number of terms in the ORDER BY clause and the /// aOrderBy[] array will identify the column for each term in the /// order by clause and whether or not that column is ASC or DESC. /// </para> /// <para> /// 2.3.2 Outputs /// </para> /// <para> /// Given all of the information above, the job of the xBestIndex /// method it to figure out the best way to search the virtual table. /// </para> /// <para> /// The xBestIndex method fills the idxNum and idxStr fields with /// information that communicates an indexing strategy to the xFilter /// method. The information in idxNum and idxStr is arbitrary as far as /// the SQLite core is concerned. The SQLite core just copies the /// information through to the xFilter method. Any desired meaning can /// be assigned to idxNum and idxStr as long as xBestIndex and xFilter /// agree on what that meaning is. /// </para> /// <para> /// The idxStr value may be a string obtained from an SQLite memory /// allocation function such as sqlite3_mprintf(). If this is the case, /// then the needToFreeIdxStr flag must be set to true so that the /// SQLite core will know to call sqlite3_free() on that string when it /// has finished with it, and thus avoid a memory leak. /// </para> /// <para> /// If the virtual table will output rows in the order specified by the /// ORDER BY clause, then the orderByConsumed flag may be set to true. /// If the output is not automatically in the correct order then /// orderByConsumed must be left in its default false setting. This /// will indicate to the SQLite core that it will need to do a separate /// sorting pass over the data after it comes out of the virtual table. /// </para> /// <para> /// The estimatedCost field should be set to the estimated number of /// disk access operations required to execute this query against the /// virtual table. The SQLite core will often call xBestIndex multiple /// times with different constraints, obtain multiple cost estimates, /// then choose the query plan that gives the lowest estimate. /// </para> /// <para> /// The aConstraintUsage[] array contains one element for each of the /// nConstraint constraints in the inputs section of the /// sqlite3_index_info structure. The aConstraintUsage[] array is used /// by xBestIndex to tell the core how it is using the constraints. /// </para> /// <para> /// The xBestIndex method may set aConstraintUsage[].argvIndex entries /// to values greater than one. Exactly one entry should be set to 1, /// another to 2, another to 3, and so forth up to as many or as few as /// the xBestIndex method wants. The EXPR of the corresponding /// constraints will then be passed in as the argv[] parameters to /// xFilter. /// </para> /// <para> /// For example, if the aConstraint[3].argvIndex is set to 1, then when /// xFilter is called, the argv[0] passed to xFilter will have the EXPR /// value of the aConstraint[3] constraint. /// </para> /// <para> /// By default, the SQLite core double checks all constraints on each /// row of the virtual table that it receives. If such a check is /// redundant, the xBestFilter method can suppress that double-check by /// setting aConstraintUsage[].omit. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="pIndex"> /// The native pointer to the sqlite3_index_info structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xBestIndex( IntPtr pVtab, IntPtr pIndex ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method releases a connection to a virtual table. Only the /// sqlite3_vtab object is destroyed. The virtual table is not /// destroyed and any backing store associated with the virtual table /// persists. This method undoes the work of xConnect. /// </para> /// <para> /// This method is a destructor for a connection to the virtual table. /// Contrast this method with xDestroy. The xDestroy is a destructor /// for the entire virtual table. /// </para> /// <para> /// The xDisconnect method is required for every virtual table /// implementation, though it is acceptable for the xDisconnect and /// xDestroy methods to be the same function if that makes sense for /// the particular virtual table. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xDisconnect( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method releases a connection to a virtual table, just like the /// xDisconnect method, and it also destroys the underlying table /// implementation. This method undoes the work of xCreate. /// </para> /// <para> /// The xDisconnect method is called whenever a database connection /// that uses a virtual table is closed. The xDestroy method is only /// called when a DROP TABLE statement is executed against the virtual /// table. /// </para> /// <para> /// The xDestroy method is required for every virtual table /// implementation, though it is acceptable for the xDisconnect and /// xDestroy methods to be the same function if that makes sense for /// the particular virtual table. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xDestroy( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// The xOpen method creates a new cursor used for accessing (read /// and/or writing) a virtual table. A successful invocation of this /// method will allocate the memory for the sqlite3_vtab_cursor (or a /// subclass), initialize the new object, and make *ppCursor point to /// the new object. The successful call then returns SQLITE_OK. /// </para> /// <para> /// For every successful call to this method, the SQLite core will /// later invoke the xClose method to destroy the allocated cursor. /// </para> /// <para> /// The xOpen method need not initialize the pVtab field of the /// sqlite3_vtab_cursor structure. The SQLite core will take care of /// that chore automatically. /// </para> /// <para> /// A virtual table implementation must be able to support an arbitrary /// number of simultaneously open cursors. /// </para> /// <para> /// When initially opened, the cursor is in an undefined state. The /// SQLite core will invoke the xFilter method on the cursor prior to /// any attempt to position or read from the cursor. /// </para> /// <para> /// The xOpen method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="pCursor"> /// Upon success, this parameter must be modified to point to the newly /// created native sqlite3_vtab_cursor derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xOpen( IntPtr pVtab, ref IntPtr pCursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// The xClose method closes a cursor previously opened by xOpen. The /// SQLite core will always call xClose once for each cursor opened /// using xOpen. /// </para> /// <para> /// This method must release all resources allocated by the /// corresponding xOpen call. The routine will not be called again even /// if it returns an error. The SQLite core will not use the /// sqlite3_vtab_cursor again after it has been closed. /// </para> /// <para> /// The xClose method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xClose( IntPtr pCursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method begins a search of a virtual table. The first argument /// is a cursor opened by xOpen. The next two argument define a /// particular search index previously chosen by xBestIndex. The /// specific meanings of idxNum and idxStr are unimportant as long as /// xFilter and xBestIndex agree on what that meaning is. /// </para> /// <para> /// The xBestIndex function may have requested the values of certain /// expressions using the aConstraintUsage[].argvIndex values of the /// sqlite3_index_info structure. Those values are passed to xFilter /// using the argc and argv parameters. /// </para> /// <para> /// If the virtual table contains one or more rows that match the /// search criteria, then the cursor must be left point at the first /// row. Subsequent calls to xEof must return false (zero). If there /// are no rows match, then the cursor must be left in a state that /// will cause the xEof to return true (non-zero). The SQLite engine /// will use the xColumn and xRowid methods to access that row content. /// The xNext method will be used to advance to the next row. /// </para> /// <para> /// This method must return SQLITE_OK if successful, or an sqlite error /// code if an error occurs. /// </para> /// <para> /// The xFilter method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <param name="idxNum"> /// Number used to help identify the selected index. /// </param> /// <param name="idxStr"> /// The native pointer to the UTF-8 encoded string containing the /// string used to help identify the selected index. /// </param> /// <param name="argc"> /// The number of native pointers to sqlite3_value structures specified /// in <paramref name="argv" />. /// </param> /// <param name="argv"> /// An array of native pointers to sqlite3_value structures containing /// filtering criteria for the selected index. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xFilter( IntPtr pCursor, int idxNum, IntPtr idxStr, int argc, IntPtr argv ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// The xNext method advances a virtual table cursor to the next row of /// a result set initiated by xFilter. If the cursor is already /// pointing at the last row when this routine is called, then the /// cursor no longer points to valid data and a subsequent call to the /// xEof method must return true (non-zero). If the cursor is /// successfully advanced to another row of content, then subsequent /// calls to xEof must return false (zero). /// </para> /// <para> /// This method must return SQLITE_OK if successful, or an sqlite error /// code if an error occurs. /// </para> /// <para> /// The xNext method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xNext( IntPtr pCursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// The xEof method must return false (zero) if the specified cursor /// currently points to a valid row of data, or true (non-zero) /// otherwise. This method is called by the SQL engine immediately /// after each xFilter and xNext invocation. /// </para> /// <para> /// The xEof method is required for every virtual table implementation. /// </para> /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <returns> /// Non-zero if no more rows are available; zero otherwise. /// </returns> int xEof( IntPtr pCursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// The SQLite core invokes this method in order to find the value for /// the N-th column of the current row. N is zero-based so the first /// column is numbered 0. The xColumn method may return its result back /// to SQLite using one of the following interface: /// </para> /// <code> /// sqlite3_result_blob() /// sqlite3_result_double() /// sqlite3_result_int() /// sqlite3_result_int64() /// sqlite3_result_null() /// sqlite3_result_text() /// sqlite3_result_text16() /// sqlite3_result_text16le() /// sqlite3_result_text16be() /// sqlite3_result_zeroblob() /// </code> /// <para> /// If the xColumn method implementation calls none of the functions /// above, then the value of the column defaults to an SQL NULL. /// </para> /// <para> /// To raise an error, the xColumn method should use one of the /// result_text() methods to set the error message text, then return an /// appropriate error code. The xColumn method must return SQLITE_OK on /// success. /// </para> /// <para> /// The xColumn method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <param name="pContext"> /// The native pointer to the sqlite3_context structure to be used /// for returning the specified column value to the SQLite core /// library. /// </param> /// <param name="index"> /// The zero-based index corresponding to the column containing the /// value to be returned. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xColumn( IntPtr pCursor, IntPtr pContext, int index ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// A successful invocation of this method will cause *pRowid to be /// filled with the rowid of row that the virtual table cursor pCur is /// currently pointing at. This method returns SQLITE_OK on success. It /// returns an appropriate error code on failure. /// </para> /// <para> /// The xRowid method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <param name="rowId"> /// Upon success, this parameter must be modified to contain the unique /// integer row identifier for the current row for the specified cursor. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xRowId( IntPtr pCursor, ref long rowId ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// All changes to a virtual table are made using the xUpdate method. /// This one method can be used to insert, delete, or update. /// </para> /// <para> /// The argc parameter specifies the number of entries in the argv /// array. The value of argc will be 1 for a pure delete operation or /// N+2 for an insert or replace or update where N is the number of /// columns in the table. In the previous sentence, N includes any /// hidden columns. /// </para> /// <para> /// Every argv entry will have a non-NULL value in C but may contain /// the SQL value NULL. In other words, it is always true that /// argv[i]!=0 for i between 0 and argc-1. However, it might be the /// case that sqlite3_value_type(argv[i])==SQLITE_NULL. /// </para> /// <para> /// The argv[0] parameter is the rowid of a row in the virtual table /// to be deleted. If argv[0] is an SQL NULL, then no deletion occurs. /// </para> /// <para> /// The argv[1] parameter is the rowid of a new row to be inserted into /// the virtual table. If argv[1] is an SQL NULL, then the /// implementation must choose a rowid for the newly inserted row. /// Subsequent argv[] entries contain values of the columns of the /// virtual table, in the order that the columns were declared. The /// number of columns will match the table declaration that the /// xConnect or xCreate method made using the sqlite3_declare_vtab() /// call. All hidden columns are included. /// </para> /// <para> /// When doing an insert without a rowid (argc>1, argv[1] is an SQL /// NULL), the implementation must set *pRowid to the rowid of the /// newly inserted row; this will become the value returned by the /// sqlite3_last_insert_rowid() function. Setting this value in all the /// other cases is a harmless no-op; the SQLite engine ignores the /// *pRowid return value if argc==1 or argv[1] is not an SQL NULL. /// </para> /// <para> /// Each call to xUpdate will fall into one of cases shown below. Note /// that references to argv[i] mean the SQL value held within the /// argv[i] object, not the argv[i] object itself. /// </para> /// <code> /// argc = 1 /// </code> /// <para> /// The single row with rowid equal to argv[0] is deleted. No /// insert occurs. /// </para> /// <code> /// argc > 1 /// argv[0] = NULL /// </code> /// <para> /// A new row is inserted with a rowid argv[1] and column /// values in argv[2] and following. If argv[1] is an SQL NULL, /// the a new unique rowid is generated automatically. /// </para> /// <code> /// argc > 1 /// argv[0] ? NULL /// argv[0] = argv[1] /// </code> /// <para> /// The row with rowid argv[0] is updated with new values in /// argv[2] and following parameters. /// </para> /// <code> /// argc > 1 /// argv[0] ? NULL /// argv[0] ? argv[1] /// </code> /// <para> /// The row with rowid argv[0] is updated with rowid argv[1] /// and new values in argv[2] and following parameters. This /// will occur when an SQL statement updates a rowid, as in /// the statement: /// </para> /// <code> /// UPDATE table SET rowid=rowid+1 WHERE ...; /// </code> /// <para> /// The xUpdate method must return SQLITE_OK if and only if it is /// successful. If a failure occurs, the xUpdate must return an /// appropriate error code. On a failure, the pVTab->zErrMsg element /// may optionally be replaced with error message text stored in memory /// allocated from SQLite using functions such as sqlite3_mprintf() or /// sqlite3_malloc(). /// </para> /// <para> /// If the xUpdate method violates some constraint of the virtual table /// (including, but not limited to, attempting to store a value of the /// wrong datatype, attempting to store a value that is too large or /// too small, or attempting to change a read-only value) then the /// xUpdate must fail with an appropriate error code. /// </para> /// <para> /// There might be one or more sqlite3_vtab_cursor objects open and in /// use on the virtual table instance and perhaps even on the row of /// the virtual table when the xUpdate method is invoked. The /// implementation of xUpdate must be prepared for attempts to delete /// or modify rows of the table out from other existing cursors. If the /// virtual table cannot accommodate such changes, the xUpdate method /// must return an error code. /// </para> /// <para> /// The xUpdate method is optional. If the xUpdate pointer in the /// sqlite3_module for a virtual table is a NULL pointer, then the /// virtual table is read-only. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="argc"> /// The number of new or modified column values contained in /// <paramref name="argv" />. /// </param> /// <param name="argv"> /// The array of native pointers to sqlite3_value structures containing /// the new or modified column values, if any. /// </param> /// <param name="rowId"> /// Upon success, this parameter must be modified to contain the unique /// integer row identifier for the row that was inserted, if any. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xUpdate( IntPtr pVtab, int argc, IntPtr argv, ref long rowId ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method begins a transaction on a virtual table. This is method /// is optional. The xBegin pointer of sqlite3_module may be NULL. /// </para> /// <para> /// This method is always followed by one call to either the xCommit or /// xRollback method. Virtual table transactions do not nest, so the /// xBegin method will not be invoked more than once on a single /// virtual table without an intervening call to either xCommit or /// xRollback. Multiple calls to other methods can and likely will /// occur in between the xBegin and the corresponding xCommit or /// xRollback. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xBegin( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method signals the start of a two-phase commit on a virtual /// table. This is method is optional. The xSync pointer of /// sqlite3_module may be NULL. /// </para> /// <para> /// This method is only invoked after call to the xBegin method and /// prior to an xCommit or xRollback. In order to implement two-phase /// commit, the xSync method on all virtual tables is invoked prior to /// invoking the xCommit method on any virtual table. If any of the /// xSync methods fail, the entire transaction is rolled back. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xSync( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method causes a virtual table transaction to commit. This is /// method is optional. The xCommit pointer of sqlite3_module may be /// NULL. /// </para> /// <para> /// A call to this method always follows a prior call to xBegin and /// xSync. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xCommit( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method causes a virtual table transaction to rollback. This is /// method is optional. The xRollback pointer of sqlite3_module may be /// NULL. /// </para> /// <para> /// A call to this method always follows a prior call to xBegin. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xRollback( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method provides notification that the virtual table /// implementation that the virtual table will be given a new name. If /// this method returns SQLITE_OK then SQLite renames the table. If /// this method returns an error code then the renaming is prevented. /// </para> /// <para> /// The xRename method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="nArg"> /// The number of arguments to the function being sought. /// </param> /// <param name="zName"> /// The name of the function being sought. /// </param> /// <param name="callback"> /// Upon success, this parameter must be modified to contain the /// delegate responsible for implementing the specified function. /// </param> /// <param name="pClientData"> /// Upon success, this parameter must be modified to contain the /// native user-data pointer associated with /// <paramref name="callback" />. /// </param> /// <returns> /// Non-zero if the specified function was found; zero otherwise. /// </returns> int xFindFunction( IntPtr pVtab, int nArg, IntPtr zName, ref SQLiteCallback callback, ref IntPtr pClientData ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// This method provides notification that the virtual table /// implementation that the virtual table will be given a new name. If /// this method returns SQLITE_OK then SQLite renames the table. If /// this method returns an error code then the renaming is prevented. /// </para> /// <para> /// The xRename method is required for every virtual table /// implementation. /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="zNew"> /// The native pointer to the UTF-8 encoded string containing the new /// name for the virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xRename( IntPtr pVtab, IntPtr zNew ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// These methods provide the virtual table implementation an /// opportunity to implement nested transactions. They are always /// optional and will only be called in SQLite version 3.7.7 and later. /// </para> /// <para> /// When xSavepoint(X,N) is invoked, that is a signal to the virtual /// table X that it should save its current state as savepoint N. A /// subsequent call to xRollbackTo(X,R) means that the state of the /// virtual table should return to what it was when xSavepoint(X,R) was /// last called. The call to xRollbackTo(X,R) will invalidate all /// savepoints with N>R; none of the invalided savepoints will be /// rolled back or released without first being reinitialized by a call /// to xSavepoint(). A call to xRelease(X,M) invalidates all savepoints /// where N>=M. /// </para> /// <para> /// None of the xSavepoint(), xRelease(), or xRollbackTo() methods will /// ever be called except in between calls to xBegin() and either /// xCommit() or xRollback(). /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="iSavepoint"> /// This is an integer identifier under which the the current state of /// the virtual table should be saved. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xSavepoint( IntPtr pVtab, int iSavepoint ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// These methods provide the virtual table implementation an /// opportunity to implement nested transactions. They are always /// optional and will only be called in SQLite version 3.7.7 and later. /// </para> /// <para> /// When xSavepoint(X,N) is invoked, that is a signal to the virtual /// table X that it should save its current state as savepoint N. A /// subsequent call to xRollbackTo(X,R) means that the state of the /// virtual table should return to what it was when xSavepoint(X,R) was /// last called. The call to xRollbackTo(X,R) will invalidate all /// savepoints with N>R; none of the invalided savepoints will be /// rolled back or released without first being reinitialized by a call /// to xSavepoint(). A call to xRelease(X,M) invalidates all savepoints /// where N>=M. /// </para> /// <para> /// None of the xSavepoint(), xRelease(), or xRollbackTo() methods will /// ever be called except in between calls to xBegin() and either /// xCommit() or xRollback(). /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="iSavepoint"> /// This is an integer used to indicate that any saved states with an /// identifier greater than or equal to this should be deleted by the /// virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xRelease( IntPtr pVtab, int iSavepoint ); /////////////////////////////////////////////////////////////////////// /// <summary> /// <para> /// These methods provide the virtual table implementation an /// opportunity to implement nested transactions. They are always /// optional and will only be called in SQLite version 3.7.7 and later. /// </para> /// <para> /// When xSavepoint(X,N) is invoked, that is a signal to the virtual /// table X that it should save its current state as savepoint N. A /// subsequent call to xRollbackTo(X,R) means that the state of the /// virtual table should return to what it was when xSavepoint(X,R) was /// last called. The call to xRollbackTo(X,R) will invalidate all /// savepoints with N>R; none of the invalided savepoints will be /// rolled back or released without first being reinitialized by a call /// to xSavepoint(). A call to xRelease(X,M) invalidates all savepoints /// where N>=M. /// </para> /// <para> /// None of the xSavepoint(), xRelease(), or xRollbackTo() methods will /// ever be called except in between calls to xBegin() and either /// xCommit() or xRollback(). /// </para> /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="iSavepoint"> /// This is an integer identifier used to specify a specific saved /// state for the virtual table for it to restore itself back to, which /// should also have the effect of deleting all saved states with an /// integer identifier greater than this one. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode xRollbackTo( IntPtr pVtab, int iSavepoint ); } #endregion /////////////////////////////////////////////////////////////////////////// #region ISQLiteManagedModule Interface /// <summary> /// This interface represents a virtual table implementation written in /// managed code. /// </summary> public interface ISQLiteManagedModule { /// <summary> /// Returns non-zero if the schema for the virtual table has been /// declared. /// </summary> bool Declared { get; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Returns the name of the module as it was registered with the SQLite /// core library. /// </summary> string Name { get; } /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xCreate" /> method. /// </summary> /// <param name="connection"> /// The <see cref="SQLiteConnection" /> object instance associated with /// the virtual table. /// </param> /// <param name="pClientData"> /// The native user-data pointer associated with this module, as it was /// provided to the SQLite core library when the native module instance /// was created. /// </param> /// <param name="arguments"> /// The module name, database name, virtual table name, and all other /// arguments passed to the CREATE VIRTUAL TABLE statement. /// </param> /// <param name="table"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteVirtualTable" /> object instance associated with /// the virtual table. /// </param> /// <param name="error"> /// Upon failure, this parameter must be modified to contain an error /// message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Create( SQLiteConnection connection, /* in */ IntPtr pClientData, /* in */ string[] arguments, /* in */ ref SQLiteVirtualTable table, /* out */ ref string error /* out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xConnect" /> method. /// </summary> /// <param name="connection"> /// The <see cref="SQLiteConnection" /> object instance associated with /// the virtual table. /// </param> /// <param name="pClientData"> /// The native user-data pointer associated with this module, as it was /// provided to the SQLite core library when the native module instance /// was created. /// </param> /// <param name="arguments"> /// The module name, database name, virtual table name, and all other /// arguments passed to the CREATE VIRTUAL TABLE statement. /// </param> /// <param name="table"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteVirtualTable" /> object instance associated with /// the virtual table. /// </param> /// <param name="error"> /// Upon failure, this parameter must be modified to contain an error /// message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Connect( SQLiteConnection connection, /* in */ IntPtr pClientData, /* in */ string[] arguments, /* in */ ref SQLiteVirtualTable table, /* out */ ref string error /* out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="index"> /// The <see cref="SQLiteIndex" /> object instance containing all the /// data for the inputs and outputs relating to index selection. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode BestIndex( SQLiteVirtualTable table, /* in */ SQLiteIndex index /* in, out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Disconnect( SQLiteVirtualTable table /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Destroy( SQLiteVirtualTable table /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xOpen" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="cursor"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteVirtualTableCursor" /> object instance associated /// with the newly opened virtual table cursor. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Open( SQLiteVirtualTable table, /* in */ ref SQLiteVirtualTableCursor cursor /* out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xClose" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Close( SQLiteVirtualTableCursor cursor /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xFilter" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <param name="indexNumber"> /// Number used to help identify the selected index. /// </param> /// <param name="indexString"> /// String used to help identify the selected index. /// </param> /// <param name="values"> /// The values corresponding to each column in the selected index. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Filter( SQLiteVirtualTableCursor cursor, /* in */ int indexNumber, /* in */ string indexString, /* in */ SQLiteValue[] values /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xNext" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Next( SQLiteVirtualTableCursor cursor /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xEof" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <returns> /// Non-zero if no more rows are available; zero otherwise. /// </returns> bool Eof( SQLiteVirtualTableCursor cursor /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xColumn" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <param name="context"> /// The <see cref="SQLiteContext" /> object instance to be used for /// returning the specified column value to the SQLite core library. /// </param> /// <param name="index"> /// The zero-based index corresponding to the column containing the /// value to be returned. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Column( SQLiteVirtualTableCursor cursor, /* in */ SQLiteContext context, /* in */ int index /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRowId" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <param name="rowId"> /// Upon success, this parameter must be modified to contain the unique /// integer row identifier for the current row for the specified cursor. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode RowId( SQLiteVirtualTableCursor cursor, /* in */ ref long rowId /* out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="values"> /// The array of <see cref="SQLiteValue" /> object instances containing /// the new or modified column values, if any. /// </param> /// <param name="rowId"> /// Upon success, this parameter must be modified to contain the unique /// integer row identifier for the row that was inserted, if any. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Update( SQLiteVirtualTable table, /* in */ SQLiteValue[] values, /* in */ ref long rowId /* out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xBegin" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Begin( SQLiteVirtualTable table /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xSync" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Sync( SQLiteVirtualTable table /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xCommit" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Commit( SQLiteVirtualTable table /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRollback" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Rollback( SQLiteVirtualTable table /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="argumentCount"> /// The number of arguments to the function being sought. /// </param> /// <param name="name"> /// The name of the function being sought. /// </param> /// <param name="function"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteFunction" /> object instance responsible for /// implementing the specified function. /// </param> /// <param name="pClientData"> /// Upon success, this parameter must be modified to contain the /// native user-data pointer associated with /// <paramref name="function" />. /// </param> /// <returns> /// Non-zero if the specified function was found; zero otherwise. /// </returns> bool FindFunction( SQLiteVirtualTable table, /* in */ int argumentCount, /* in */ string name, /* in */ ref SQLiteFunction function, /* out */ ref IntPtr pClientData /* out */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRename" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="newName"> /// The new name for the virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Rename( SQLiteVirtualTable table, /* in */ string newName /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="savepoint"> /// This is an integer identifier under which the the current state of /// the virtual table should be saved. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Savepoint( SQLiteVirtualTable table, /* in */ int savepoint /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRelease" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="savepoint"> /// This is an integer used to indicate that any saved states with an /// identifier greater than or equal to this should be deleted by the /// virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode Release( SQLiteVirtualTable table, /* in */ int savepoint /* in */ ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="savepoint"> /// This is an integer identifier used to specify a specific saved /// state for the virtual table for it to restore itself back to, which /// should also have the effect of deleting all saved states with an /// integer identifier greater than this one. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> SQLiteErrorCode RollbackTo( SQLiteVirtualTable table, /* in */ int savepoint /* in */ ); } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteMemory Static Class /// <summary> /// This class contains static methods that are used to allocate, /// manipulate, and free native memory provided by the SQLite core library. /// </summary> internal static class SQLiteMemory { #region Private Data #if TRACK_MEMORY_BYTES /// <summary> /// This object instance is used to synchronize access to the other /// static fields of this class. /// </summary> private static object syncRoot = new object(); /////////////////////////////////////////////////////////////////////// /// <summary> /// The total number of outstanding memory bytes allocated by this /// class using the SQLite core library. /// </summary> private static int bytesAllocated; /////////////////////////////////////////////////////////////////////// /// <summary> /// The maximum number of outstanding memory bytes ever allocated by /// this class using the SQLite core library. /// </summary> private static int maximumBytesAllocated; #endif #endregion /////////////////////////////////////////////////////////////////////// #region Memory Allocation Helper Methods /// <summary> /// Allocates at least the specified number of bytes of native memory /// via the SQLite core library sqlite3_malloc() function and returns /// the resulting native pointer. /// </summary> /// <param name="size"> /// The number of bytes to allocate. /// </param> /// <returns> /// The native pointer that points to a block of memory of at least the /// specified size -OR- <see cref="IntPtr.Zero" /> if the memory could /// not be allocated. /// </returns> public static IntPtr Allocate(int size) { IntPtr pMemory = UnsafeNativeMethods.sqlite3_malloc(size); #if TRACK_MEMORY_BYTES if (pMemory != IntPtr.Zero) { int blockSize = Size(pMemory); if (blockSize > 0) { lock (syncRoot) { bytesAllocated += blockSize; if (bytesAllocated > maximumBytesAllocated) maximumBytesAllocated = bytesAllocated; } } } #endif return pMemory; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Gets and returns the actual size of the specified memory block that /// was previously obtained from the <see cref="Allocate" /> method. /// </summary> /// <param name="pMemory"> /// The native pointer to the memory block previously obtained from the /// <see cref="Allocate" /> method. /// </param> /// <returns> /// The actual size, in bytes, of the memory block specified via the /// native pointer. /// </returns> public static int Size(IntPtr pMemory) { #if !SQLITE_STANDARD return UnsafeNativeMethods.sqlite3_malloc_size_interop(pMemory); #else return 0; #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Frees a memory block previously obtained from the /// <see cref="Allocate" /> method. /// </summary> /// <param name="pMemory"> /// The native pointer to the memory block previously obtained from the /// <see cref="Allocate" /> method. /// </param> public static void Free(IntPtr pMemory) { #if TRACK_MEMORY_BYTES if (pMemory != IntPtr.Zero) { int blockSize = Size(pMemory); if (blockSize > 0) { lock (syncRoot) { bytesAllocated -= blockSize; } } } #endif UnsafeNativeMethods.sqlite3_free(pMemory); } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteString Static Class /// <summary> /// This class contains static methods that are used to deal with native /// UTF-8 string pointers to be used with the SQLite core library. /// </summary> internal static class SQLiteString { #region Private Constants /// <summary> /// This is the maximum possible length for the native UTF-8 encoded /// strings used with the SQLite core library. /// </summary> private static int ThirtyBits = 0x3fffffff; /////////////////////////////////////////////////////////////////////// /// <summary> /// This is the <see cref="Encoding" /> object instance used to handle /// conversions from/to UTF-8. /// </summary> private static readonly Encoding Utf8Encoding = Encoding.UTF8; #endregion /////////////////////////////////////////////////////////////////////// #region UTF-8 Encoding Helper Methods /// <summary> /// Converts the specified managed string into the UTF-8 encoding and /// returns the array of bytes containing its representation in that /// encoding. /// </summary> /// <param name="value"> /// The managed string to convert. /// </param> /// <returns> /// The array of bytes containing the representation of the managed /// string in the UTF-8 encoding or null upon failure. /// </returns> public static byte[] GetUtf8BytesFromString( string value ) { if (value == null) return null; return Utf8Encoding.GetBytes(value); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts the specified array of bytes representing a string in the /// UTF-8 encoding and returns a managed string. /// </summary> /// <param name="bytes"> /// The array of bytes to convert. /// </param> /// <returns> /// The managed string or null upon failure. /// </returns> public static string GetStringFromUtf8Bytes( byte[] bytes ) { if (bytes == null) return null; #if !PLATFORM_COMPACTFRAMEWORK return Utf8Encoding.GetString(bytes); #else return Utf8Encoding.GetString(bytes, 0, bytes.Length); #endif } #endregion /////////////////////////////////////////////////////////////////////// #region UTF-8 String Helper Methods /// <summary> /// Probes a native pointer to a string in the UTF-8 encoding for its /// terminating NUL character, within the specified length limit. /// </summary> /// <param name="pValue"> /// The native NUL-terminated string pointer. /// </param> /// <param name="limit"> /// The maximum length of the native string, in bytes. /// </param> /// <returns> /// The length of the native string, in bytes -OR- zero if the length /// could not be determined. /// </returns> public static int ProbeForUtf8ByteLength( IntPtr pValue, int limit ) { int length = 0; if ((pValue != IntPtr.Zero) && (limit > 0)) { do { if (Marshal.ReadByte(pValue, length) == 0) break; if (length >= limit) break; length++; } while (true); } return length; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts the specified native NUL-terminated UTF-8 string pointer /// into a managed string. /// </summary> /// <param name="pValue"> /// The native NUL-terminated UTF-8 string pointer. /// </param> /// <returns> /// The managed string or null upon failure. /// </returns> public static string StringFromUtf8IntPtr( IntPtr pValue ) { return StringFromUtf8IntPtr(pValue, ProbeForUtf8ByteLength(pValue, ThirtyBits)); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts the specified native UTF-8 string pointer of the specified /// length into a managed string. /// </summary> /// <param name="pValue"> /// The native UTF-8 string pointer. /// </param> /// <param name="length"> /// The length of the native string, in bytes. /// </param> /// <returns> /// The managed string or null upon failure. /// </returns> public static string StringFromUtf8IntPtr( IntPtr pValue, int length ) { if (pValue == IntPtr.Zero) return null; if (length > 0) { byte[] bytes = new byte[length]; Marshal.Copy(pValue, bytes, 0, length); return GetStringFromUtf8Bytes(bytes); } return String.Empty; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts the specified managed string into a native NUL-terminated /// UTF-8 string pointer using memory obtained from the SQLite core /// library. /// </summary> /// <param name="value"> /// The managed string to convert. /// </param> /// <returns> /// The native NUL-terminated UTF-8 string pointer or /// <see cref="IntPtr.Zero" /> upon failure. /// </returns> public static IntPtr Utf8IntPtrFromString( string value ) { if (value == null) return IntPtr.Zero; IntPtr result = IntPtr.Zero; byte[] bytes = GetUtf8BytesFromString(value); if (bytes == null) return IntPtr.Zero; int length = bytes.Length; result = SQLiteMemory.Allocate(length + 1); if (result == IntPtr.Zero) return IntPtr.Zero; Marshal.Copy(bytes, 0, result, length); Marshal.WriteByte(result, length, 0); return result; } #endregion /////////////////////////////////////////////////////////////////////// #region UTF-8 String Array Helper Methods /// <summary> /// Converts a logical array of native NUL-terminated UTF-8 string /// pointers into an array of managed strings. /// </summary> /// <param name="argc"> /// The number of elements in the logical array of native /// NUL-terminated UTF-8 string pointers. /// </param> /// <param name="argv"> /// The native pointer to the logical array of native NUL-terminated /// UTF-8 string pointers to convert. /// </param> /// <returns> /// The array of managed strings or null upon failure. /// </returns> public static string[] StringArrayFromUtf8SizeAndIntPtr( int argc, IntPtr argv ) { if (argc < 0) return null; if (argv == IntPtr.Zero) return null; string[] result = new string[argc]; for (int index = 0, offset = 0; index < result.Length; index++, offset += IntPtr.Size) { IntPtr pArg = SQLiteMarshal.ReadIntPtr(argv, offset); result[index] = (pArg != IntPtr.Zero) ? StringFromUtf8IntPtr(pArg) : null; } return result; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts an array of managed strings into an array of native /// NUL-terminated UTF-8 string pointers. /// </summary> /// <param name="values"> /// The array of managed strings to convert. /// </param> /// <returns> /// The array of native NUL-terminated UTF-8 string pointers or null /// upon failure. /// </returns> public static IntPtr[] Utf8IntPtrArrayFromStringArray( string[] values ) { if (values == null) return null; IntPtr[] result = new IntPtr[values.Length]; for (int index = 0; index < result.Length; index++) result[index] = Utf8IntPtrFromString(values[index]); return result; } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteBytes Static Class /// <summary> /// This class contains static methods that are used to deal with native /// pointers to memory blocks that logically contain arrays of bytes to be /// used with the SQLite core library. /// </summary> internal static class SQLiteBytes { #region Byte Array Helper Methods /// <summary> /// Converts a native pointer to a logical array of bytes of the /// specified length into a managed byte array. /// </summary> /// <param name="pValue"> /// The native pointer to the logical array of bytes to convert. /// </param> /// <param name="length"> /// The length, in bytes, of the logical array of bytes to convert. /// </param> /// <returns> /// The managed byte array or null upon failure. /// </returns> public static byte[] FromIntPtr( IntPtr pValue, int length ) { if (pValue == IntPtr.Zero) return null; if (length == 0) return new byte[0]; byte[] result = new byte[length]; Marshal.Copy(pValue, result, 0, length); return result; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts a managed byte array into a native pointer to a logical /// array of bytes. /// </summary> /// <param name="value"> /// The managed byte array to convert. /// </param> /// <returns> /// The native pointer to a logical byte array or null upon failure. /// </returns> public static IntPtr ToIntPtr( byte[] value ) { if (value == null) return IntPtr.Zero; int length = value.Length; if (length == 0) return IntPtr.Zero; IntPtr result = SQLiteMemory.Allocate(length); if (result == IntPtr.Zero) return IntPtr.Zero; Marshal.Copy(value, 0, result, length); return result; } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteMarshal Static Class internal static class SQLiteMarshal { #region IntPtr Helper Methods /// <summary> /// Returns a new <see cref="IntPtr" /> object instance based on the /// specified <see cref="IntPtr" /> object instance and an integer /// offset. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location that the new /// <see cref="IntPtr" /> object instance should point to. /// </param> /// <returns> /// The new <see cref="IntPtr" /> object instance. /// </returns> public static IntPtr IntPtrForOffset( IntPtr pointer, int offset ) { return new IntPtr(pointer.ToInt64() + offset); } #endregion /////////////////////////////////////////////////////////////////////// #region Marshal Read Helper Methods /// <summary> /// Reads a <see cref="Int32" /> value from the specified memory /// location. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location where the /// <see cref="Int32" /> value to be read is located. /// </param> /// <returns> /// The <see cref="Int32" /> value at the specified memory location. /// </returns> public static int ReadInt32( IntPtr pointer, int offset ) { #if !PLATFORM_COMPACTFRAMEWORK return Marshal.ReadInt32(pointer, offset); #else return Marshal.ReadInt32(IntPtrForOffset(pointer, offset)); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Reads a <see cref="Double" /> value from the specified memory /// location. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location where the /// <see cref="Double" /> to be read is located. /// </param> /// <returns> /// The <see cref="Double" /> value at the specified memory location. /// </returns> public static double ReadDouble( IntPtr pointer, int offset ) { #if !PLATFORM_COMPACTFRAMEWORK return BitConverter.Int64BitsToDouble(Marshal.ReadInt64( pointer, offset)); #else return BitConverter.ToDouble(BitConverter.GetBytes( Marshal.ReadInt64(IntPtrForOffset(pointer, offset))), 0); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Reads an <see cref="IntPtr" /> value from the specified memory /// location. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location where the /// <see cref="IntPtr" /> value to be read is located. /// </param> /// <returns> /// The <see cref="IntPtr" /> value at the specified memory location. /// </returns> public static IntPtr ReadIntPtr( IntPtr pointer, int offset ) { #if !PLATFORM_COMPACTFRAMEWORK return Marshal.ReadIntPtr(pointer, offset); #else return Marshal.ReadIntPtr(IntPtrForOffset(pointer, offset)); #endif } #endregion /////////////////////////////////////////////////////////////////////// #region Marshal Write Helper Methods /// <summary> /// Writes an <see cref="Int32" /> value to the specified memory /// location. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location where the /// <see cref="Int32" /> value to be written is located. /// </param> /// <param name="value"> /// The <see cref="Int32" /> value to write. /// </param> public static void WriteInt32( IntPtr pointer, int offset, int value ) { #if !PLATFORM_COMPACTFRAMEWORK Marshal.WriteInt32(pointer, offset, value); #else Marshal.WriteInt32(IntPtrForOffset(pointer, offset), value); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Writes a <see cref="Double" /> value to the specified memory /// location. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location where the /// <see cref="Double" /> value to be written is located. /// </param> /// <param name="value"> /// The <see cref="Double" /> value to write. /// </param> public static void WriteDouble( IntPtr pointer, int offset, double value ) { #if !PLATFORM_COMPACTFRAMEWORK Marshal.WriteInt64(pointer, offset, BitConverter.DoubleToInt64Bits(value)); #else Marshal.WriteInt64(IntPtrForOffset(pointer, offset), BitConverter.ToInt64(BitConverter.GetBytes(value), 0)); #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Writes a <see cref="IntPtr" /> value to the specified memory /// location. /// </summary> /// <param name="pointer"> /// The <see cref="IntPtr" /> object instance representing the base /// memory location. /// </param> /// <param name="offset"> /// The integer offset from the base memory location where the /// <see cref="IntPtr" /> value to be written is located. /// </param> /// <param name="value"> /// The <see cref="IntPtr" /> value to write. /// </param> public static void WriteIntPtr( IntPtr pointer, int offset, IntPtr value ) { #if !PLATFORM_COMPACTFRAMEWORK Marshal.WriteIntPtr(pointer, offset, value); #else Marshal.WriteIntPtr(IntPtrForOffset(pointer, offset), value); #endif } #endregion /////////////////////////////////////////////////////////////////////// #region SQLiteValue Helper Methods /// <summary> /// Converts a logical array of native pointers to native sqlite3_value /// structures into a managed array of <see cref="SQLiteValue" /> /// object instances. /// </summary> /// <param name="argc"> /// The number of elements in the logical array of native sqlite3_value /// structures. /// </param> /// <param name="argv"> /// The native pointer to the logical array of native sqlite3_value /// structures to convert. /// </param> /// <returns> /// The managed array of <see cref="SQLiteValue" /> object instances or /// null upon failure. /// </returns> public static SQLiteValue[] ValueArrayFromSizeAndIntPtr( int argc, IntPtr argv ) { if (argc < 0) return null; if (argv == IntPtr.Zero) return null; SQLiteValue[] result = new SQLiteValue[argc]; for (int index = 0, offset = 0; index < result.Length; index++, offset += IntPtr.Size) { IntPtr pArg = ReadIntPtr(argv, offset); result[index] = (pArg != IntPtr.Zero) ? new SQLiteValue(pArg) : null; } return result; } #endregion /////////////////////////////////////////////////////////////////////// #region SQLiteIndex Helper Methods /// <summary> /// Converts a native pointer to a native sqlite3_index_info structure /// into a new <see cref="SQLiteIndex" /> object instance. /// </summary> /// <param name="pIndex"> /// The native pointer to the native sqlite3_index_info structure to /// convert. /// </param> /// <param name="index"> /// Upon success, this parameter will be modified to contain the newly /// created <see cref="SQLiteIndex" /> object instance. /// </param> public static void IndexFromIntPtr( IntPtr pIndex, ref SQLiteIndex index ) { if (pIndex == IntPtr.Zero) return; int offset = 0; int nConstraint = ReadInt32(pIndex, offset); offset += sizeof(int); IntPtr pConstraint = ReadIntPtr(pIndex, offset); offset += IntPtr.Size; int nOrderBy = ReadInt32(pIndex, offset); offset += sizeof(int); IntPtr pOrderBy = ReadIntPtr(pIndex, offset); index = new SQLiteIndex(nConstraint, nOrderBy); int sizeOfConstraintType = Marshal.SizeOf(typeof( UnsafeNativeMethods.sqlite3_index_constraint)); for (int iConstraint = 0; iConstraint < nConstraint; iConstraint++) { UnsafeNativeMethods.sqlite3_index_constraint constraint = new UnsafeNativeMethods.sqlite3_index_constraint(); Marshal.PtrToStructure(IntPtrForOffset(pConstraint, iConstraint * sizeOfConstraintType), constraint); index.Inputs.Constraints[iConstraint] = new SQLiteIndexConstraint(constraint); } int sizeOfOrderByType = Marshal.SizeOf(typeof( UnsafeNativeMethods.sqlite3_index_orderby)); for (int iOrderBy = 0; iOrderBy < nOrderBy; iOrderBy++) { UnsafeNativeMethods.sqlite3_index_orderby orderBy = new UnsafeNativeMethods.sqlite3_index_orderby(); Marshal.PtrToStructure(IntPtrForOffset(pOrderBy, iOrderBy * sizeOfOrderByType), orderBy); index.Inputs.OrderBys[iOrderBy] = new SQLiteIndexOrderBy(orderBy); } } /////////////////////////////////////////////////////////////////////// /// <summary> /// Populates the outputs of a pre-allocated native sqlite3_index_info /// structure using an existing <see cref="SQLiteIndex" /> object /// instance. /// </summary> /// <param name="index"> /// The existing <see cref="SQLiteIndex" /> object instance containing /// the output data to use. /// </param> /// <param name="pIndex"> /// The native pointer to the pre-allocated native sqlite3_index_info /// structure. /// </param> public static void IndexToIntPtr( SQLiteIndex index, IntPtr pIndex ) { if ((index == null) || (index.Inputs == null) || (index.Inputs.Constraints == null) || (index.Outputs == null) || (index.Outputs.ConstraintUsages == null)) { return; } if (pIndex == IntPtr.Zero) return; int offset = 0; int nConstraint = ReadInt32(pIndex, offset); if (nConstraint != index.Inputs.Constraints.Length) return; if (nConstraint != index.Outputs.ConstraintUsages.Length) return; offset += sizeof(int) + IntPtr.Size + sizeof(int) + IntPtr.Size; IntPtr pConstraintUsage = ReadIntPtr(pIndex, offset); int sizeOfConstraintUsageType = Marshal.SizeOf(typeof( UnsafeNativeMethods.sqlite3_index_constraint_usage)); for (int iConstraint = 0; iConstraint < nConstraint; iConstraint++) { UnsafeNativeMethods.sqlite3_index_constraint_usage constraintUsage = new UnsafeNativeMethods.sqlite3_index_constraint_usage( index.Outputs.ConstraintUsages[iConstraint]); Marshal.StructureToPtr( constraintUsage, IntPtrForOffset(pConstraintUsage, iConstraint * sizeOfConstraintUsageType), false); index.Outputs.ConstraintUsages[iConstraint] = new SQLiteIndexConstraintUsage(constraintUsage); } offset += IntPtr.Size; WriteInt32(pIndex, offset, index.Outputs.IndexNumber); offset += sizeof(int); WriteIntPtr(pIndex, offset, SQLiteString.Utf8IntPtrFromString( index.Outputs.IndexString)); offset += IntPtr.Size; WriteInt32(pIndex, offset, 1); /* NOTE: We just allocated it. */ offset += sizeof(int); WriteInt32(pIndex, offset, index.Outputs.OrderByConsumed); offset += sizeof(int); WriteDouble(pIndex, offset, index.Outputs.EstimatedCost); } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteModule Base Class /// <summary> /// This class represents a managed virtual table module implementation. /// It is not sealed and must be used as the base class for any /// user-defined virtual table module classes implemented in managed code. /// </summary> public abstract class SQLiteModule : ISQLiteManagedModule, /*ISQLiteNativeModule,*/ IDisposable /* NOT SEALED */ { #region SQLiteNativeModule Private Class private sealed class SQLiteNativeModule : ISQLiteNativeModule, IDisposable { #region Private Constants /// <summary> /// This is the value that is always used for the "logErrors" /// parameter to the various static error handling methods provided /// by the <see cref="SQLiteModule" /> class. /// </summary> private const bool DefaultLogErrors = true; /////////////////////////////////////////////////////////////////// /// <summary> /// This is the error message text used when the contained /// <see cref="SQLiteModule" /> object instance is not available /// for any reason. /// </summary> private const string ModuleNotAvailableErrorMessage = "native module implementation not available"; #endregion /////////////////////////////////////////////////////////////////// #region Private Data /// <summary> /// The <see cref="SQLiteModule" /> object instance used to provide /// an implementation of the <see cref="ISQLiteNativeModule" /> /// interface. /// </summary> private SQLiteModule module; #endregion /////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="module"> /// The <see cref="SQLiteModule" /> object instance used to provide /// an implementation of the <see cref="ISQLiteNativeModule" /> /// interface. /// </param> public SQLiteNativeModule( SQLiteModule module ) { this.module = module; } #endregion /////////////////////////////////////////////////////////////////// #region Private Static Methods /// <summary> /// Sets the table error message to one that indicates the native /// module implementation is not available. /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// The value of <see cref="SQLiteErrorCode.Error"/>. /// </returns> private static SQLiteErrorCode ModuleNotAvailableTableError( IntPtr pVtab ) { SetTableError(null, pVtab, DefaultLogErrors, ModuleNotAvailableErrorMessage); return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////// /// <summary> /// Sets the table error message to one that indicates the native /// module implementation is not available. /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived /// structure. /// </param> /// <returns> /// The value of <see cref="SQLiteErrorCode.Error"/>. /// </returns> private static SQLiteErrorCode ModuleNotAvailableCursorError( IntPtr pCursor ) { SetCursorError(null, pCursor, DefaultLogErrors, ModuleNotAvailableErrorMessage); return SQLiteErrorCode.Error; } #endregion /////////////////////////////////////////////////////////////////// #region ISQLiteNativeModule Members /// <summary> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </summary> /// <param name="pDb"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="pAux"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="pError"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </returns> public SQLiteErrorCode xCreate( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ) { // CheckDisposed(); if (module == null) { pError = SQLiteString.Utf8IntPtrFromString( ModuleNotAvailableErrorMessage); return SQLiteErrorCode.Error; } return module.xCreate( pDb, pAux, argc, argv, ref pVtab, ref pError); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </summary> /// <param name="pDb"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="pAux"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="pError"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </returns> public SQLiteErrorCode xConnect( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ) { // CheckDisposed(); if (module == null) { pError = SQLiteString.Utf8IntPtrFromString( ModuleNotAvailableErrorMessage); return SQLiteErrorCode.Error; } return module.xConnect( pDb, pAux, argc, argv, ref pVtab, ref pError); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </param> /// <param name="pIndex"> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </returns> public SQLiteErrorCode xBestIndex( IntPtr pVtab, IntPtr pIndex ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xBestIndex(pVtab, pIndex); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </returns> public SQLiteErrorCode xDisconnect( IntPtr pVtab ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xDisconnect(pVtab); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </returns> public SQLiteErrorCode xDestroy( IntPtr pVtab ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xDestroy(pVtab); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </param> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </returns> public SQLiteErrorCode xOpen( IntPtr pVtab, ref IntPtr pCursor ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xOpen(pVtab, ref pCursor); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xClose" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xClose" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xClose" /> method. /// </returns> public SQLiteErrorCode xClose( IntPtr pCursor ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableCursorError(pCursor); return module.xClose(pCursor); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="idxNum"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="idxStr"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </returns> public SQLiteErrorCode xFilter( IntPtr pCursor, int idxNum, IntPtr idxStr, int argc, IntPtr argv ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableCursorError(pCursor); return module.xFilter(pCursor, idxNum, idxStr, argc, argv); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xNext" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xNext" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xNext" /> method. /// </returns> public SQLiteErrorCode xNext( IntPtr pCursor ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableCursorError(pCursor); return module.xNext(pCursor); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xEof" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xEof" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xEof" /> method. /// </returns> public int xEof( IntPtr pCursor ) { // CheckDisposed(); if (module == null) { ModuleNotAvailableCursorError(pCursor); return 1; } return module.xEof(pCursor); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </param> /// <param name="pContext"> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </returns> public SQLiteErrorCode xColumn( IntPtr pCursor, IntPtr pContext, int index ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableCursorError(pCursor); return module.xColumn(pCursor, pContext, index); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </returns> public SQLiteErrorCode xRowId( IntPtr pCursor, ref long rowId ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableCursorError(pCursor); return module.xRowId(pCursor, ref rowId); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </returns> public SQLiteErrorCode xUpdate( IntPtr pVtab, int argc, IntPtr argv, ref long rowId ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xUpdate(pVtab, argc, argv, ref rowId); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xBegin" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xBegin" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xBegin" /> method. /// </returns> public SQLiteErrorCode xBegin( IntPtr pVtab ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xBegin(pVtab); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xSync" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xSync" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xSync" /> method. /// </returns> public SQLiteErrorCode xSync( IntPtr pVtab ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xSync(pVtab); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xCommit" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xCommit" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xCommit" /> method. /// </returns> public SQLiteErrorCode xCommit( IntPtr pVtab ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xCommit(pVtab); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRollback" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRollback" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRollback" /> method. /// </returns> public SQLiteErrorCode xRollback( IntPtr pVtab ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xRollback(pVtab); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="nArg"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="zName"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="callback"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </returns> public int xFindFunction( IntPtr pVtab, int nArg, IntPtr zName, ref SQLiteCallback callback, ref IntPtr pClientData ) { // CheckDisposed(); if (module == null) { ModuleNotAvailableTableError(pVtab); return 0; } return module.xFindFunction( pVtab, nArg, zName, ref callback, ref pClientData); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </param> /// <param name="zNew"> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </returns> public SQLiteErrorCode xRename( IntPtr pVtab, IntPtr zNew ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xRename(pVtab, zNew); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </param> /// <param name="iSavepoint"> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </returns> public SQLiteErrorCode xSavepoint( IntPtr pVtab, int iSavepoint ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xSavepoint(pVtab, iSavepoint); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </param> /// <param name="iSavepoint"> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </returns> public SQLiteErrorCode xRelease( IntPtr pVtab, int iSavepoint ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xRelease(pVtab, iSavepoint); } /////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </param> /// <param name="iSavepoint"> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </returns> public SQLiteErrorCode xRollbackTo( IntPtr pVtab, int iSavepoint ) { // CheckDisposed(); if (module == null) return ModuleNotAvailableTableError(pVtab); return module.xRollbackTo(pVtab, iSavepoint); } #endregion /////////////////////////////////////////////////////////////////// #region IDisposable Members /// <summary> /// Disposes of this object instance. /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } #endregion /////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteNativeModule).Name); } #endif } /////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="Dispose()" /> method. Zero if this method is being /// called from the finalizer. /// </param> private /* protected virtual */ void Dispose(bool disposing) { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// // // NOTE: The module is not owned by us; therefore, do not // dispose it. // if (module != null) module = null; disposed = true; } } #endregion /////////////////////////////////////////////////////////////////// #region Destructor /// <summary> /// Finalizes this object instance. /// </summary> ~SQLiteNativeModule() { Dispose(false); } #endregion } #endregion /////////////////////////////////////////////////////////////////////// #region Private Constants /// <summary> /// The default estimated cost for use with the /// <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> private static readonly double DefaultEstimatedCost = double.MaxValue; /////////////////////////////////////////////////////////////////////// /// <summary> /// The default version of the native sqlite3_module structure in use. /// </summary> private static readonly int DefaultModuleVersion = 2; #endregion /////////////////////////////////////////////////////////////////////// #region Private Data /// <summary> /// This field is used to store the native sqlite3_module structure /// associated with this object instance. /// </summary> private UnsafeNativeMethods.sqlite3_module nativeModule; /////////////////////////////////////////////////////////////////////// #if PLATFORM_COMPACTFRAMEWORK /// <summary> /// This field is used to hold the block of native memory that contains /// the native sqlite3_module structure associated with this object /// instance when running on the .NET Compact Framework. /// </summary> private IntPtr pNativeModule; #endif /////////////////////////////////////////////////////////////////////// /// <summary> /// This field is used to store the virtual table instances associated /// with this module. The native pointer to the sqlite3_vtab derived /// structure is used to key into this collection. /// </summary> private Dictionary<IntPtr, SQLiteVirtualTable> tables; /////////////////////////////////////////////////////////////////////// /// <summary> /// This field is used to store the virtual table cursor instances /// associated with this module. The native pointer to the /// sqlite3_vtab_cursor derived structure is used to key into this /// collection. /// </summary> private Dictionary<IntPtr, SQLiteVirtualTableCursor> cursors; #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="name"> /// The name of the module. This parameter cannot be null. /// </param> public SQLiteModule(string name) { if (name == null) throw new ArgumentNullException("name"); this.name = name; this.tables = new Dictionary<IntPtr, SQLiteVirtualTable>(); this.cursors = new Dictionary<IntPtr, SQLiteVirtualTableCursor>(); } #endregion /////////////////////////////////////////////////////////////////////// #region Internal Methods /// <summary> /// Creates and returns the native sqlite_module structure using the /// configured (or default) <see cref="ISQLiteNativeModule" /> /// interface implementation. /// </summary> /// <returns> /// The native sqlite_module structure using the configured (or /// default) <see cref="ISQLiteNativeModule" /> interface /// implementation. /// </returns> internal UnsafeNativeMethods.sqlite3_module CreateNativeModule() { return CreateNativeModule(GetNativeModuleImpl()); } /////////////////////////////////////////////////////////////////////// #if PLATFORM_COMPACTFRAMEWORK /// <summary> /// Creates and returns a memory block obtained from the SQLite core /// library used to store the native sqlite3_module structure for this /// object instance when running on the .NET Compact Framework. /// </summary> /// <returns> /// The native pointer to the native sqlite3_module structure. /// </returns> internal IntPtr CreateNativeModuleInterop() { if (pNativeModule == IntPtr.Zero) { // // HACK: No easy way to determine the size of the native // sqlite_module structure when running on the .NET // Compact Framework; therefore, just base the size // on what we know: // // There is one integer member. // There are 22 function pointers. // pNativeModule = SQLiteMemory.Allocate( sizeof(int) + (22 * IntPtr.Size)); if (pNativeModule == IntPtr.Zero) throw new OutOfMemoryException("sqlite3_module"); } return pNativeModule; } #endif #endregion /////////////////////////////////////////////////////////////////////// #region Private Methods /// <summary> /// Creates and returns the native sqlite_module structure using the /// specified <see cref="ISQLiteNativeModule" /> interface /// implementation. /// </summary> /// <param name="module"> /// The <see cref="ISQLiteNativeModule" /> interface implementation to /// use. /// </param> /// <returns> /// The native sqlite_module structure using the specified /// <see cref="ISQLiteNativeModule" /> interface implementation. /// </returns> private UnsafeNativeMethods.sqlite3_module CreateNativeModule( ISQLiteNativeModule module ) { nativeModule = new UnsafeNativeMethods.sqlite3_module(); nativeModule.iVersion = DefaultModuleVersion; if (module != null) { nativeModule.xCreate = new UnsafeNativeMethods.xCreate( module.xCreate); nativeModule.xConnect = new UnsafeNativeMethods.xConnect( module.xConnect); nativeModule.xBestIndex = new UnsafeNativeMethods.xBestIndex( module.xBestIndex); nativeModule.xDisconnect = new UnsafeNativeMethods.xDisconnect( module.xDisconnect); nativeModule.xDestroy = new UnsafeNativeMethods.xDestroy( module.xDestroy); nativeModule.xOpen = new UnsafeNativeMethods.xOpen( module.xOpen); nativeModule.xClose = new UnsafeNativeMethods.xClose( module.xClose); nativeModule.xFilter = new UnsafeNativeMethods.xFilter( module.xFilter); nativeModule.xNext = new UnsafeNativeMethods.xNext( module.xNext); nativeModule.xEof = new UnsafeNativeMethods.xEof(module.xEof); nativeModule.xColumn = new UnsafeNativeMethods.xColumn( module.xColumn); nativeModule.xRowId = new UnsafeNativeMethods.xRowId( module.xRowId); nativeModule.xUpdate = new UnsafeNativeMethods.xUpdate( module.xUpdate); nativeModule.xBegin = new UnsafeNativeMethods.xBegin( module.xBegin); nativeModule.xSync = new UnsafeNativeMethods.xSync( module.xSync); nativeModule.xCommit = new UnsafeNativeMethods.xCommit( module.xCommit); nativeModule.xRollback = new UnsafeNativeMethods.xRollback( module.xRollback); nativeModule.xFindFunction = new UnsafeNativeMethods.xFindFunction( module.xFindFunction); nativeModule.xRename = new UnsafeNativeMethods.xRename( module.xRename); nativeModule.xSavepoint = new UnsafeNativeMethods.xSavepoint( module.xSavepoint); nativeModule.xRelease = new UnsafeNativeMethods.xRelease( module.xRelease); nativeModule.xRollbackTo = new UnsafeNativeMethods.xRollbackTo( module.xRollbackTo); } else { nativeModule.xCreate = new UnsafeNativeMethods.xCreate( xCreate); nativeModule.xConnect = new UnsafeNativeMethods.xConnect( xConnect); nativeModule.xBestIndex = new UnsafeNativeMethods.xBestIndex( xBestIndex); nativeModule.xDisconnect = new UnsafeNativeMethods.xDisconnect( xDisconnect); nativeModule.xDestroy = new UnsafeNativeMethods.xDestroy( xDestroy); nativeModule.xOpen = new UnsafeNativeMethods.xOpen(xOpen); nativeModule.xClose = new UnsafeNativeMethods.xClose(xClose); nativeModule.xFilter = new UnsafeNativeMethods.xFilter( xFilter); nativeModule.xNext = new UnsafeNativeMethods.xNext(xNext); nativeModule.xEof = new UnsafeNativeMethods.xEof(xEof); nativeModule.xColumn = new UnsafeNativeMethods.xColumn( xColumn); nativeModule.xRowId = new UnsafeNativeMethods.xRowId(xRowId); nativeModule.xUpdate = new UnsafeNativeMethods.xUpdate( xUpdate); nativeModule.xBegin = new UnsafeNativeMethods.xBegin(xBegin); nativeModule.xSync = new UnsafeNativeMethods.xSync(xSync); nativeModule.xCommit = new UnsafeNativeMethods.xCommit( xCommit); nativeModule.xRollback = new UnsafeNativeMethods.xRollback( xRollback); nativeModule.xFindFunction = new UnsafeNativeMethods.xFindFunction( xFindFunction); nativeModule.xRename = new UnsafeNativeMethods.xRename( xRename); nativeModule.xSavepoint = new UnsafeNativeMethods.xSavepoint( xSavepoint); nativeModule.xRelease = new UnsafeNativeMethods.xRelease( xRelease); nativeModule.xRollbackTo = new UnsafeNativeMethods.xRollbackTo( xRollbackTo); } return nativeModule; } #endregion /////////////////////////////////////////////////////////////////////// #region Protected Members #region Module Helper Methods /// <summary> /// Gets and returns the <see cref="ISQLiteNativeModule" /> interface /// implementation to be used when creating the native sqlite3_module /// structure. Derived classes may override this method to supply an /// alternate implementation for the <see cref="ISQLiteNativeModule" /> /// interface. /// </summary> /// <returns> /// The <see cref="ISQLiteNativeModule" /> interface implementation to /// be used when populating the native sqlite3_module structure. If /// the returned value is null, the private methods provided by the /// <see cref="SQLiteModule" /> class and relating to the /// <see cref="ISQLiteNativeModule" /> interface will be used to /// create the necessary delegates. /// </returns> protected virtual ISQLiteNativeModule GetNativeModuleImpl() { return null; /* NOTE: Use the built-in default delegates. */ } /////////////////////////////////////////////////////////////////////// /// <summary> /// Creates and returns the <see cref="ISQLiteNativeModule" /> /// interface implementation corresponding to the current /// <see cref="SQLiteModule" /> object instance. /// </summary> /// <returns> /// The <see cref="ISQLiteNativeModule" /> interface implementation /// corresponding to the current <see cref="SQLiteModule" /> object /// instance. /// </returns> protected virtual ISQLiteNativeModule CreateNativeModuleImpl() { return new SQLiteNativeModule(this); } #endregion /////////////////////////////////////////////////////////////////////// #region Native Table Helper Methods /// <summary> /// Allocates a native sqlite3_vtab derived structure and returns a /// native pointer to it. /// </summary> /// <returns> /// A native pointer to a native sqlite3_vtab derived structure. /// </returns> protected virtual IntPtr AllocateTable() { int size = Marshal.SizeOf(typeof( UnsafeNativeMethods.sqlite3_vtab)); return SQLiteMemory.Allocate(size); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Zeros out the fields of a native sqlite3_vtab derived structure. /// </summary> /// <param name="pVtab"> /// The native pointer to the native sqlite3_vtab derived structure to /// zero. /// </param> protected virtual void ZeroTable( IntPtr pVtab ) { if (pVtab == IntPtr.Zero) return; int offset = 0; SQLiteMarshal.WriteIntPtr(pVtab, offset, IntPtr.Zero); offset += IntPtr.Size; SQLiteMarshal.WriteInt32(pVtab, offset, 0); offset += sizeof(int); SQLiteMarshal.WriteIntPtr(pVtab, offset, IntPtr.Zero); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Frees a native sqlite3_vtab structure using the provided native /// pointer to it. /// </summary> /// <param name="pVtab"> /// A native pointer to a native sqlite3_vtab derived structure. /// </param> protected virtual void FreeTable( IntPtr pVtab ) { SetTableError(pVtab, null); SQLiteMemory.Free(pVtab); } #endregion /////////////////////////////////////////////////////////////////////// #region Native Cursor Helper Methods /// <summary> /// Allocates a native sqlite3_vtab_cursor derived structure and /// returns a native pointer to it. /// </summary> /// <returns> /// A native pointer to a native sqlite3_vtab_cursor derived structure. /// </returns> protected virtual IntPtr AllocateCursor() { int size = Marshal.SizeOf(typeof( UnsafeNativeMethods.sqlite3_vtab_cursor)); return SQLiteMemory.Allocate(size); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Frees a native sqlite3_vtab_cursor structure using the provided /// native pointer to it. /// </summary> /// <param name="pCursor"> /// A native pointer to a native sqlite3_vtab_cursor derived structure. /// </param> protected virtual void FreeCursor( IntPtr pCursor ) { SQLiteMemory.Free(pCursor); } #endregion /////////////////////////////////////////////////////////////////////// #region Static Table Lookup Methods /// <summary> /// Reads and returns the native pointer to the sqlite3_vtab derived /// structure based on the native pointer to the sqlite3_vtab_cursor /// derived structure. /// </summary> /// <param name="module"> /// The <see cref="SQLiteModule" /> object instance to be used. /// </param> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure /// from which to read the native pointer to the sqlite3_vtab derived /// structure. /// </param> /// <returns> /// The native pointer to the sqlite3_vtab derived structure -OR- /// <see cref="IntPtr.Zero"/> if it cannot be determined. /// </returns> private static IntPtr TableFromCursor( SQLiteModule module, IntPtr pCursor ) { if (pCursor == IntPtr.Zero) return IntPtr.Zero; return Marshal.ReadIntPtr(pCursor); } #endregion /////////////////////////////////////////////////////////////////////// #region Table Lookup Methods /// <summary> /// Reads and returns the native pointer to the sqlite3_vtab derived /// structure based on the native pointer to the sqlite3_vtab_cursor /// derived structure. /// </summary> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure /// from which to read the native pointer to the sqlite3_vtab derived /// structure. /// </param> /// <returns> /// The native pointer to the sqlite3_vtab derived structure -OR- /// <see cref="IntPtr.Zero"/> if it cannot be determined. /// </returns> protected virtual IntPtr TableFromCursor( IntPtr pCursor ) { return TableFromCursor(this, pCursor); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Looks up and returns the <see cref="SQLiteVirtualTable" /> object /// instance based on the native pointer to the sqlite3_vtab derived /// structure. /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <returns> /// The <see cref="SQLiteVirtualTable" /> object instance or null if /// the corresponding one cannot be found. /// </returns> protected virtual SQLiteVirtualTable TableFromIntPtr( IntPtr pVtab ) { if (pVtab == IntPtr.Zero) { SetTableError(pVtab, "invalid native table"); return null; } SQLiteVirtualTable table; 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; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Allocates and returns a native pointer to a sqlite3_vtab derived /// structure and creates an association between it and the specified /// <see cref="SQLiteVirtualTable" /> object instance. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance to be used /// when creating the association. /// </param> /// <returns> /// The native pointer to a sqlite3_vtab derived structure or /// <see cref="IntPtr.Zero"/> if the method fails for any reason. /// </returns> protected virtual IntPtr TableToIntPtr( SQLiteVirtualTable table ) { if ((table == null) || (tables == null)) return IntPtr.Zero; IntPtr pVtab = IntPtr.Zero; bool success = false; try { pVtab = AllocateTable(); if (pVtab != IntPtr.Zero) { ZeroTable(pVtab); table.NativeHandle = pVtab; tables.Add(pVtab, table); success = true; } } finally { if (!success && (pVtab != IntPtr.Zero)) { FreeTable(pVtab); pVtab = IntPtr.Zero; } } return pVtab; } #endregion /////////////////////////////////////////////////////////////////////// #region Cursor Lookup Methods /// <summary> /// Looks up and returns the <see cref="SQLiteVirtualTableCursor" /> /// object instance based on the native pointer to the /// sqlite3_vtab_cursor derived structure. /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure. /// </param> /// <returns> /// The <see cref="SQLiteVirtualTableCursor" /> object instance or null /// if the corresponding one cannot be found. /// </returns> protected virtual SQLiteVirtualTableCursor CursorFromIntPtr( IntPtr pVtab, IntPtr pCursor ) { if (pCursor == IntPtr.Zero) { SetTableError(pVtab, "invalid native cursor"); return null; } SQLiteVirtualTableCursor cursor; 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; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Allocates and returns a native pointer to a sqlite3_vtab_cursor /// derived structure and creates an association between it and the /// specified <see cref="SQLiteVirtualTableCursor" /> object instance. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance to be /// used when creating the association. /// </param> /// <returns> /// The native pointer to a sqlite3_vtab_cursor derived structure or /// <see cref="IntPtr.Zero"/> if the method fails for any reason. /// </returns> protected virtual IntPtr CursorToIntPtr( SQLiteVirtualTableCursor cursor ) { if ((cursor == null) || (cursors == null)) return IntPtr.Zero; IntPtr pCursor = IntPtr.Zero; bool success = false; try { pCursor = AllocateCursor(); if (pCursor != IntPtr.Zero) { cursor.NativeHandle = pCursor; cursors.Add(pCursor, cursor); success = true; } } finally { if (!success && (pCursor != IntPtr.Zero)) { FreeCursor(pCursor); pCursor = IntPtr.Zero; } } return pCursor; } #endregion /////////////////////////////////////////////////////////////////////// #region Table Declaration Helper Methods /// <summary> /// Attempts to declare the schema for the virtual table using the /// specified database connection. /// </summary> /// <param name="connection"> /// The <see cref="SQLiteConnection" /> object instance to use when /// declaring the schema of the virtual table. /// </param> /// <param name="sql"> /// The string containing the CREATE TABLE statement that completely /// describes the schema for the virtual table. /// </param> /// <param name="error"> /// Upon failure, this parameter must be modified to contain an error /// message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> protected virtual SQLiteErrorCode DeclareTable( SQLiteConnection connection, string sql, ref string error ) { if (connection == null) { error = "invalid connection"; return SQLiteErrorCode.Error; } SQLiteBase sqliteBase = connection._sql; if (sqliteBase == null) { error = "connection has invalid handle"; return SQLiteErrorCode.Error; } return sqliteBase.DeclareVirtualTable(this, sql, ref error); } #endregion /////////////////////////////////////////////////////////////////////// #region Error Handling Helper Methods /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> protected virtual bool SetTableError( IntPtr pVtab, string error ) { return SetTableError(this, pVtab, LogErrors, error); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance used to /// lookup the native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> protected virtual bool SetTableError( SQLiteVirtualTable table, string error ) { return SetTableError(this, table, LogErrors, error); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance used to /// lookup the native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> protected virtual bool SetCursorError( SQLiteVirtualTableCursor cursor, string error ) { return SetCursorError(this, cursor, LogErrors, error); } #endregion /////////////////////////////////////////////////////////////////////// #region Static Error Handling Helper Methods /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="module"> /// The <see cref="SQLiteModule" /> object instance to be used. /// </param> /// <param name="pVtab"> /// The native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="logErrors"> /// Non-zero if this error message should also be logged using the /// <see cref="SQLiteLog" /> class. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> private static bool SetTableError( SQLiteModule module, IntPtr pVtab, bool logErrors, string error ) { try { if (logErrors) { SQLiteLog.LogMessage(SQLiteErrorCode.Error, String.Format(CultureInfo.CurrentCulture, "Virtual table error: {0}", error)); /* throw */ } } catch { // do nothing. } if (pVtab == IntPtr.Zero) return false; int offset = IntPtr.Size + sizeof(int); IntPtr pError = SQLiteMarshal.ReadIntPtr(pVtab, offset); if (pError != IntPtr.Zero) { SQLiteMemory.Free(pError); pError = IntPtr.Zero; SQLiteMarshal.WriteIntPtr(pVtab, offset, pError); } if (error == null) return true; bool success = false; try { pError = SQLiteString.Utf8IntPtrFromString(error); SQLiteMarshal.WriteIntPtr(pVtab, offset, pError); success = true; } finally { if (!success && (pError != IntPtr.Zero)) { SQLiteMemory.Free(pError); pError = IntPtr.Zero; } } return success; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="module"> /// The <see cref="SQLiteModule" /> object instance to be used. /// </param> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance used to /// lookup the native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="logErrors"> /// Non-zero if this error message should also be logged using the /// <see cref="SQLiteLog" /> class. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> private static bool SetTableError( SQLiteModule module, SQLiteVirtualTable table, bool logErrors, string error ) { if (table == null) return false; IntPtr pVtab = table.NativeHandle; if (pVtab == IntPtr.Zero) return false; return SetTableError(module, pVtab, logErrors, error); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="module"> /// The <see cref="SQLiteModule" /> object instance to be used. /// </param> /// <param name="pCursor"> /// The native pointer to the sqlite3_vtab_cursor derived structure /// used to get the native pointer to the sqlite3_vtab derived /// structure. /// </param> /// <param name="logErrors"> /// Non-zero if this error message should also be logged using the /// <see cref="SQLiteLog" /> class. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> private static bool SetCursorError( SQLiteModule module, IntPtr pCursor, bool logErrors, string error ) { if (pCursor == IntPtr.Zero) return false; IntPtr pVtab = TableFromCursor(module, pCursor); if (pVtab == IntPtr.Zero) return false; return SetTableError(module, pVtab, logErrors, error); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Arranges for the specified error message to be placed into the /// zErrMsg field of a sqlite3_vtab derived structure, freeing the /// existing error message, if any. /// </summary> /// <param name="module"> /// The <see cref="SQLiteModule" /> object instance to be used. /// </param> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance used to /// lookup the native pointer to the sqlite3_vtab derived structure. /// </param> /// <param name="logErrors"> /// Non-zero if this error message should also be logged using the /// <see cref="SQLiteLog" /> class. /// </param> /// <param name="error"> /// The error message. /// </param> /// <returns> /// Non-zero upon success. /// </returns> private static bool SetCursorError( SQLiteModule module, SQLiteVirtualTableCursor cursor, bool logErrors, string error ) { if (cursor == null) return false; IntPtr pCursor = cursor.NativeHandle; if (pCursor == IntPtr.Zero) return false; return SetCursorError(module, pCursor, logErrors, error); } #endregion /////////////////////////////////////////////////////////////////////// #region Index Handling Helper Methods /// <summary> /// Modifies the specified <see cref="SQLiteIndex" /> object instance /// to contain the specified estimated cost. /// </summary> /// <param name="index"> /// The <see cref="SQLiteIndex" /> object instance to modify. /// </param> /// <param name="estimatedCost"> /// The estimated cost value to use. /// </param> /// <returns> /// Non-zero upon success. /// </returns> protected virtual bool SetEstimatedCost( SQLiteIndex index, double estimatedCost ) { if ((index == null) || (index.Outputs == null)) return false; index.Outputs.EstimatedCost = estimatedCost; return true; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Modifies the specified <see cref="SQLiteIndex" /> object instance /// to contain the default estimated cost. /// </summary> /// <param name="index"> /// The <see cref="SQLiteIndex" /> object instance to modify. /// </param> /// <returns> /// Non-zero upon success. /// </returns> protected virtual bool SetEstimatedCost( SQLiteIndex index ) { return SetEstimatedCost(index, DefaultEstimatedCost); } #endregion #endregion /////////////////////////////////////////////////////////////////////// #region Public Properties private bool logErrors; /// <summary> /// Returns or sets a boolean value indicating whether virtual table /// errors should be logged using the <see cref="SQLiteLog" /> class. /// </summary> public virtual bool LogErrors { get { CheckDisposed(); return logErrors; } set { CheckDisposed(); logErrors = value; } } /////////////////////////////////////////////////////////////////////// private bool logExceptions; /// <summary> /// Returns or sets a boolean value indicating whether exceptions /// caught in the /// <see cref="ISQLiteNativeModule.xDisconnect" /> method, /// <see cref="ISQLiteNativeModule.xDestroy" /> method, and the /// <see cref="Dispose()" /> method should be logged using the /// <see cref="SQLiteLog" /> class. /// </summary> public virtual bool LogExceptions { get { CheckDisposed(); return logExceptions; } set { CheckDisposed(); logExceptions = value; } } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteNativeModule Members /// <summary> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </summary> /// <param name="pDb"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="pAux"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <param name="pError"> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xCreate" /> method. /// </returns> private SQLiteErrorCode xCreate( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ) { try { string fileName = SQLiteString.StringFromUtf8IntPtr( UnsafeNativeMethods.sqlite3_db_filename(pDb, IntPtr.Zero)); using (SQLiteConnection connection = new SQLiteConnection( pDb, fileName, false)) { SQLiteVirtualTable table = null; string error = null; if (Create(connection, pAux, SQLiteString.StringArrayFromUtf8SizeAndIntPtr(argc, argv), ref table, ref error) == SQLiteErrorCode.Ok) { if (table != null) { pVtab = TableToIntPtr(table); return SQLiteErrorCode.Ok; } else { pError = SQLiteString.Utf8IntPtrFromString( "no table was created"); } } else { pError = SQLiteString.Utf8IntPtrFromString(error); } } } catch (Exception e) /* NOTE: Must catch ALL. */ { pError = SQLiteString.Utf8IntPtrFromString(e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </summary> /// <param name="pDb"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="pAux"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <param name="pError"> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xConnect" /> method. /// </returns> private SQLiteErrorCode xConnect( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ) { try { string fileName = SQLiteString.StringFromUtf8IntPtr( UnsafeNativeMethods.sqlite3_db_filename(pDb, IntPtr.Zero)); using (SQLiteConnection connection = new SQLiteConnection( pDb, fileName, false)) { SQLiteVirtualTable table = null; string error = null; if (Connect(connection, pAux, SQLiteString.StringArrayFromUtf8SizeAndIntPtr(argc, argv), ref table, ref error) == SQLiteErrorCode.Ok) { if (table != null) { pVtab = TableToIntPtr(table); return SQLiteErrorCode.Ok; } else { pError = SQLiteString.Utf8IntPtrFromString( "no table was created"); } } else { pError = SQLiteString.Utf8IntPtrFromString(error); } } } catch (Exception e) /* NOTE: Must catch ALL. */ { pError = SQLiteString.Utf8IntPtrFromString(e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </param> /// <param name="pIndex"> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </returns> private SQLiteErrorCode xBestIndex( IntPtr pVtab, IntPtr pIndex ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { SQLiteIndex index = null; SQLiteMarshal.IndexFromIntPtr(pIndex, ref index); if (BestIndex(table, index) == SQLiteErrorCode.Ok) { SQLiteMarshal.IndexToIntPtr(index, pIndex); return SQLiteErrorCode.Ok; } } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </returns> private SQLiteErrorCode xDisconnect( IntPtr pVtab ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { if (Disconnect(table) == SQLiteErrorCode.Ok) { if (tables != null) tables.Remove(pVtab); return SQLiteErrorCode.Ok; } } } catch (Exception e) /* NOTE: Must catch ALL. */ { // // NOTE: At this point, there is no way to report the error // condition back to the caller; therefore, use the // logging facility instead. // try { if (LogExceptions) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"xDisconnect\" method: {0}", e)); /* throw */ } } catch { // do nothing. } } finally { FreeTable(pVtab); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </returns> private SQLiteErrorCode xDestroy( IntPtr pVtab ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { if (Destroy(table) == SQLiteErrorCode.Ok) { if (tables != null) tables.Remove(pVtab); return SQLiteErrorCode.Ok; } } } catch (Exception e) /* NOTE: Must catch ALL. */ { // // NOTE: At this point, there is no way to report the error // condition back to the caller; therefore, use the // logging facility instead. // try { if (LogExceptions) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"xDestroy\" method: {0}", e)); /* throw */ } } catch { // do nothing. } } finally { FreeTable(pVtab); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </param> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xOpen" /> method. /// </returns> private SQLiteErrorCode xOpen( IntPtr pVtab, ref IntPtr pCursor ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { SQLiteVirtualTableCursor cursor = null; if (Open(table, ref cursor) == SQLiteErrorCode.Ok) { if (cursor != null) { pCursor = CursorToIntPtr(cursor); if (pCursor != IntPtr.Zero) { return SQLiteErrorCode.Ok; } else { SetTableError(pVtab, "no native cursor was created"); } } else { SetTableError(pVtab, "no managed cursor was created"); } } } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xClose" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xClose" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xClose" /> method. /// </returns> private SQLiteErrorCode xClose( IntPtr pCursor ) { IntPtr pVtab = IntPtr.Zero; try { pVtab = TableFromCursor(pCursor); SQLiteVirtualTableCursor cursor = CursorFromIntPtr( pVtab, pCursor); if (cursor != null) { if (Close(cursor) == SQLiteErrorCode.Ok) { if (cursors != null) cursors.Remove(pCursor); return SQLiteErrorCode.Ok; } } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } finally { FreeCursor(pCursor); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="idxNum"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="idxStr"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xFilter" /> method. /// </returns> private SQLiteErrorCode xFilter( IntPtr pCursor, int idxNum, IntPtr idxStr, int argc, IntPtr argv ) { IntPtr pVtab = IntPtr.Zero; try { pVtab = TableFromCursor(pCursor); SQLiteVirtualTableCursor cursor = CursorFromIntPtr( pVtab, pCursor); if (cursor != null) { if (Filter(cursor, idxNum, SQLiteString.StringFromUtf8IntPtr(idxStr), SQLiteMarshal.ValueArrayFromSizeAndIntPtr(argc, argv)) == SQLiteErrorCode.Ok) { return SQLiteErrorCode.Ok; } } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xNext" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xNext" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xNext" /> method. /// </returns> private SQLiteErrorCode xNext( IntPtr pCursor ) { IntPtr pVtab = IntPtr.Zero; try { pVtab = TableFromCursor(pCursor); SQLiteVirtualTableCursor cursor = CursorFromIntPtr( pVtab, pCursor); if (cursor != null) { if (Next(cursor) == SQLiteErrorCode.Ok) return SQLiteErrorCode.Ok; } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xEof" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xEof" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xEof" /> method. /// </returns> private int xEof( IntPtr pCursor ) { IntPtr pVtab = IntPtr.Zero; try { pVtab = TableFromCursor(pCursor); SQLiteVirtualTableCursor cursor = CursorFromIntPtr( pVtab, pCursor); if (cursor != null) return Eof(cursor) ? 1 : 0; } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return 1; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </param> /// <param name="pContext"> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xColumn" /> method. /// </returns> private SQLiteErrorCode xColumn( IntPtr pCursor, IntPtr pContext, int index ) { IntPtr pVtab = IntPtr.Zero; try { pVtab = TableFromCursor(pCursor); SQLiteVirtualTableCursor cursor = CursorFromIntPtr( pVtab, pCursor); if (cursor != null) { SQLiteContext context = new SQLiteContext(pContext); return Column(cursor, context, index); } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </summary> /// <param name="pCursor"> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRowId" /> method. /// </returns> private SQLiteErrorCode xRowId( IntPtr pCursor, ref long rowId ) { IntPtr pVtab = IntPtr.Zero; try { pVtab = TableFromCursor(pCursor); SQLiteVirtualTableCursor cursor = CursorFromIntPtr( pVtab, pCursor); if (cursor != null) return RowId(cursor, ref rowId); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <param name="argc"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <param name="argv"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </returns> private SQLiteErrorCode xUpdate( IntPtr pVtab, int argc, IntPtr argv, ref long rowId ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { return Update( table, SQLiteMarshal.ValueArrayFromSizeAndIntPtr( argc, argv), ref rowId); } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xBegin" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xBegin" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xBegin" /> method. /// </returns> private SQLiteErrorCode xBegin( IntPtr pVtab ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return Begin(table); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xSync" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xSync" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xSync" /> method. /// </returns> private SQLiteErrorCode xSync( IntPtr pVtab ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return Sync(table); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xCommit" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xCommit" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xCommit" /> method. /// </returns> private SQLiteErrorCode xCommit( IntPtr pVtab ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return Commit(table); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRollback" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRollback" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRollback" /> method. /// </returns> private SQLiteErrorCode xRollback( IntPtr pVtab ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return Rollback(table); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="nArg"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="zName"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="callback"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </returns> private int xFindFunction( IntPtr pVtab, int nArg, IntPtr zName, ref SQLiteCallback callback, ref IntPtr pClientData ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { SQLiteFunction function = null; if (FindFunction( table, nArg, SQLiteString.StringFromUtf8IntPtr(zName), ref function, ref pClientData)) { if (function != null) { callback = function.ScalarCallback; return 1; } else { SetTableError(pVtab, "no function was created"); } } } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return 0; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </param> /// <param name="zNew"> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRename" /> method. /// </returns> private SQLiteErrorCode xRename( IntPtr pVtab, IntPtr zNew ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) { return Rename(table, SQLiteString.StringFromUtf8IntPtr(zNew)); } } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </param> /// <param name="iSavepoint"> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </returns> private SQLiteErrorCode xSavepoint( IntPtr pVtab, int iSavepoint ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return Savepoint(table, iSavepoint); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </param> /// <param name="iSavepoint"> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRelease" /> method. /// </returns> private SQLiteErrorCode xRelease( IntPtr pVtab, int iSavepoint ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return Release(table, iSavepoint); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </summary> /// <param name="pVtab"> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </param> /// <param name="iSavepoint"> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </returns> private SQLiteErrorCode xRollbackTo( IntPtr pVtab, int iSavepoint ) { try { SQLiteVirtualTable table = TableFromIntPtr(pVtab); if (table != null) return RollbackTo(table, iSavepoint); } catch (Exception e) /* NOTE: Must catch ALL. */ { SetTableError(pVtab, e.ToString()); } return SQLiteErrorCode.Error; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteManagedModule Members private bool declared; /// <summary> /// Returns non-zero if the schema for the virtual table has been /// declared. /// </summary> public virtual bool Declared { get { CheckDisposed(); return declared; } internal set { declared = value; } } /////////////////////////////////////////////////////////////////////// private string name; /// <summary> /// Returns the name of the module as it was registered with the SQLite /// core library. /// </summary> public virtual string Name { get { CheckDisposed(); return name; } } /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xCreate" /> method. /// </summary> /// <param name="connection"> /// The <see cref="SQLiteConnection" /> object instance associated with /// the virtual table. /// </param> /// <param name="pClientData"> /// The native user-data pointer associated with this module, as it was /// provided to the SQLite core library when the native module instance /// was created. /// </param> /// <param name="arguments"> /// The module name, database name, virtual table name, and all other /// arguments passed to the CREATE VIRTUAL TABLE statement. /// </param> /// <param name="table"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteVirtualTable" /> object instance associated with /// the virtual table. /// </param> /// <param name="error"> /// Upon failure, this parameter must be modified to contain an error /// message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Create( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xConnect" /> method. /// </summary> /// <param name="connection"> /// The <see cref="SQLiteConnection" /> object instance associated with /// the virtual table. /// </param> /// <param name="pClientData"> /// The native user-data pointer associated with this module, as it was /// provided to the SQLite core library when the native module instance /// was created. /// </param> /// <param name="arguments"> /// The module name, database name, virtual table name, and all other /// arguments passed to the CREATE VIRTUAL TABLE statement. /// </param> /// <param name="table"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteVirtualTable" /> object instance associated with /// the virtual table. /// </param> /// <param name="error"> /// Upon failure, this parameter must be modified to contain an error /// message. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Connect( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xBestIndex" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="index"> /// The <see cref="SQLiteIndex" /> object instance containing all the /// data for the inputs and outputs relating to index selection. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode BestIndex( SQLiteVirtualTable table, SQLiteIndex index ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xDisconnect" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Disconnect( SQLiteVirtualTable table ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xDestroy" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Destroy( SQLiteVirtualTable table ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xOpen" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="cursor"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteVirtualTableCursor" /> object instance associated /// with the newly opened virtual table cursor. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Open( SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xClose" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Close( SQLiteVirtualTableCursor cursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xFilter" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <param name="indexNumber"> /// Number used to help identify the selected index. /// </param> /// <param name="indexString"> /// String used to help identify the selected index. /// </param> /// <param name="values"> /// The values corresponding to each column in the selected index. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Filter( SQLiteVirtualTableCursor cursor, int indexNumber, string indexString, SQLiteValue[] values ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xNext" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Next( SQLiteVirtualTableCursor cursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xEof" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <returns> /// Non-zero if no more rows are available; zero otherwise. /// </returns> public abstract bool Eof( SQLiteVirtualTableCursor cursor ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xColumn" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <param name="context"> /// The <see cref="SQLiteContext" /> object instance to be used for /// returning the specified column value to the SQLite core library. /// </param> /// <param name="index"> /// The zero-based index corresponding to the column containing the /// value to be returned. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Column( SQLiteVirtualTableCursor cursor, SQLiteContext context, int index ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRowId" /> method. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance /// associated with the previously opened virtual table cursor to be /// used. /// </param> /// <param name="rowId"> /// Upon success, this parameter must be modified to contain the unique /// integer row identifier for the current row for the specified cursor. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode RowId( SQLiteVirtualTableCursor cursor, ref long rowId ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xUpdate" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="values"> /// The array of <see cref="SQLiteValue" /> object instances containing /// the new or modified column values, if any. /// </param> /// <param name="rowId"> /// Upon success, this parameter must be modified to contain the unique /// integer row identifier for the row that was inserted, if any. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Update( SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xBegin" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Begin( SQLiteVirtualTable table ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xSync" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Sync( SQLiteVirtualTable table ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xCommit" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Commit( SQLiteVirtualTable table ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRollback" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Rollback( SQLiteVirtualTable table ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xFindFunction" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="argumentCount"> /// The number of arguments to the function being sought. /// </param> /// <param name="name"> /// The name of the function being sought. /// </param> /// <param name="function"> /// Upon success, this parameter must be modified to contain the /// <see cref="SQLiteFunction" /> object instance responsible for /// implementing the specified function. /// </param> /// <param name="pClientData"> /// Upon success, this parameter must be modified to contain the /// native user-data pointer associated with /// <paramref name="function" />. /// </param> /// <returns> /// Non-zero if the specified function was found; zero otherwise. /// </returns> public abstract bool FindFunction( SQLiteVirtualTable table, int argumentCount, string name, ref SQLiteFunction function, ref IntPtr pClientData ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRename" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="newName"> /// The new name for the virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Rename( SQLiteVirtualTable table, string newName ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xSavepoint" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="savepoint"> /// This is an integer identifier under which the the current state of /// the virtual table should be saved. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Savepoint( SQLiteVirtualTable table, int savepoint ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRelease" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="savepoint"> /// This is an integer used to indicate that any saved states with an /// identifier greater than or equal to this should be deleted by the /// virtual table. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode Release( SQLiteVirtualTable table, int savepoint ); /////////////////////////////////////////////////////////////////////// /// <summary> /// This method is called in response to the /// <see cref="ISQLiteNativeModule.xRollbackTo" /> method. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this virtual table. /// </param> /// <param name="savepoint"> /// This is an integer identifier used to specify a specific saved /// state for the virtual table for it to restore itself back to, which /// should also have the effect of deleting all saved states with an /// integer identifier greater than this one. /// </param> /// <returns> /// A standard SQLite return code. /// </returns> public abstract SQLiteErrorCode RollbackTo( SQLiteVirtualTable table, int savepoint ); #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable Members /// <summary> /// Disposes of this object instance. /// </summary> public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteModule).Name); } #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="Dispose()" /> method. Zero if this method is being /// called from the finalizer. /// </param> protected virtual void Dispose(bool disposing) { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// try { #if !PLATFORM_COMPACTFRAMEWORK UnsafeNativeMethods.sqlite3_dispose_module( ref nativeModule); #elif !SQLITE_STANDARD if (pNativeModule != IntPtr.Zero) { try { UnsafeNativeMethods.sqlite3_dispose_module_interop( pNativeModule); } finally { SQLiteMemory.Free(pNativeModule); } } #else throw new NotImplementedException(); #endif } catch (Exception e) { try { if (LogExceptions) { SQLiteLog.LogMessage(SQLiteBase.COR_E_EXCEPTION, String.Format(CultureInfo.CurrentCulture, "Caught exception in \"Dispose\" method: {0}", e)); /* throw */ } } catch { // do nothing. } } disposed = true; } } #endregion /////////////////////////////////////////////////////////////////////// #region Destructor /// <summary> /// Finalizes this object instance. /// </summary> ~SQLiteModule() { Dispose(false); } #endregion } #endregion } |
Added System.Data.SQLite/SQLiteModuleEnumerable.cs.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 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 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Joe Mistachkin (joe@mistachkin.com) * * Released to the public domain, use at your own risk! ********************************************************/ using System.Collections; using System.Globalization; namespace System.Data.SQLite { #region SQLiteVirtualTableCursorEnumerable Class /// <summary> /// This class represents a virtual table cursor to be used with the /// <see cref="SQLiteModuleEnumerable" /> class. It is not sealed and may /// be used as the base class for any user-defined virtual table cursor /// class that wraps an <see cref="IEnumerator" /> object instance. /// </summary> public class SQLiteVirtualTableCursorEnumerable : SQLiteVirtualTableCursor /* NOT SEALED */ { #region Private Data /// <summary> /// The <see cref="IEnumerator" /> instance provided when this cursor /// was created. /// </summary> private IEnumerator enumerator; /////////////////////////////////////////////////////////////////////// /// <summary> /// This value will be non-zero if false has been returned from the /// <see cref="IEnumerator.MoveNext"/> method. /// </summary> private bool endOfEnumerator; #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="table"> /// The <see cref="SQLiteVirtualTable" /> object instance associated /// with this object instance. /// </param> /// <param name="enumerator"> /// The <see cref="IEnumerator" /> instance to expose as a virtual /// table cursor. /// </param> public SQLiteVirtualTableCursorEnumerable( SQLiteVirtualTable table, IEnumerator enumerator ) : base(table) { this.enumerator = enumerator; this.endOfEnumerator = true; } #endregion /////////////////////////////////////////////////////////////////////// #region Public Members /// <summary> /// Advances to the next row of the virtual table cursor using the /// <see cref="IEnumerator.MoveNext" /> method of the /// <see cref="IEnumerator" /> object instance. /// </summary> /// <returns> /// Non-zero if the current row is valid; zero otherwise. If zero is /// returned, no further rows are available. /// </returns> public virtual bool MoveNext() { CheckDisposed(); if (enumerator == null) return false; endOfEnumerator = !enumerator.MoveNext(); return !endOfEnumerator; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Returns the value for the current row of the virtual table cursor /// using the <see cref="IEnumerator.Current" /> property of the /// <see cref="IEnumerator" /> object instance. /// </summary> public virtual object Current { get { CheckDisposed(); if (enumerator == null) return null; return enumerator.Current; } } /////////////////////////////////////////////////////////////////////// /// <summary> /// Resets the virtual table cursor position, also invalidating the /// current row, using the <see cref="IEnumerator.Reset" /> method of /// the <see cref="IEnumerator" /> object instance. /// </summary> public virtual void Reset() { CheckDisposed(); if (enumerator == null) return; enumerator.Reset(); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Returns non-zero if the end of the virtual table cursor has been /// seen (i.e. no more rows are available, including the current one). /// </summary> public virtual bool EndOfEnumerator { get { CheckDisposed(); return endOfEnumerator; } } /////////////////////////////////////////////////////////////////////// /// <summary> /// Closes the virtual table cursor. /// </summary> public virtual void Close() { // CheckDisposed(); if (enumerator != null) enumerator = null; } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteVirtualTableCursorEnumerable).Name); } #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="IDisposable.Dispose" /> method. Zero if this method is /// being called from the finalizer. /// </param> protected override void Dispose(bool disposing) { try { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// Close(); disposed = true; } } finally { base.Dispose(disposing); } } #endregion } #endregion /////////////////////////////////////////////////////////////////////////// #region SQLiteModuleEnumerable Class /// <summary> /// This class implements a virtual table module that exposes an /// IEnumerable instance as a read-only virtual table. It is not sealed /// and may be used as the base class for any user-defined virtual table /// class that wraps an <see cref="IEnumerable" /> object instance. /// </summary> public class SQLiteModuleEnumerable : 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(SQLiteModuleEnumerable).Name); #endregion /////////////////////////////////////////////////////////////////////// #region Private Data /// <summary> /// The <see cref="IEnumerable" /> instance containing the backing data /// for the virtual table. /// </summary> private IEnumerable enumerable; #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="name"> /// The name of the module. This parameter cannot be null. /// </param> /// <param name="enumerable"> /// The <see cref="IEnumerable" /> instance to expose as a virtual /// table. This parameter cannot be null. /// </param> public SQLiteModuleEnumerable( string name, IEnumerable enumerable ) : base(name) { if (enumerable == null) throw new ArgumentNullException("enumerable"); this.enumerable = enumerable; } #endregion /////////////////////////////////////////////////////////////////////// #region Protected Methods /// <summary> /// Sets the table error message to one that indicates the virtual /// table cursor is of the wrong type. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance. /// </param> /// <returns> /// The value of <see cref="SQLiteErrorCode.Error"/>. /// </returns> protected virtual SQLiteErrorCode CursorTypeMismatchError( SQLiteVirtualTableCursor cursor ) { SetCursorError(cursor, "not an \"enumerable\" cursor"); return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Sets the table error message to one that indicates the virtual /// table cursor has no current row. /// </summary> /// <param name="cursor"> /// The <see cref="SQLiteVirtualTableCursor" /> object instance. /// </param> /// <returns> /// The value of <see cref="SQLiteErrorCode.Error"/>. /// </returns> protected virtual SQLiteErrorCode CursorEndOfEnumeratorError( SQLiteVirtualTableCursor cursor ) { SetCursorError(cursor, "already hit end of enumerator"); return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// Determines the string to return as the column value for the object /// instance value. /// </summary> /// <param name="value"> /// The object instance to return a string representation for. /// </param> /// <returns> /// The string representation of the specified object instance or null /// upon failure. /// </returns> protected virtual string GetStringFromObject( object value ) { if (value == null) return null; return value.ToString(); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Determines the unique row identifier for the object instance value. /// </summary> /// <param name="value"> /// The object instance to return a unique row identifier for. /// </param> /// <returns> /// The unique row identifier or zero upon failure. /// </returns> protected virtual long GetRowIdFromObject( object value ) { if (value == null) return 0; return value.GetHashCode(); } /////////////////////////////////////////////////////////////////////// /// <summary> /// Converts a <see cref="SQLiteErrorCode" /> into a boolean return /// value for use with the <see cref="ISQLiteManagedModule.Eof" /> /// method. /// </summary> /// <param name="returnCode"> /// The <see cref="SQLiteErrorCode" /> value to convert. /// </param> /// <returns> /// The <see cref="Boolean" /> value. /// </returns> protected virtual bool CodeToEofResult( SQLiteErrorCode returnCode ) { return (returnCode == SQLiteErrorCode.Ok) ? false : true; } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteManagedModule Members /// <summary> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </summary> /// <param name="connection"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="arguments"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="error"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </returns> public override SQLiteErrorCode Create( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ) { CheckDisposed(); if (DeclareTable( connection, declareSql, ref error) == SQLiteErrorCode.Ok) { table = new SQLiteVirtualTable(arguments); return SQLiteErrorCode.Ok; } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </summary> /// <param name="connection"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="arguments"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="error"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </returns> public override SQLiteErrorCode Connect( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ) { CheckDisposed(); if (DeclareTable( connection, declareSql, ref error) == SQLiteErrorCode.Ok) { table = new SQLiteVirtualTable(arguments); return SQLiteErrorCode.Ok; } return SQLiteErrorCode.Error; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </returns> public override SQLiteErrorCode BestIndex( SQLiteVirtualTable table, SQLiteIndex index ) { CheckDisposed(); if (!SetEstimatedCost(index)) { SetTableError(table, "failed to set estimated cost"); return SQLiteErrorCode.Error; } return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Disconnect" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Disconnect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Disconnect" /> method. /// </returns> public override SQLiteErrorCode Disconnect( SQLiteVirtualTable table ) { CheckDisposed(); table.Dispose(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </returns> public override SQLiteErrorCode Destroy( SQLiteVirtualTable table ) { CheckDisposed(); table.Dispose(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </returns> public override SQLiteErrorCode Open( SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor ) { CheckDisposed(); cursor = new SQLiteVirtualTableCursorEnumerable( table, enumerable.GetEnumerator()); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Close" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Close" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Close" /> method. /// </returns> public override SQLiteErrorCode Close( SQLiteVirtualTableCursor cursor ) { CheckDisposed(); SQLiteVirtualTableCursorEnumerable enumerableCursor = cursor as SQLiteVirtualTableCursorEnumerable; if (enumerableCursor == null) return CursorTypeMismatchError(cursor); enumerableCursor.Close(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <param name="indexNumber"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <param name="indexString"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <param name="values"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </returns> public override SQLiteErrorCode Filter( SQLiteVirtualTableCursor cursor, int indexNumber, string indexString, SQLiteValue[] values ) { CheckDisposed(); SQLiteVirtualTableCursorEnumerable enumerableCursor = cursor as SQLiteVirtualTableCursorEnumerable; if (enumerableCursor == null) return CursorTypeMismatchError(cursor); enumerableCursor.Filter(indexNumber, indexString, values); enumerableCursor.Reset(); /* NO RESULT */ enumerableCursor.MoveNext(); /* IGNORED */ return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Next" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Next" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Next" /> method. /// </returns> public override SQLiteErrorCode Next( SQLiteVirtualTableCursor cursor ) { CheckDisposed(); SQLiteVirtualTableCursorEnumerable enumerableCursor = cursor as SQLiteVirtualTableCursorEnumerable; if (enumerableCursor == null) return CursorTypeMismatchError(cursor); if (enumerableCursor.EndOfEnumerator) return CursorEndOfEnumeratorError(cursor); enumerableCursor.MoveNext(); /* IGNORED */ return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Eof" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Eof" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Eof" /> method. /// </returns> public override bool Eof( SQLiteVirtualTableCursor cursor ) { CheckDisposed(); SQLiteVirtualTableCursorEnumerable enumerableCursor = cursor as SQLiteVirtualTableCursorEnumerable; if (enumerableCursor == null) return CodeToEofResult(CursorTypeMismatchError(cursor)); return enumerableCursor.EndOfEnumerator; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </param> /// <param name="context"> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </returns> public override SQLiteErrorCode Column( SQLiteVirtualTableCursor cursor, SQLiteContext context, int index ) { CheckDisposed(); SQLiteVirtualTableCursorEnumerable enumerableCursor = cursor as SQLiteVirtualTableCursorEnumerable; if (enumerableCursor == null) return CursorTypeMismatchError(cursor); if (enumerableCursor.EndOfEnumerator) return CursorEndOfEnumeratorError(cursor); object current = enumerableCursor.Current; if (current != null) context.SetString(GetStringFromObject(current)); else context.SetNull(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </returns> public override SQLiteErrorCode RowId( SQLiteVirtualTableCursor cursor, ref long rowId ) { CheckDisposed(); SQLiteVirtualTableCursorEnumerable enumerableCursor = cursor as SQLiteVirtualTableCursorEnumerable; if (enumerableCursor == null) return CursorTypeMismatchError(cursor); if (enumerableCursor.EndOfEnumerator) return CursorEndOfEnumeratorError(cursor); object current = enumerableCursor.Current; rowId = GetRowIdFromObject(current); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="values"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </returns> public override SQLiteErrorCode Update( 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; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <param name="newName"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </returns> public override SQLiteErrorCode Rename( SQLiteVirtualTable table, 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; } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteModuleNoop).Name); } #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="IDisposable.Dispose" /> method. Zero if this method is /// being called from the finalizer. /// </param> protected override void Dispose(bool disposing) { try { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// disposed = true; } } finally { base.Dispose(disposing); } } #endregion } #endregion } |
Added System.Data.SQLite/SQLiteModuleNoop.cs.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 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 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Joe Mistachkin (joe@mistachkin.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { /// <summary> /// This class implements a virtual table module that does nothing. /// </summary> public class SQLiteModuleNoop : SQLiteModule /* NOT SEALED */ { #region Public Constructors /// <summary> /// Constructs an instance of this class. /// </summary> /// <param name="name"> /// The name of the module. This parameter cannot be null. /// </param> public SQLiteModuleNoop( string name ) : base(name) { // do nothing. } #endregion /////////////////////////////////////////////////////////////////////// #region ISQLiteManagedModule Members /// <summary> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </summary> /// <param name="connection"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="arguments"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <param name="error"> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Create" /> method. /// </returns> public override SQLiteErrorCode Create( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </summary> /// <param name="connection"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="arguments"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <param name="error"> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Connect" /> method. /// </returns> public override SQLiteErrorCode Connect( SQLiteConnection connection, IntPtr pClientData, string[] arguments, ref SQLiteVirtualTable table, ref string error ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.BestIndex" /> method. /// </returns> public override SQLiteErrorCode BestIndex( SQLiteVirtualTable table, SQLiteIndex index ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Disconnect" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Disconnect" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Disconnect" /> method. /// </returns> public override SQLiteErrorCode Disconnect( SQLiteVirtualTable table ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Destroy" /> method. /// </returns> public override SQLiteErrorCode Destroy( SQLiteVirtualTable table ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Open" /> method. /// </returns> public override SQLiteErrorCode Open( SQLiteVirtualTable table, ref SQLiteVirtualTableCursor cursor ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Close" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Close" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Close" /> method. /// </returns> public override SQLiteErrorCode Close( SQLiteVirtualTableCursor cursor ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <param name="indexNumber"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <param name="indexString"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <param name="values"> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Filter" /> method. /// </returns> public override SQLiteErrorCode Filter( SQLiteVirtualTableCursor cursor, int indexNumber, string indexString, SQLiteValue[] values ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Next" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Next" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Next" /> method. /// </returns> public override SQLiteErrorCode Next( SQLiteVirtualTableCursor cursor ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Eof" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Eof" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Eof" /> method. /// </returns> public override bool Eof( SQLiteVirtualTableCursor cursor ) { CheckDisposed(); return true; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </param> /// <param name="context"> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </param> /// <param name="index"> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Column" /> method. /// </returns> public override SQLiteErrorCode Column( SQLiteVirtualTableCursor cursor, SQLiteContext context, int index ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </summary> /// <param name="cursor"> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.RowId" /> method. /// </returns> public override SQLiteErrorCode RowId( SQLiteVirtualTableCursor cursor, ref long rowId ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="values"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <param name="rowId"> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Update" /> method. /// </returns> public override SQLiteErrorCode Update( SQLiteVirtualTable table, SQLiteValue[] values, ref long rowId ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Begin" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Begin" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Begin" /> method. /// </returns> public override SQLiteErrorCode Begin( SQLiteVirtualTable table ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Sync" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Sync" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Sync" /> method. /// </returns> public override SQLiteErrorCode Sync( SQLiteVirtualTable table ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Commit" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Commit" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Commit" /> method. /// </returns> public override SQLiteErrorCode Commit( SQLiteVirtualTable table ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Rollback" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Rollback" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Rollback" /> method. /// </returns> public override SQLiteErrorCode Rollback( SQLiteVirtualTable table ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="argumentCount"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="name"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="function"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <param name="pClientData"> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.FindFunction" /> method. /// </returns> public override bool FindFunction( SQLiteVirtualTable table, int argumentCount, string name, ref SQLiteFunction function, ref IntPtr pClientData ) { CheckDisposed(); return false; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <param name="newName"> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Rename" /> method. /// </returns> public override SQLiteErrorCode Rename( SQLiteVirtualTable table, string newName ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Savepoint" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Savepoint" /> method. /// </param> /// <param name="savepoint"> /// See the <see cref="ISQLiteManagedModule.Savepoint" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Savepoint" /> method. /// </returns> public override SQLiteErrorCode Savepoint( SQLiteVirtualTable table, int savepoint ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.Release" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.Release" /> method. /// </param> /// <param name="savepoint"> /// See the <see cref="ISQLiteManagedModule.Release" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.Release" /> method. /// </returns> public override SQLiteErrorCode Release( SQLiteVirtualTable table, int savepoint ) { CheckDisposed(); return SQLiteErrorCode.Ok; } /////////////////////////////////////////////////////////////////////// /// <summary> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </summary> /// <param name="table"> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </param> /// <param name="savepoint"> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </param> /// <returns> /// See the <see cref="ISQLiteManagedModule.RollbackTo" /> method. /// </returns> public override SQLiteErrorCode RollbackTo( SQLiteVirtualTable table, int savepoint ) { CheckDisposed(); return SQLiteErrorCode.Ok; } #endregion /////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members private bool disposed; /// <summary> /// Throws an <see cref="ObjectDisposedException"/> if this object /// instance has been disposed. /// </summary> private void CheckDisposed() /* throw */ { #if THROW_ON_DISPOSED if (disposed) { throw new ObjectDisposedException( typeof(SQLiteModuleNoop).Name); } #endif } /////////////////////////////////////////////////////////////////////// /// <summary> /// Disposes of this object instance. /// </summary> /// <param name="disposing"> /// Non-zero if this method is being called from the /// <see cref="IDisposable.Dispose" /> method. Zero if this method is /// being called from the finalizer. /// </param> protected override void Dispose(bool disposing) { try { if (!disposed) { //if (disposing) //{ // //////////////////////////////////// // // dispose managed resources here... // //////////////////////////////////// //} ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// disposed = true; } } finally { base.Dispose(disposing); } } #endregion } } |
Changes to System.Data.SQLite/SQLiteStatement.cs.
︙ | ︙ | |||
274 275 276 277 278 279 280 | case TypeCode.Double: return ((double)obj) != (double)0.0 ? true : false; case TypeCode.Decimal: return ((decimal)obj) != Decimal.Zero ? true : false; case TypeCode.String: return Convert.ToBoolean(obj, provider); default: | | | | > | | 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 | case TypeCode.Double: return ((double)obj) != (double)0.0 ? true : false; case TypeCode.Decimal: return ((decimal)obj) != Decimal.Zero ? true : false; case TypeCode.String: return Convert.ToBoolean(obj, provider); default: throw new SQLiteException(String.Format( CultureInfo.CurrentCulture, "Cannot convert type {0} to boolean", typeCode)); } } /// <summary> /// Perform the bind operation for an individual parameter /// </summary> /// <param name="index">The index of the parameter to bind</param> /// <param name="param">The parameter we're binding</param> private void BindParameter(int index, SQLiteParameter param) { if (param == null) throw new SQLiteException("Insufficient parameters supplied to the command"); object obj = param.Value; DbType objType = param.DbType; if ((obj != null) && (objType == DbType.Object)) objType = SQLiteConvert.TypeToDbType(obj.GetType()); |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteTransaction.cs.
︙ | ︙ | |||
195 196 197 198 199 200 201 | { if (throwError == true) throw new ArgumentNullException("No connection associated with this transaction"); else return false; } if (_cnn._version != _version) { | | | | | 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 | { if (throwError == true) throw new ArgumentNullException("No connection associated with this transaction"); else return false; } if (_cnn._version != _version) { if (throwError == true) throw new SQLiteException("The connection was closed and re-opened, changes were already rolled back"); else return false; } if (_cnn.State != ConnectionState.Open) { if (throwError == true) throw new SQLiteException("Connection was closed"); else return false; } if (_cnn._transactionLevel == 0 || _cnn._sql.AutoCommit == true) { _cnn._transactionLevel = 0; // Make sure the transaction level is reset before returning if (throwError == true) throw new SQLiteException("No transaction is active on this connection"); else return false; } return true; } } } |
Changes to System.Data.SQLite/System.Data.SQLite.Files.targets.
︙ | ︙ | |||
80 81 82 83 84 85 86 87 | Include="LINQ\SQLiteFactory_Linq.cs"> <SubType>Code</SubType> </Compile> <EmbeddedResource Include="SQLiteCommand.bmp" /> <EmbeddedResource Include="SQLiteConnection.bmp" /> <EmbeddedResource Include="SQLiteDataAdapter.bmp" /> </ItemGroup> </Project> | > > > > > > > > > > > > | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | Include="LINQ\SQLiteFactory_Linq.cs"> <SubType>Code</SubType> </Compile> <EmbeddedResource Include="SQLiteCommand.bmp" /> <EmbeddedResource Include="SQLiteConnection.bmp" /> <EmbeddedResource Include="SQLiteDataAdapter.bmp" /> </ItemGroup> <!-- ****************************************************************************** ** Virtual Table Files ** ****************************************************************************** --> <ItemGroup Condition="'$(InteropVirtualTable)' != 'false'"> <Compile Include="SQLiteModule.cs" /> <Compile Include="SQLiteModuleEnumerable.cs" /> <Compile Include="SQLiteModuleNoop.cs" /> </ItemGroup> </Project> |
Changes to System.Data.SQLite/System.Data.SQLite.Properties.targets.
︙ | ︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | <!-- NOTE: Enable counting of the CriticalHandle derived object instances? --> <PropertyGroup Condition="'$(CountHandle)' != 'false'"> <DefineConstants>$(DefineConstants);COUNT_HANDLE</DefineConstants> </PropertyGroup> <!-- NOTE: For interaction with the native SQLite implementation, use the custom build interop DLL (i.e. "SQLite.Interop.DLL")? --> <PropertyGroup Condition="'$(UseInteropDll)' != 'false'"> <DefineConstants>$(DefineConstants);USE_INTEROP_DLL</DefineConstants> </PropertyGroup> | > > > > > > > | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | <!-- NOTE: Enable counting of the CriticalHandle derived object instances? --> <PropertyGroup Condition="'$(CountHandle)' != 'false'"> <DefineConstants>$(DefineConstants);COUNT_HANDLE</DefineConstants> </PropertyGroup> <!-- NOTE: Enable tracking of bytes allocated by the SQLiteMemory class? --> <PropertyGroup Condition="'$(TrackMemoryBytes)' != 'false'"> <DefineConstants>$(DefineConstants);TRACK_MEMORY_BYTES</DefineConstants> </PropertyGroup> <!-- NOTE: For interaction with the native SQLite implementation, use the custom build interop DLL (i.e. "SQLite.Interop.DLL")? --> <PropertyGroup Condition="'$(UseInteropDll)' != 'false'"> <DefineConstants>$(DefineConstants);USE_INTEROP_DLL</DefineConstants> </PropertyGroup> |
︙ | ︙ | |||
126 127 128 129 130 131 132 | <!-- NOTE: Attempt to pre-load the native SQLite library? --> <PropertyGroup Condition="'$(PreLoadNativeLibrary)' != 'false'"> <DefineConstants>$(DefineConstants);PRELOAD_NATIVE_LIBRARY</DefineConstants> </PropertyGroup> | < < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | <!-- NOTE: Attempt to pre-load the native SQLite library? --> <PropertyGroup Condition="'$(PreLoadNativeLibrary)' != 'false'"> <DefineConstants>$(DefineConstants);PRELOAD_NATIVE_LIBRARY</DefineConstants> </PropertyGroup> <!-- NOTE: Enable support (in the managed assemblies) for encrypted databases using the CryptoAPI based codec? --> <PropertyGroup Condition="'$(InteropCodec)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_CODEC</DefineConstants> </PropertyGroup> <!-- NOTE: Enable extra diagnostics from the custom built interop DLL (see the "SQLite.NET.Settings.targets" file for more information)? --> <PropertyGroup Condition="'$(InteropDebug)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_DEBUG</DefineConstants> </PropertyGroup> <!-- NOTE: Enable support (in the managed assemblies) for the custom extension functions? --> <PropertyGroup Condition="'$(InteropExtensionFunctions)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_EXTENSION_FUNCTIONS</DefineConstants> </PropertyGroup> <!-- NOTE: Disable all use of the sqlite3_close_v2() native API and use the legacy System.Data.SQLite connection closing algorithm instead. --> <PropertyGroup Condition="'$(InteropLegacyClose)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_LEGACY_CLOSE</DefineConstants> </PropertyGroup> <!-- NOTE: Enable the logging callback in the custom built interop DLL (see the "SQLite.NET.Settings.targets" file for more information)? --> <PropertyGroup Condition="'$(InteropLog)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_LOG</DefineConstants> </PropertyGroup> <!-- NOTE: Enable support (in the managed assemblies) for the test extension? --> <PropertyGroup Condition="'$(InteropTestExtension)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_TEST_EXTENSION</DefineConstants> </PropertyGroup> <!-- NOTE: Enable including the "vtshim" module as a statically available extension? This will allow virtual tables to be implemented in managed code. --> <PropertyGroup Condition="'$(InteropVirtualTable)' != 'false'"> <DefineConstants>$(DefineConstants);INTEROP_VIRTUAL_TABLE</DefineConstants> </PropertyGroup> <!-- NOTE: Enable various Trace.WriteLine statements included in the code, based on several criteria (see the "SQLite.NET.Settings.targets" file for more information)? --> <PropertyGroup Condition="'$(TraceConnection)' != 'false'"> <DefineConstants>$(DefineConstants);TRACE_CONNECTION</DefineConstants> |
︙ | ︙ |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | ︙ | |||
628 629 630 631 632 633 634 | // parameters and handle column values of types Int64 and Double). // internal const string SQLITE_DLL = "SQLite.Interop.087.dll"; #elif SQLITE_STANDARD // // NOTE: Otherwise, if the standard SQLite library is enabled, use it. // | | | | | | 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 | // parameters and handle column values of types Int64 and Double). // internal const string SQLITE_DLL = "SQLite.Interop.087.dll"; #elif SQLITE_STANDARD // // NOTE: Otherwise, if the standard SQLite library is enabled, use it. // internal const string SQLITE_DLL = "sqlite3"; #elif USE_INTEROP_DLL // // NOTE: Otherwise, if the native SQLite interop assembly is enabled, // use it. // internal const string SQLITE_DLL = "SQLite.Interop.dll"; #else // // NOTE: Finally, assume that the mixed-mode assembly is being used. // internal const string SQLITE_DLL = "System.Data.SQLite.dll"; #endif // This section uses interop calls that also fetch text length to optimize conversion. // When using the standard dll, we can replace these calls with normal sqlite calls and // do unoptimized conversions instead afterwards #region interop added textlength calls |
︙ | ︙ | |||
703 704 705 706 707 708 709 710 711 712 713 714 715 716 | [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_value_text_interop(IntPtr p, out int len); [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_value_text16_interop(IntPtr p, out int len); #if INTEROP_LOG [DllImport(SQLITE_DLL)] internal static extern SQLiteErrorCode sqlite3_config_log_interop(); #endif #endif // !SQLITE_STANDARD | > > > | 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_value_text_interop(IntPtr p, out int len); [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_value_text16_interop(IntPtr p, out int len); [DllImport(SQLITE_DLL)] internal static extern int sqlite3_malloc_size_interop(IntPtr p); #if INTEROP_LOG [DllImport(SQLITE_DLL)] internal static extern SQLiteErrorCode sqlite3_config_log_interop(); #endif #endif // !SQLITE_STANDARD |
︙ | ︙ | |||
1056 1057 1058 1059 1060 1061 1062 | [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_interrupt(IntPtr db); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern long sqlite3_last_insert_rowid(IntPtr db); | < < < < < < < < < | 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 | [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_interrupt(IntPtr db); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern long sqlite3_last_insert_rowid(IntPtr db); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_changes(IntPtr db); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern long sqlite3_memory_used(); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern long sqlite3_memory_highwater(int resetFlag); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif |
︙ | ︙ | |||
1108 1109 1110 1111 1112 1113 1114 | [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3_bind_blob(IntPtr stmt, int index, Byte[] value, int nSize, IntPtr nTransient); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern SQLiteErrorCode sqlite3_bind_double(IntPtr stmt, int index, double value); | < < < | 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3_bind_blob(IntPtr stmt, int index, Byte[] value, int nSize, IntPtr nTransient); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern SQLiteErrorCode sqlite3_bind_double(IntPtr stmt, int index, double value); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif |
︙ | ︙ | |||
1134 1135 1136 1137 1138 1139 1140 | [DllImport(SQLITE_DLL, EntryPoint = "sqlite3_bind_int")] #endif internal static extern SQLiteErrorCode sqlite3_bind_uint(IntPtr stmt, int index, uint value); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern SQLiteErrorCode sqlite3_bind_int64(IntPtr stmt, int index, long value); | < < < < < < | 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 | [DllImport(SQLITE_DLL, EntryPoint = "sqlite3_bind_int")] #endif internal static extern SQLiteErrorCode sqlite3_bind_uint(IntPtr stmt, int index, uint value); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern SQLiteErrorCode sqlite3_bind_int64(IntPtr stmt, int index, long value); #endif // // NOTE: This really just calls "sqlite3_bind_int64"; however, it has the // correct type signature for an unsigned long (64-bit) integer. // #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, EntryPoint = "sqlite3_bind_int64", CallingConvention = CallingConvention.Cdecl)] internal static extern SQLiteErrorCode sqlite3_bind_uint64(IntPtr stmt, int index, ulong value); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif |
︙ | ︙ | |||
1196 1197 1198 1199 1200 1201 1202 | [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3_step(IntPtr stmt); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern double sqlite3_column_double(IntPtr stmt, int index); | < < < < < < | 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 | [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3_step(IntPtr stmt); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern double sqlite3_column_double(IntPtr stmt, int index); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_column_int(IntPtr stmt, int index); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern long sqlite3_column_int64(IntPtr stmt, int index); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif |
︙ | ︙ | |||
1282 1283 1284 1285 1286 1287 1288 | [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_value_bytes16(IntPtr p); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern double sqlite3_value_double(IntPtr p); | < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < | 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 | [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_value_bytes16(IntPtr p); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern double sqlite3_value_double(IntPtr p); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_value_int(IntPtr p); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern long sqlite3_value_int64(IntPtr p); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern TypeAffinity sqlite3_value_type(IntPtr p); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_blob(IntPtr context, byte[] value, int nSize, IntPtr pvReserved); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern void sqlite3_result_double(IntPtr context, double value); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_error(IntPtr context, byte[] strErr, int nLen); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_error_code(IntPtr context, SQLiteErrorCode value); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_error_toobig(IntPtr context); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_error_nomem(IntPtr context); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_value(IntPtr context, IntPtr value); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_zeroblob(IntPtr context, int nLen); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_result_int(IntPtr context, int value); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] internal static extern void sqlite3_result_int64(IntPtr context, long value); #endif #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif |
︙ | ︙ | |||
1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 | [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_db_handle(IntPtr stmt); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_next_stmt(IntPtr db, IntPtr stmt); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else | > > > > > > > | 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 | [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_db_handle(IntPtr stmt); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_db_filename(IntPtr db, IntPtr dbName); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_next_stmt(IntPtr db, IntPtr stmt); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else |
︙ | ︙ | |||
1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_backup_pagecount(IntPtr backup); #endregion } #if PLATFORM_COMPACTFRAMEWORK internal abstract class CriticalHandle : IDisposable { private bool _isClosed; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 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 | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_backup_pagecount(IntPtr backup); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern SQLiteErrorCode sqlite3_declare_vtab(IntPtr db, IntPtr zSQL); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_mprintf(IntPtr format, __arglist); #endregion // SQLite API calls that are provided by "well-known" extensions that may be statically // linked with the SQLite core native library currently in use. #region extension sqlite api calls #if INTEROP_VIRTUAL_TABLE #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_create_disposable_module(IntPtr db, IntPtr name, ref sqlite3_module module, IntPtr pClientData, xDestroyModule xDestroy); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_dispose_module(ref sqlite3_module pModule); #endif #endregion /////////////////////////////////////////////////////////////////////////// #region sqlite interop api calls (.NET Compact Framework only) #if PLATFORM_COMPACTFRAMEWORK && !SQLITE_STANDARD [DllImport(SQLITE_DLL)] internal static extern void sqlite3_last_insert_rowid_interop(IntPtr db, ref long rowId); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_memory_used_interop(ref long bytes); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_memory_highwater_interop(int resetFlag, ref long bytes); [DllImport(SQLITE_DLL)] internal static extern SQLiteErrorCode sqlite3_bind_double_interop(IntPtr stmt, int index, ref double value); [DllImport(SQLITE_DLL)] internal static extern SQLiteErrorCode sqlite3_bind_int64_interop(IntPtr stmt, int index, ref long value); [DllImport(SQLITE_DLL, EntryPoint = "sqlite3_bind_int64_interop")] internal static extern SQLiteErrorCode sqlite3_bind_uint64_interop(IntPtr stmt, int index, ref ulong value); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_column_double_interop(IntPtr stmt, int index, out double value); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_column_int64_interop(IntPtr stmt, int index, out long value); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_value_double_interop(IntPtr p, out double value); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_value_int64_interop(IntPtr p, out Int64 value); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_result_double_interop(IntPtr context, ref double value); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_result_int64_interop(IntPtr context, ref Int64 value); [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_create_disposable_module_interop( IntPtr db, IntPtr name, IntPtr pModule, int iVersion, xCreate xCreate, xConnect xConnect, xBestIndex xBestIndex, xDisconnect xDisconnect, xDestroy xDestroy, xOpen xOpen, xClose xClose, xFilter xFilter, xNext xNext, xEof xEof, xColumn xColumn, xRowId xRowId, xUpdate xUpdate, xBegin xBegin, xSync xSync, xCommit xCommit, xRollback xRollback, xFindFunction xFindFunction, xRename xRename, xSavepoint xSavepoint, xRelease xRelease, xRollbackTo xRollbackTo, IntPtr pClientData, xDestroyModule xDestroyModule); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_dispose_module_interop(IntPtr pModule); #endif // PLATFORM_COMPACTFRAMEWORK && !SQLITE_STANDARD #endregion /////////////////////////////////////////////////////////////////////////// #region Native Delegates #if INTEROP_VIRTUAL_TABLE #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xCreate( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xConnect( IntPtr pDb, IntPtr pAux, int argc, IntPtr argv, ref IntPtr pVtab, ref IntPtr pError ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xBestIndex( IntPtr pVtab, IntPtr pIndex ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xDisconnect( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xDestroy( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xOpen( IntPtr pVtab, ref IntPtr pCursor ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xClose( IntPtr pCursor ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xFilter( IntPtr pCursor, int idxNum, IntPtr idxStr, int argc, IntPtr argv ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xNext( IntPtr pCursor ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate int xEof( IntPtr pCursor ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xColumn( IntPtr pCursor, IntPtr pContext, int index ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xRowId( IntPtr pCursor, ref long rowId ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xUpdate( IntPtr pVtab, int argc, IntPtr argv, ref long rowId ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xBegin( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xSync( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xCommit( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xRollback( IntPtr pVtab ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate int xFindFunction( IntPtr pVtab, int nArg, IntPtr zName, ref SQLiteCallback callback, ref IntPtr pUserData ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xRename( IntPtr pVtab, IntPtr zNew ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xSavepoint( IntPtr pVtab, int iSavepoint ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xRelease( IntPtr pVtab, int iSavepoint ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate SQLiteErrorCode xRollbackTo( IntPtr pVtab, int iSavepoint ); /////////////////////////////////////////////////////////////////////////// #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif public delegate void xDestroyModule(IntPtr pClientData); #endif #endregion /////////////////////////////////////////////////////////////////////////// #region Native Structures #if INTEROP_VIRTUAL_TABLE [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_module { public int iVersion; public xCreate xCreate; public xConnect xConnect; public xBestIndex xBestIndex; public xDisconnect xDisconnect; public xDestroy xDestroy; public xOpen xOpen; public xClose xClose; public xFilter xFilter; public xNext xNext; public xEof xEof; public xColumn xColumn; public xRowId xRowId; public xUpdate xUpdate; public xBegin xBegin; public xSync xSync; public xCommit xCommit; public xRollback xRollback; public xFindFunction xFindFunction; public xRename xRename; /* The methods above are in version 1 of the sqlite3_module * object. Those below are for version 2 and greater. */ public xSavepoint xSavepoint; public xRelease xRelease; public xRollbackTo xRollbackTo; } /////////////////////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_vtab { public IntPtr pModule; public int nRef; /* NO LONGER USED */ public IntPtr zErrMsg; } /////////////////////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_vtab_cursor { public IntPtr pVTab; } /////////////////////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_index_constraint { public sqlite3_index_constraint( SQLiteIndexConstraint constraint ) : this() { if (constraint != null) { iColumn = constraint.iColumn; op = constraint.op; usable = constraint.usable; iTermOffset = constraint.iTermOffset; } } /////////////////////////////////////////////////////////////////////// public int iColumn; public SQLiteIndexConstraintOp op; public byte usable; public int iTermOffset; } /////////////////////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_index_orderby { public sqlite3_index_orderby( SQLiteIndexOrderBy orderBy ) : this() { if (orderBy != null) { iColumn = orderBy.iColumn; desc = orderBy.desc; } } /////////////////////////////////////////////////////////////////////// public int iColumn; /* Column number */ public byte desc; /* True for DESC. False for ASC. */ } /////////////////////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_index_constraint_usage { public sqlite3_index_constraint_usage( SQLiteIndexConstraintUsage constraintUsage ) : this() { if (constraintUsage != null) { argvIndex = constraintUsage.argvIndex; omit = constraintUsage.omit; } } /////////////////////////////////////////////////////////////////////// public int argvIndex; /* if >0, constraint is part of argv to xFilter */ public byte omit; /* Do not code a test for this constraint */ } /////////////////////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] internal struct sqlite3_index_info { /* Inputs */ public int nConstraint; /* Number of entries in aConstraint */ public IntPtr aConstraint; public int nOrderBy; public IntPtr aOrderBy; /* Outputs */ public IntPtr aConstraintUsage; public int idxNum; /* Number used to identify the index */ public string idxStr; /* String, possibly obtained from sqlite3_malloc */ public int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ public int orderByConsumed; /* True if output is already ordered */ public double estimatedCost; /* Estimated cost of using this index */ } #endif #endregion } #if PLATFORM_COMPACTFRAMEWORK internal abstract class CriticalHandle : IDisposable { private bool _isClosed; |
︙ | ︙ | |||
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 | #if PLATFORM_COMPACTFRAMEWORK internal readonly object syncRoot = new object(); #endif /////////////////////////////////////////////////////////////////////// public static implicit operator IntPtr(SQLiteConnectionHandle db) { if (db != null) { #if PLATFORM_COMPACTFRAMEWORK lock (db.syncRoot) #endif { return db.handle; } } return IntPtr.Zero; } /////////////////////////////////////////////////////////////////////// | > > > > | | > | | | > > > > > > > | 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 | #if PLATFORM_COMPACTFRAMEWORK internal readonly object syncRoot = new object(); #endif /////////////////////////////////////////////////////////////////////// private bool ownHandle; /////////////////////////////////////////////////////////////////////// public static implicit operator IntPtr(SQLiteConnectionHandle db) { if (db != null) { #if PLATFORM_COMPACTFRAMEWORK lock (db.syncRoot) #endif { return db.handle; } } return IntPtr.Zero; } /////////////////////////////////////////////////////////////////////// internal SQLiteConnectionHandle(IntPtr db, bool ownHandle) : this(ownHandle) { #if PLATFORM_COMPACTFRAMEWORK lock (syncRoot) #endif { this.ownHandle = ownHandle; SetHandle(db); } } /////////////////////////////////////////////////////////////////////// private SQLiteConnectionHandle(bool ownHandle) : base(IntPtr.Zero) { #if COUNT_HANDLE if (ownHandle) Interlocked.Increment(ref UnsafeNativeMethods.connectionCount); #endif } /////////////////////////////////////////////////////////////////////// protected override bool ReleaseHandle() { #if PLATFORM_COMPACTFRAMEWORK lock (syncRoot) #endif { if (!ownHandle) return true; } try { #if !PLATFORM_COMPACTFRAMEWORK IntPtr localHandle = Interlocked.Exchange( ref handle, IntPtr.Zero); #if SQLITE_STANDARD |
︙ | ︙ | |||
1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 | #if COUNT_HANDLE public int WasReleasedOk() { return Interlocked.Decrement( ref UnsafeNativeMethods.connectionCount); } #endif /////////////////////////////////////////////////////////////////////// public override bool IsInvalid { get { | > > > > > > > > > > > > > > > | 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 | #if COUNT_HANDLE public int WasReleasedOk() { return Interlocked.Decrement( ref UnsafeNativeMethods.connectionCount); } #endif /////////////////////////////////////////////////////////////////////// public bool OwnHandle { get { #if PLATFORM_COMPACTFRAMEWORK lock (syncRoot) #endif { return ownHandle; } } } /////////////////////////////////////////////////////////////////////// public override bool IsInvalid { get { |
︙ | ︙ |
Changes to Tests/basic.eagle.
︙ | ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | # NOTE: For the sake of backward compatibility, the "-autoRun" argument # must be first. # testClrExec $testExeFile [list -eventflags Wait -directory \ [file dirname $testExeFile] -stdout output -success 0] -autoRun \ -fileName [appendArgs \" [file nativename $fileName] \"] } error] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" list $code [expr {$code == 0 ? "" : $error}] } -cleanup { cleanupFile $fileName | > > > > > > > > > > | | 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 | # NOTE: For the sake of backward compatibility, the "-autoRun" argument # must be first. # testClrExec $testExeFile [list -eventflags Wait -directory \ [file dirname $testExeFile] -stdout output -success 0] -autoRun \ -fileName [appendArgs \" [file nativename $fileName] \"] } error] set successCount [regexp -all -- {\tSucceeded\t} $output] set failureCount [regexp -all -- {\tFailed\t} $output] set totalCount [expr {$successCount + $failureCount}] tputs $test_channel [appendArgs \ "---- found and executed " $totalCount " unit tests from \"" \ $testExeFile "\", " $successCount " passed, " $failureCount \ " failed\n"] tlog "---- BEGIN STDOUT OUTPUT\n" tlog $output tlog "\n---- END STDOUT OUTPUT\n" list $code [expr {$code == 0 ? "" : $error}] } -cleanup { cleanupFile $fileName unset -nocomplain totalCount failureCount successCount code output \ error fileName } -constraints {eagle SQLite file_System.Data.SQLite.dll file_test.exe} \ -result {0 {}}} ############################################################################### runTest {test data-1.2 {unit tests from the 'testlinq' project} -setup { # |
︙ | ︙ | |||
1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 | runTest {test data-1.28 {SetMemoryStatus method} -setup { # # NOTE: Make sure that SQLite core library is completely shutdown prior to # starting this test. # shutdownSQLite $test_channel # # NOTE: Create an instance of the core SQLite library interop wrapper class. # set sqlite3 [object create -flags +NonPublic System.Data.SQLite.SQLite3 \ | > > > > > | | 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 | runTest {test data-1.28 {SetMemoryStatus method} -setup { # # NOTE: Make sure that SQLite core library is completely shutdown prior to # starting this test. # shutdownSQLite $test_channel # # NOTE: Create an IntPtr instance with a value of zero. # set zero [object invoke -create IntPtr Zero] # # NOTE: Create an instance of the core SQLite library interop wrapper class. # set sqlite3 [object create -flags +NonPublic System.Data.SQLite.SQLite3 \ Default Unspecified null $zero null true] } -body { set result(rc1) [object invoke -flags +NonPublic $sqlite3 SetMemoryStatus \ false] set result(before) [object invoke -flags +NonPublic $sqlite3 MemoryUsed] set result(ptr1) [object invoke -create -flags +NonPublic \ |
︙ | ︙ | |||
1538 1539 1540 1541 1542 1543 1544 | # upon entry into this test (i.e. because the underlying core # library property is currently write-only). # object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \ sqlite3_config_int SQLITE_CONFIG_MEMSTATUS 1 } | | | 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 | # upon entry into this test (i.e. because the underlying core # library property is currently write-only). # object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \ sqlite3_config_int SQLITE_CONFIG_MEMSTATUS 1 } unset -nocomplain result sqlite3 zero } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \ regexp -result {^Ok Misuse Ok Ok System#IntPtr#\d+ System#IntPtr#\d+ \d+ \d+\ \d+ \d+ \d+ True True True True True True$}} ############################################################################### |
︙ | ︙ |
Changes to Tests/common.eagle.
︙ | ︙ | |||
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 | } } proc reportSQLiteResources { channel {quiet false} {collect true} } { # # NOTE: Skip all output if we are running in "quiet" mode. # if {!$quiet} then { tputs $channel "---- current memory in use by SQLite... " } if {[catch {object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods \ sqlite3_memory_used} memory] == 0} then { | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | } } proc reportSQLiteResources { channel {quiet false} {collect true} } { # # NOTE: Skip all output if we are running in "quiet" mode. # if {[haveConstraint \ defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE] && \ [haveConstraint \ defineConstant.System.Data.SQLite.TRACK_MEMORY_BYTES]} then { if {!$quiet} then { tputs $channel "---- current memory in use by SQLiteMemory... " } if {[catch {object invoke -flags +NonPublic \ System.Data.SQLite.SQLiteMemory \ bytesAllocated} memory] == 0} then { if {!$quiet} then { tputs $channel [appendArgs $memory " bytes\n"] } } else { set memory unknown if {!$quiet} then { tputs $channel [appendArgs $memory \n] } } if {!$quiet} then { tputs $channel "---- maximum memory in use by SQLiteMemory... " } if {[catch {object invoke -flags +NonPublic \ System.Data.SQLite.SQLiteMemory \ maximumBytesAllocated} memory] == 0} then { if {!$quiet} then { tputs $channel [appendArgs $memory " bytes\n"] } } else { set memory unknown if {!$quiet} then { tputs $channel [appendArgs $memory \n] } } } if {!$quiet} then { tputs $channel "---- current memory in use by SQLite... " } if {[catch {object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods \ sqlite3_memory_used} memory] == 0} then { |
︙ | ︙ | |||
1908 1909 1910 1911 1912 1913 1914 | # for the interop assembly in order to be effective. For those # options, it will be assumed that it was enabled for the interop # assembly if it was enabled for the managed assembly. # foreach defineConstant [list \ CHECK_STATE COUNT_HANDLE DEBUG INTEROP_CODEC INTEROP_DEBUG \ INTEROP_EXTENSION_FUNCTIONS INTEROP_LEGACY_CLOSE INTEROP_LOG \ | > | | | | | 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 | # for the interop assembly in order to be effective. For those # options, it will be assumed that it was enabled for the interop # assembly if it was enabled for the managed assembly. # foreach defineConstant [list \ CHECK_STATE COUNT_HANDLE DEBUG INTEROP_CODEC INTEROP_DEBUG \ INTEROP_EXTENSION_FUNCTIONS INTEROP_LEGACY_CLOSE INTEROP_LOG \ INTEROP_TEST_EXTENSION INTEROP_VIRTUAL_TABLE NET_20 NET_35 \ NET_40 NET_45 NET_COMPACT_20 PLATFORM_COMPACTFRAMEWORK \ PRELOAD_NATIVE_LIBRARY RETARGETABLE SQLITE_STANDARD \ THROW_ON_DISPOSED TRACE TRACE_CONNECTION TRACE_HANDLE \ TRACE_PRELOAD TRACE_STATEMENT TRACE_WARNING TRACK_MEMORY_BYTES \ USE_INTEROP_DLL USE_PREPARE_V2 WINDOWS] { # # NOTE: Check if the compile-time option is listed in the list of # "define constants" kept track of by the managed assembly. # checkForSQLiteDefineConstant $::test_channel $defineConstant } |
︙ | ︙ |
Added Tests/vtab.eagle.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | ############################################################################### # # vtab.eagle -- # # Written by Joe Mistachkin. # Released to the public domain, use at your own risk! # ############################################################################### package require Eagle package require Eagle.Library package require Eagle.Test runTestPrologue ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### runTest {test vtab-1.1 {virtual table support} -setup { setupDb [set fileName vtab-1.1.db] } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getDatabaseDirectory] $fileName] set sql { \ CREATE VIRTUAL TABLE t${id} USING mod${id}; \ } unset -nocomplain results errors set code [compileCSharpWith [subst { using System; using System.Data.SQLite; namespace _Dynamic${id} { public sealed class SQLiteModuleTest${id} : SQLiteModuleNoop { public SQLiteModuleTest${id}(string name) : base(name) { // do nothing. } /////////////////////////////////////////////////////////////////////// public override SQLiteErrorCode Create( SQLiteConnection connection, IntPtr pClientData, string\[\] arguments, ref SQLiteVirtualTable table, ref string error ) { SQLiteErrorCode rc = DeclareTable( connection, "CREATE TABLE ignored(x);", ref error); if (rc != SQLiteErrorCode.Ok) return rc; table = new SQLiteVirtualTable(arguments); return SQLiteErrorCode.Ok; } } ///////////////////////////////////////////////////////////////////////// public static class Test${id} { public static void Main() { using (SQLiteConnection connection = new SQLiteConnection( "Data Source=${dataSource};")) { connection.Open(); connection.CreateModule(new SQLiteModuleTest${id}("mod${id}")); using (SQLiteCommand command = connection.CreateCommand()) { command.CommandText = "[subst ${sql}]"; command.ExecuteNonQuery(); } connection.Close(); } } } } }] true true true results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result code results errors sql dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\ defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \ {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}} ############################################################################### runTest {test vtab-1.2 {IEnumerable virtual table} -setup { setupDb [set fileName vtab-1.2.db] } -body { set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getDatabaseDirectory] $fileName] set sql(1) { \ CREATE VIRTUAL TABLE t${id} USING mod${id}; \ } set sql(2) { \ SELECT * FROM t${id}; \ } set sql(3) { \ UPDATE t${id} SET x = 1; \ } unset -nocomplain results errors set code [compileCSharpWith [subst { using System; using System.Data.SQLite; using Eagle._Containers.Public; namespace _Dynamic${id} { public static class Test${id} { public static StringList GetList(params string\[\] strings) { StringList result = new StringList(); using (SQLiteConnection connection = new SQLiteConnection( "Data Source=${dataSource};")) { connection.Open(); connection.CreateModule(new SQLiteModuleEnumerable( "mod${id}", strings)); using (SQLiteCommand command = connection.CreateCommand()) { command.CommandText = "[subst ${sql(1)}]"; command.ExecuteNonQuery(); } using (SQLiteCommand command = connection.CreateCommand()) { command.CommandText = "[subst ${sql(2)}]"; using (SQLiteDataReader dataReader = command.ExecuteReader()) { while (dataReader.Read()) result.Add(dataReader\[0\].ToString()); } } using (SQLiteCommand command = connection.CreateCommand()) { command.CommandText = "[subst ${sql(3)}]"; try { command.ExecuteNonQuery(); } catch (SQLiteException e) { result.Add(e.ReturnCode.ToString()); result.Add(e.Message); } } connection.Close(); } return result; } /////////////////////////////////////////////////////////////////////// public static void Main() { // do nothing. } } } }] true true true results errors [list System.Data.SQLite.dll Eagle.dll]] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} GetList one two three 4 5.0 } result] : [set result ""]}] $result } -cleanup { cleanupDb $fileName unset -nocomplain result code results errors sql dataSource id db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\ defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE} -match regexp -result \ [string map [list \n \r\n] {^Ok System#CodeDom#Compiler#CompilerResults#\d+\ \{\} 0 \{one two three 4 5.0 Error \{SQL logic error or missing database virtual table "t\d+" is read-only\}\}$}]} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
Changes to readme.htm.
︙ | ︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 | <h2><b>Version History</b></h2> <p> <b>1.0.87.0 - June XX, 2013 <font color="red">(release scheduled)</font></b> </p> <ul> <li>The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].</li> <li>Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.</li> <li>Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].</li> </ul> <p> <b>1.0.86.0 - May 23, 2013</b> </p> | > | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | <h2><b>Version History</b></h2> <p> <b>1.0.87.0 - June XX, 2013 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for [9a544991be].</li> <li>The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].</li> <li>Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.</li> <li>Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].</li> </ul> <p> <b>1.0.86.0 - May 23, 2013</b> </p> |
︙ | ︙ |
Changes to test/TestCases.cs.
︙ | ︙ | |||
1222 1223 1224 1225 1226 1227 1228 | } } } [Test] internal void ConnectionStringBuilder() { | > > | | | | > | 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | } } } [Test] internal void ConnectionStringBuilder() { if (_fact.GetType().Name.IndexOf("SQLite", StringComparison.OrdinalIgnoreCase) > -1) { DbConnectionStringBuilder builder = _fact.CreateConnectionStringBuilder(); if (builder is SQLiteConnectionStringBuilder) { bool pool = ((SQLiteConnectionStringBuilder)builder).Pooling; } } } [Test] internal void LeakyCommands() { for (int n = 0; n < 100000; n++) |
︙ | ︙ |
Changes to testce/TestCases.cs.
︙ | ︙ | |||
215 216 217 218 219 220 221 222 223 224 225 226 227 228 | 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 { MultipleThreadStress(cnn); frm.WriteLine("SUCCESS - MultipleThreadStress"); passed++; } catch (Exception) { frm.WriteLine("FAIL - MultipleThreadStress"); failed++; } total++; try { DropTable(cnn); frm.WriteLine("SUCCESS - DropTable"); passed++; } catch (Exception) { frm.WriteLine("FAIL - DropTable"); failed++; } | > > > > | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | 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 { DropTable(cnn); frm.WriteLine("SUCCESS - DropTable"); passed++; } catch (Exception) { frm.WriteLine("FAIL - DropTable"); failed++; } |
︙ | ︙ | |||
941 942 943 944 945 946 947 948 949 950 951 952 953 954 | foreach (long value in new long[] { cnn2.LastInsertRowId, cnn2.MemoryUsed, cnn2.MemoryHighwater }) { // do nothing. } return; } throw new NotSupportedException("not a SQLite connection"); } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | foreach (long value in new long[] { cnn2.LastInsertRowId, cnn2.MemoryUsed, cnn2.MemoryHighwater }) { // do nothing. } 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) { string[] result = new string[5]; cnn2.CreateModule(new SQLiteModuleEnumerable("enumMod", new string[] { "one", "two", "three", "4", "5.0" })); using (SQLiteCommand command = cnn2.CreateCommand()) { command.CommandText = "CREATE VIRTUAL TABLE enumTab USING enumMod;"; command.ExecuteNonQuery(); } using (SQLiteCommand command = cnn2.CreateCommand()) { command.CommandText = "SELECT * FROM enumTab;"; using (SQLiteDataReader dataReader = command.ExecuteReader()) { int index = 0; while (dataReader.Read()) result[index++] = dataReader[0].ToString(); if (result[0] != "one") throw new ArgumentException("one"); if (result[1] != "two") throw new ArgumentException("two"); if (result[2] != "three") throw new ArgumentException("three"); if (result[3] != "4") throw new ArgumentException("4"); if (result[4] != "5.0") throw new ArgumentException("5.0"); } } using (SQLiteCommand command = cnn2.CreateCommand()) { command.CommandText = "UPDATE enumTab SET x = 1;"; try { command.ExecuteNonQuery(); throw new InvalidOperationException( "UPDATE should throw exception"); } catch (SQLiteException) { // do nothing. } } return; } throw new NotSupportedException("not a SQLite connection"); } |
︙ | ︙ |
Changes to www/news.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <title>News</title> <b>Version History</b> <p> <b>1.0.87.0 - June XX, 2013 <font color="red">(release scheduled)</font></b> </p> <ul> <li>The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].</li> <li>Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.</li> <li>Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].</li> </ul> <p> <b>1.0.86.0 - May 23, 2013</b> </p> | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <title>News</title> <b>Version History</b> <p> <b>1.0.87.0 - June XX, 2013 <font color="red">(release scheduled)</font></b> </p> <ul> <li>Add all the necessary infrastructure to allow virtual tables to be implemented in managed code. Fix for [9a544991be].</li> <li>The DbType to type name translation needs to prioritize the Entity Framework type names. Fix for [47f4bac575].</li> <li>Add DateTimeFormatString connection string property to allow the DateTime format string used for all parsing and formatting to be overridden.</li> <li>Disable use of the new connection string parsing algorithm when the No_SQLiteConnectionNewParser environment variable is set. Pursuant to [bbdda6eae2].</li> </ul> <p> <b>1.0.86.0 - May 23, 2013</b> </p> |
︙ | ︙ |