System.Data.SQLite

Check-in [02e5ea34c5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add support for including extra extensions at compile-time for the custom built interop DLL.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 02e5ea34c50f3c4fe256f86ebe8853e6a3ca0bad
User & Date: mistachkin 2015-02-13 21:13:28.669
Context
2015-02-13
21:30
Refactor NuGet packages. check-in: 126b7c1987 user: mistachkin tags: trunk
21:13
Add support for including extra extensions at compile-time for the custom built interop DLL. check-in: 02e5ea34c5 user: mistachkin tags: trunk
2015-02-12
23:53
Add PrepareRetries connection string property to allow the maximum number of retries when preparing a query to be overridden. Fix for [647d282d11]. check-in: 39f91f897d user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
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_INCLUDE_CEROD)
#include "../ext/cerod.c"
#endif

#if defined(INTEROP_INCLUDE_SEE)
#include "../ext/see.c"










>
>
>
>







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_INCLUDE_EXTRA)
#include "../ext/extra.c"
#endif

#if defined(INTEROP_INCLUDE_CEROD)
#include "../ext/cerod.c"
#endif

#if defined(INTEROP_INCLUDE_SEE)
#include "../ext/see.c"
94
95
96
97
98
99
100



101
102
103
104
105
106
107
  "DEBUG=" CTIMEOPT_VAL(INTEROP_DEBUG),
#endif
#ifdef INTEROP_EXTENSION_FUNCTIONS
  "EXTENSION_FUNCTIONS",
#endif
#ifdef INTEROP_INCLUDE_CEROD
  "INCLUDE_CEROD",



#endif
#ifdef INTEROP_INCLUDE_SEE
  "INCLUDE_SEE",
#endif
#ifdef INTEROP_LEGACY_CLOSE
  "LEGACY_CLOSE",
#endif







>
>
>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
  "DEBUG=" CTIMEOPT_VAL(INTEROP_DEBUG),
#endif
#ifdef INTEROP_EXTENSION_FUNCTIONS
  "EXTENSION_FUNCTIONS",
#endif
#ifdef INTEROP_INCLUDE_CEROD
  "INCLUDE_CEROD",
#endif
#ifdef INTEROP_INCLUDE_EXTRA
  "INCLUDE_EXTRA",
#endif
#ifdef INTEROP_INCLUDE_SEE
  "INCLUDE_SEE",
#endif
#ifdef INTEROP_LEGACY_CLOSE
  "LEGACY_CLOSE",
#endif
Changes to System.Data.SQLite/SQLiteDefineConstants.cs.
35
36
37
38
39
40
41




42
43
44
45
46
47
48
#if INTEROP_EXTENSION_FUNCTIONS
            "INTEROP_EXTENSION_FUNCTIONS",
#endif

#if INTEROP_INCLUDE_CEROD
            "INTEROP_INCLUDE_CEROD",
#endif





#if INTEROP_INCLUDE_SEE
            "INTEROP_INCLUDE_SEE",
#endif

#if INTEROP_LEGACY_CLOSE
            "INTEROP_LEGACY_CLOSE",







>
>
>
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#if INTEROP_EXTENSION_FUNCTIONS
            "INTEROP_EXTENSION_FUNCTIONS",
#endif

#if INTEROP_INCLUDE_CEROD
            "INTEROP_INCLUDE_CEROD",
#endif

#if INTEROP_INCLUDE_EXTRA
            "INTEROP_INCLUDE_EXTRA",
#endif

#if INTEROP_INCLUDE_SEE
            "INTEROP_INCLUDE_SEE",
#endif

#if INTEROP_LEGACY_CLOSE
            "INTEROP_LEGACY_CLOSE",
Changes to System.Data.SQLite/Targets/System.Data.SQLite.Properties.targets.
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
  -->
  <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>

  <!--
      NOTE: For interaction with the native SQLite implementation, use the







|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
  -->
  <PropertyGroup Condition="'$(TrackMemoryBytes)' != 'false'">
    <DefineConstants>$(DefineConstants);TRACK_MEMORY_BYTES</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: For interaction with the native SQLite implementation, use the
            custom built interop DLL (i.e. "SQLite.Interop.DLL")?
  -->
  <PropertyGroup Condition="'$(UseInteropDll)' != 'false'">
    <DefineConstants>$(DefineConstants);USE_INTEROP_DLL</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: For interaction with the native SQLite implementation, use the
168
169
170
171
172
173
174









175
176
177
178
179
180
181
      NOTE: Enable support (in the managed assemblies) for compressed and
            encrypted databases using CEROD?
  -->
  <PropertyGroup Condition="'$(InteropIncludeCerod)' != 'false'">
    <DefineConstants>$(DefineConstants);INTEROP_INCLUDE_CEROD</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>







>
>
>
>
>
>
>
>
>







168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
      NOTE: Enable support (in the managed assemblies) for compressed and
            encrypted databases using CEROD?
  -->
  <PropertyGroup Condition="'$(InteropIncludeCerod)' != 'false'">
    <DefineConstants>$(DefineConstants);INTEROP_INCLUDE_CEROD</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: Enable support (in the managed assemblies) for whatever "extra"
            code (e.g. "extensions") may be included by the custom built
            interop DLL (i.e. "SQLite.Interop.DLL")?
  -->
  <PropertyGroup Condition="'$(InteropIncludeExtra)' != 'false'">
    <DefineConstants>$(DefineConstants);INTEROP_INCLUDE_EXTRA</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>
Changes to Targets/SQLite.NET.Settings.targets.
372
373
374
375
376
377
378















379
380
381
382
383
384
385

                  "SQLite.Interop\props\SQLite.Interop.20YY.[vs]props"

              both for the corresponding version(s) of Visual Studio.
    -->
    <InteropIncludeCerod Condition="'$(InteropIncludeCerod)' == ''">false</InteropIncludeCerod>
















    <!--
        NOTE: Enable extra diagnostics from the custom built interop DLL (i.e.
              "SQLite.Interop.dll")?  By default, this is enabled in the Debug
              build configuration.  If this is disabled, no extra diagnostics
              will be emitted.  If this is enabled, it must also be enabled via
              the "INTEROP_DEBUG=XX" preprocessor define being present in the
              "INTEROP_DEBUG_DEFINES" macro in the build properties file:







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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

                  "SQLite.Interop\props\SQLite.Interop.20YY.[vs]props"

              both for the corresponding version(s) of Visual Studio.
    -->
    <InteropIncludeCerod Condition="'$(InteropIncludeCerod)' == ''">false</InteropIncludeCerod>

    <!--
        NOTE: Enable including "extra" code with the custom built interop DLL
              (i.e. "SQLite.Interop.dll")?  By default, this is disabled.  If
              this is enabled, the "extra.c" file will be included from the
              extensions directory.  If this is enabled, it must also be
              enabled via the "INTEROP_INCLUDE_EXTRA=1" preprocessor define
              being present in the "INTEROP_EXTRA_DEFINES" macro in the build
              properties file:

                  "SQLite.Interop\props\SQLite.Interop.20YY.[vs]props"

              for the corresponding version(s) of Visual Studio.
    -->
    <InteropIncludeExtra Condition="'$(InteropIncludeExtra)' == ''">false</InteropIncludeExtra>

    <!--
        NOTE: Enable extra diagnostics from the custom built interop DLL (i.e.
              "SQLite.Interop.dll")?  By default, this is enabled in the Debug
              build configuration.  If this is disabled, no extra diagnostics
              will be emitted.  If this is enabled, it must also be enabled via
              the "INTEROP_DEBUG=XX" preprocessor define being present in the
              "INTEROP_DEBUG_DEFINES" macro in the build properties file:
Changes to Tests/common.eagle.
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
        #       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_INCLUDE_CEROD \
            INTEROP_INCLUDE_SEE INTEROP_LEGACY_CLOSE INTEROP_LOG \
            INTEROP_TEST_EXTENSION INTEROP_VIRTUAL_TABLE NET_20 NET_35 \
            NET_40 NET_45 NET_451 NET_COMPACT_20 PLATFORM_COMPACTFRAMEWORK \
            PRELOAD_NATIVE_LIBRARY RETARGETABLE SQLITE_STANDARD \
            THROW_ON_DISPOSED TRACE TRACE_CONNECTION TRACE_DETECTION \
            TRACE_HANDLE TRACE_PRELOAD TRACE_SHARED TRACE_STATEMENT \
            TRACE_WARNING TRACK_MEMORY_BYTES USE_ENTITY_FRAMEWORK_6 \
            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
        }








|
|
|
|
|
|
|
|







3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
        #       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_INCLUDE_CEROD \
            INTEROP_INCLUDE_EXTRA INTEROP_INCLUDE_SEE INTEROP_LEGACY_CLOSE \
            INTEROP_LOG INTEROP_TEST_EXTENSION INTEROP_VIRTUAL_TABLE NET_20 \
            NET_35 NET_40 NET_45 NET_451 NET_COMPACT_20 \
            PLATFORM_COMPACTFRAMEWORK PRELOAD_NATIVE_LIBRARY RETARGETABLE \
            SQLITE_STANDARD THROW_ON_DISPOSED TRACE TRACE_CONNECTION \
            TRACE_DETECTION TRACE_HANDLE TRACE_PRELOAD TRACE_SHARED \
            TRACE_STATEMENT TRACE_WARNING TRACK_MEMORY_BYTES \
            USE_ENTITY_FRAMEWORK_6 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
        }