System.Data.SQLite

Check-in [11811c57fd]
Login

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

Overview
Comment:Various build fixes.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | netStandard21
Files: files | file ages | folders
SHA1: 11811c57fd08fab1a50c8d3839dd99969062622b
User & Date: mistachkin 2019-10-05 19:42:14.147
Context
2019-10-05
19:45
Another build fix. check-in: 98687c3d49 user: mistachkin tags: netStandard21
19:42
Various build fixes. check-in: 11811c57fd user: mistachkin tags: netStandard21
17:58
Set executable bits. check-in: d7701b72b8 user: mistachkin tags: netStandard21
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite.Linq/AssemblyInfo.cs.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]

#if !NET_40 && !NET_45 && !NET_451 && !NET_452 && !NET_46 && !NET_461 && !NET_462 && !NET_47 && !NET_471 && !NET_472
[assembly: AllowPartiallyTrustedCallers]
#endif

[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]

// Version information for an assembly consists of the following four values:
//







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]

#if !NET_40 && !NET_45 && !NET_451 && !NET_452 && !NET_46 && !NET_461 && !NET_462 && !NET_47 && !NET_471 && !NET_472 && !NET_STANDARD_20 && !NET_STANDARD_21
[assembly: AllowPartiallyTrustedCallers]
#endif

[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]

// Version information for an assembly consists of the following four values:
//
Changes to System.Data.SQLite.Linq/SQL Generation/InternalBase.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
/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/

using System.Text;

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
using System.Runtime;
#endif

#if USE_ENTITY_FRAMEWORK_6
namespace System.Data.SQLite.EF6
#else
namespace System.Data.SQLite.Linq
#endif
{
	internal abstract class InternalBase
	{
		// Methods
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		protected InternalBase()
		{
		}

		internal abstract void ToCompactString(StringBuilder builder);
		internal virtual string ToFullString()
		{
			StringBuilder builder = new StringBuilder();
			this.ToFullString(builder);
			return builder.ToString();
		}

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		internal virtual void ToFullString(StringBuilder builder)
		{
			this.ToCompactString(builder);
		}










|












|














|







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
/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/

using System.Text;

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
using System.Runtime;
#endif

#if USE_ENTITY_FRAMEWORK_6
namespace System.Data.SQLite.EF6
#else
namespace System.Data.SQLite.Linq
#endif
{
	internal abstract class InternalBase
	{
		// Methods
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		protected InternalBase()
		{
		}

		internal abstract void ToCompactString(StringBuilder builder);
		internal virtual string ToFullString()
		{
			StringBuilder builder = new StringBuilder();
			this.ToFullString(builder);
			return builder.ToString();
		}

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		internal virtual void ToFullString(StringBuilder builder)
		{
			this.ToCompactString(builder);
		}

Changes to System.Data.SQLite.Linq/SQL Generation/KeyToListMap.cs.
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!
 ********************************************************/

using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using System.Collections;

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
using System.Runtime;
#endif

#if USE_ENTITY_FRAMEWORK_6
namespace System.Data.SQLite.EF6
#else
namespace System.Data.SQLite.Linq












|







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!
 ********************************************************/

using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using System.Collections;

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
using System.Runtime;
#endif

#if USE_ENTITY_FRAMEWORK_6
namespace System.Data.SQLite.EF6
#else
namespace System.Data.SQLite.Linq
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
			{
				return this.m_map.Keys;
			}
		}

		internal IEnumerable<KeyValuePair<TKey, List<TValue>>> KeyValuePairs
		{
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
			[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
			get
			{
				return this.m_map;
			}
		}
	}
}







|









119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
			{
				return this.m_map.Keys;
			}
		}

		internal IEnumerable<KeyValuePair<TKey, List<TValue>>> KeyValuePairs
		{
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
			[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
			get
			{
				return this.m_map;
			}
		}
	}
}
Changes to System.Data.SQLite.Linq/SQL Generation/SqlChecker.cs.
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  {
#if false
    private static Type sql8rewriter;

    static SqlChecker()
    {
        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
            "4.0.0.0";
#else
            "3.5.0.0";
#endif

        sql8rewriter = Type.GetType(String.Format("System.Data.SqlClient.SqlGen.Sql8ExpressionRewriter, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
    }







|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  {
#if false
    private static Type sql8rewriter;

    static SqlChecker()
    {
        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
            "4.0.0.0";
#else
            "3.5.0.0";
#endif

        sql8rewriter = Type.GetType(String.Format("System.Data.SqlClient.SqlGen.Sql8ExpressionRewriter, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
    }
Changes to System.Data.SQLite.Linq/SQL Generation/StringUtil.cs.
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!
 ********************************************************/

using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Collections;

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
using System.Runtime;
#endif

#if USE_ENTITY_FRAMEWORK_6
namespace System.Data.SQLite.EF6
#else
namespace System.Data.SQLite.Linq












|







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!
 ********************************************************/

using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Collections;

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
using System.Runtime;
#endif

#if USE_ENTITY_FRAMEWORK_6
namespace System.Data.SQLite.EF6
#else
namespace System.Data.SQLite.Linq
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
		}

		private static string InvariantConvertToString<T>(T value)
		{
			return string.Format(CultureInfo.InvariantCulture, "{0}", new object[] { value });
		}

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		internal static bool IsNullOrEmptyOrWhiteSpace(string value)
		{
			return IsNullOrEmptyOrWhiteSpace(value, 0);
		}








|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
		}

		private static string InvariantConvertToString<T>(T value)
		{
			return string.Format(CultureInfo.InvariantCulture, "{0}", new object[] { value });
		}

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		internal static bool IsNullOrEmptyOrWhiteSpace(string value)
		{
			return IsNullOrEmptyOrWhiteSpace(value, 0);
		}

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
		}

		internal static void ToSeparatedString(StringBuilder builder, IEnumerable list, string separator)
		{
			ToSeparatedStringPrivate(builder, list, separator, string.Empty, false);
		}

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		internal static void ToSeparatedString(StringBuilder stringBuilder, IEnumerable list, string separator, string nullValue)
		{
			ToSeparatedStringPrivate(stringBuilder, list, separator, nullValue, false);
		}








|







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
		}

		internal static void ToSeparatedString(StringBuilder builder, IEnumerable list, string separator)
		{
			ToSeparatedStringPrivate(builder, list, separator, string.Empty, false);
		}

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
		[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
#endif
		internal static void ToSeparatedString(StringBuilder stringBuilder, IEnumerable list, string separator, string nullValue)
		{
			ToSeparatedStringPrivate(stringBuilder, list, separator, nullValue, false);
		}

Changes to System.Data.SQLite.Linq/System.Data.SQLite.EF6.NetStandard21.csproj.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<!--
 *
 * System.Data.SQLite.EF6.NetStandard21.csproj -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<Project ToolsVersion="15.0">
  <!--
  ******************************************************************************
  **                     Import .NET Core SDK Properties                      **
  ******************************************************************************
  -->

  <!--









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<!--
 *
 * System.Data.SQLite.EF6.NetStandard21.csproj -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<Project ToolsVersion="16.0">
  <!--
  ******************************************************************************
  **                     Import .NET Core SDK Properties                      **
  ******************************************************************************
  -->

  <!--
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
  <!--
  ******************************************************************************
  **                        Library Project References                        **
  ******************************************************************************
  -->

  <ItemGroup>
    <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.NetStandard20.csproj">
      <Project>{AC139952-261A-4463-B6FA-AEBC25283A66}</Project>
      <Name>System.Data.SQLite.NetStandard20</Name>
      <Private>False</Private>
    </ProjectReference>
  </ItemGroup>

  <!--
  ******************************************************************************
  **                      .NET Core Assembly References                       **







|

|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
  <!--
  ******************************************************************************
  **                        Library Project References                        **
  ******************************************************************************
  -->

  <ItemGroup>
    <ProjectReference Include="..\System.Data.SQLite\System.Data.SQLite.NetStandard21.csproj">
      <Project>{AC139952-261A-4463-B6FA-AEBC25283A66}</Project>
      <Name>System.Data.SQLite.NetStandard21</Name>
      <Private>False</Private>
    </ProjectReference>
  </ItemGroup>

  <!--
  ******************************************************************************
  **                      .NET Core Assembly References                       **
Changes to System.Data.SQLite/AssemblyInfo.cs.
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//  Setting ComVisible to false makes the types in this assembly not visible
//  to COM componenets.  If you need to access a type in this assembly from
//  COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("System.Data.SQLite.Linq, PublicKey=" + System.Data.SQLite.SQLite3.PublicKey)]

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
[assembly: InternalsVisibleTo("System.Data.SQLite.EF6, PublicKey=" + System.Data.SQLite.SQLite3.PublicKey)]
#endif

[assembly: NeutralResourcesLanguage("en")]

#if !PLATFORM_COMPACTFRAMEWORK
#if !NET_40 && !NET_45 && !NET_451 && !NET_452 && !NET_46 && !NET_461 && !NET_462 && !NET_47 && !NET_471 && !NET_472
[assembly: AllowPartiallyTrustedCallers]
#endif

[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
//







|






|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//  Setting ComVisible to false makes the types in this assembly not visible
//  to COM componenets.  If you need to access a type in this assembly from
//  COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: InternalsVisibleTo("System.Data.SQLite.Linq, PublicKey=" + System.Data.SQLite.SQLite3.PublicKey)]

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
[assembly: InternalsVisibleTo("System.Data.SQLite.EF6, PublicKey=" + System.Data.SQLite.SQLite3.PublicKey)]
#endif

[assembly: NeutralResourcesLanguage("en")]

#if !PLATFORM_COMPACTFRAMEWORK
#if !NET_40 && !NET_45 && !NET_451 && !NET_452 && !NET_46 && !NET_461 && !NET_462 && !NET_47 && !NET_471 && !NET_472 && !NET_STANDARD_20 && !NET_STANDARD_21
[assembly: AllowPartiallyTrustedCallers]
#endif

[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
//
Changes to System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs.
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
        UnsafeNativeMethods.Initialize();
#endif

        SQLiteLog.Initialize(typeof(SQLiteFactory).Name);

        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
            "4.0.0.0";
#else
            "3.5.0.0";
#endif

        _dbProviderServicesType = Type.GetType(HelperMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
    }







|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
        UnsafeNativeMethods.Initialize();
#endif

        SQLiteLog.Initialize(typeof(SQLiteFactory).Name);

        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21
            "4.0.0.0";
#else
            "3.5.0.0";
#endif

        _dbProviderServicesType = Type.GetType(HelperMethods.StringFormat(CultureInfo.InvariantCulture, "System.Data.Common.DbProviderServices, System.Data.Entity, Version={0}, Culture=neutral, PublicKeyToken=b77a5c561934e089", version), false);
    }
Changes to System.Data.SQLite/SQLite3.cs.
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    protected string _fileName;
    protected SQLiteConnectionFlags _flags;
    private bool _setLogCallback;
    protected bool _usePool;
    protected int _poolVersion;
    private int _cancelCount;

#if (NET_35 || NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472) && !PLATFORM_COMPACTFRAMEWORK
    private bool _buildingSchema;
#endif

    /// <summary>
    /// The user-defined functions registered on this connection
    /// </summary>
    protected Dictionary<SQLiteFunctionAttribute, SQLiteFunction> _functions;







|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    protected string _fileName;
    protected SQLiteConnectionFlags _flags;
    private bool _setLogCallback;
    protected bool _usePool;
    protected int _poolVersion;
    private int _cancelCount;

#if (NET_35 || NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20) && !PLATFORM_COMPACTFRAMEWORK
    private bool _buildingSchema;
#endif

    /// <summary>
    /// The user-defined functions registered on this connection
    /// </summary>
    protected Dictionary<SQLiteFunctionAttribute, SQLiteFunction> _functions;
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
              }

              if (cmd != null)
                cmd.SetTypes(typedefs);

              return cmd;
            }
#if (NET_35 || NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472) && !PLATFORM_COMPACTFRAMEWORK
            else if (_buildingSchema == false && String.Compare(GetLastError(), 0, "no such table: TEMP.SCHEMA", 0, 26, StringComparison.OrdinalIgnoreCase) == 0)
            {
              strRemain = String.Empty;
              _buildingSchema = true;
              try
              {
                ISQLiteSchemaExtensions ext = ((IServiceProvider)SQLiteFactory.Instance).GetService(typeof(ISQLiteSchemaExtensions)) as ISQLiteSchemaExtensions;







|







1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
              }

              if (cmd != null)
                cmd.SetTypes(typedefs);

              return cmd;
            }
#if (NET_35 || NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20) && !PLATFORM_COMPACTFRAMEWORK
            else if (_buildingSchema == false && String.Compare(GetLastError(), 0, "no such table: TEMP.SCHEMA", 0, 26, StringComparison.OrdinalIgnoreCase) == 0)
            {
              strRemain = String.Empty;
              _buildingSchema = true;
              try
              {
                ISQLiteSchemaExtensions ext = ((IServiceProvider)SQLiteFactory.Instance).GetService(typeof(ISQLiteSchemaExtensions)) as ISQLiteSchemaExtensions;
Changes to System.Data.SQLite/SQLiteConvert.cs.
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
      typeof(UInt64),        // UInt64 (20)
      typeof(double),        // VarNumeric (21)
      typeof(string),        // AnsiStringFixedLength (22)
      typeof(string),        // StringFixedLength (23)
      typeof(string),        // ?? (24)
      typeof(string),        // Xml (25)
      typeof(DateTime),      // DateTime2 (26)
#if !PLATFORM_COMPACTFRAMEWORK && (NET_35 || NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472)
      //
      // NOTE: This type is only available on the
      //       .NET Framework 2.0 SP1 and later.
      //
      typeof(DateTimeOffset) // DateTimeOffset (27)
#else
      typeof(DateTime)       // DateTimeOffset (27)







|







1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
      typeof(UInt64),        // UInt64 (20)
      typeof(double),        // VarNumeric (21)
      typeof(string),        // AnsiStringFixedLength (22)
      typeof(string),        // StringFixedLength (23)
      typeof(string),        // ?? (24)
      typeof(string),        // Xml (25)
      typeof(DateTime),      // DateTime2 (26)
#if !PLATFORM_COMPACTFRAMEWORK && (NET_35 || NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21)
      //
      // NOTE: This type is only available on the
      //       .NET Framework 2.0 SP1 and later.
      //
      typeof(DateTimeOffset) // DateTimeOffset (27)
#else
      typeof(DateTime)       // DateTimeOffset (27)
Changes to System.Data.SQLite/System.Data.SQLite.NetStandard21.csproj.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<!--
 *
 * System.Data.SQLite.NetStandard21.csproj -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<Project ToolsVersion="15.0">
  <!--
  ******************************************************************************
  **                     Import .NET Core SDK Properties                      **
  ******************************************************************************
  -->

  <!--









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<!--
 *
 * System.Data.SQLite.NetStandard21.csproj -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<Project ToolsVersion="16.0">
  <!--
  ******************************************************************************
  **                     Import .NET Core SDK Properties                      **
  ******************************************************************************
  -->

  <!--
Changes to System.Data.SQLite/Targets/System.Data.SQLite.Properties.targets.
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
      NOTE: Only use functionality available in .NET Standard 2.0?  By default,
            this is disabled.  This must be enabled to successfully build the
            project using .NET Core 2.0 SDK (if necessary, it will typically
            be enabled from within the project file itself).
  -->
  <PropertyGroup Condition="'$(IsDotNetStandard)' != 'false' And
                            ('$(TargetFramework)' == 'netstandard2.0' Or
                             '$(TargetFramework)' == 'netcoreapp2.0')">


    <DefineConstants>$(DefineConstants);NET_STANDARD_20</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: Only use functionality available in .NET Standard 2.1?  By default,
            this is disabled.  This must be enabled to successfully build the
            project using .NET Core 3.0 SDK (if necessary, it will typically
            be enabled from within the project file itself).
  -->
  <PropertyGroup Condition="'$(IsDotNetStandard)' != 'false' And
                            ('$(TargetFramework)' == 'netstandard2.1' Or
                             '$(TargetFramework)' == 'netcoreapp2.1')">
    <DefineConstants>$(DefineConstants);NET_STANDARD_21</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: Enable extra internal state checking?
  -->
  <PropertyGroup Condition="'$(CheckState)' != 'false'">







|
>
>











|







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
      NOTE: Only use functionality available in .NET Standard 2.0?  By default,
            this is disabled.  This must be enabled to successfully build the
            project using .NET Core 2.0 SDK (if necessary, it will typically
            be enabled from within the project file itself).
  -->
  <PropertyGroup Condition="'$(IsDotNetStandard)' != 'false' And
                            ('$(TargetFramework)' == 'netstandard2.0' Or
                             '$(TargetFramework)' == 'netcoreapp2.0' Or
                             '$(TargetFramework)' == 'netcoreapp2.1' Or
                             '$(TargetFramework)' == 'netcoreapp2.2')">
    <DefineConstants>$(DefineConstants);NET_STANDARD_20</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: Only use functionality available in .NET Standard 2.1?  By default,
            this is disabled.  This must be enabled to successfully build the
            project using .NET Core 3.0 SDK (if necessary, it will typically
            be enabled from within the project file itself).
  -->
  <PropertyGroup Condition="'$(IsDotNetStandard)' != 'false' And
                            ('$(TargetFramework)' == 'netstandard2.1' Or
                             '$(TargetFramework)' == 'netcoreapp3.0')">
    <DefineConstants>$(DefineConstants);NET_STANDARD_21</DefineConstants>
  </PropertyGroup>

  <!--
      NOTE: Enable extra internal state checking?
  -->
  <PropertyGroup Condition="'$(CheckState)' != 'false'">
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#if !PLATFORM_COMPACTFRAMEWORK
  using System.Security;
#endif

  using System.Runtime.InteropServices;

#if (NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472) && !PLATFORM_COMPACTFRAMEWORK
  using System.Runtime.Versioning;
#endif

  using System.Text;

#if !PLATFORM_COMPACTFRAMEWORK || COUNT_HANDLE
  using System.Threading;







|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#if !PLATFORM_COMPACTFRAMEWORK
  using System.Security;
#endif

  using System.Runtime.InteropServices;

#if (NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_20 || NET_STANDARD_21) && !PLATFORM_COMPACTFRAMEWORK
  using System.Runtime.Versioning;
#endif

  using System.Text;

#if !PLATFORM_COMPACTFRAMEWORK || COUNT_HANDLE
  using System.Threading;
Changes to Targets/SQLite.NET.Platform.Settings.targets.
19
20
21
22
23
24
25
26


27
28
29
30
31
32
33
34
                      Exists('$(MSBuildBinPath)\xbuild.exe'))" />

  <Import Project="$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard20.Settings.targets"
          Condition="Exists('$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard20.Settings.targets') And
                     ((('$(DotNetCoreBuild)' != '' And '$(DotNetCoreBuild)' != 'false') Or
                       Exists('$(MSBuildBinPath)\MSBuild.dll')) And
                      ('$(TargetFramework)' == 'netstandard2.0' Or
                       '$(TargetFramework)' == 'netcoreapp2.0'))" />



  <Import Project="$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard21.Settings.targets"
          Condition="Exists('$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard21.Settings.targets') And
                     ((('$(DotNetCoreBuild)' != '' And '$(DotNetCoreBuild)' != 'false') Or
                       Exists('$(MSBuildBinPath)\MSBuild.dll')) And
                      ('$(TargetFramework)' == 'netstandard2.1' Or
                       '$(TargetFramework)' == 'netcoreapp2.1'))" />
</Project>







|
>
>






|

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
                      Exists('$(MSBuildBinPath)\xbuild.exe'))" />

  <Import Project="$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard20.Settings.targets"
          Condition="Exists('$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard20.Settings.targets') And
                     ((('$(DotNetCoreBuild)' != '' And '$(DotNetCoreBuild)' != 'false') Or
                       Exists('$(MSBuildBinPath)\MSBuild.dll')) And
                      ('$(TargetFramework)' == 'netstandard2.0' Or
                       '$(TargetFramework)' == 'netcoreapp2.0' Or
                       '$(TargetFramework)' == 'netcoreapp2.1' Or
                       '$(TargetFramework)' == 'netcoreapp2.2'))" />

  <Import Project="$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard21.Settings.targets"
          Condition="Exists('$(SQLiteNetDir)\Targets\SQLite.NET.NetStandard21.Settings.targets') And
                     ((('$(DotNetCoreBuild)' != '' And '$(DotNetCoreBuild)' != 'false') Or
                       Exists('$(MSBuildBinPath)\MSBuild.dll')) And
                      ('$(TargetFramework)' == 'netstandard2.1' Or
                       '$(TargetFramework)' == 'netcoreapp3.0'))" />
</Project>
Changes to testlinq/Program.cs.
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

                              return 1;
                          }
                      }

                      return BinaryGuidTest(value);
                  }
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
              case "binaryguid2":
                  {
                      bool value = false;

                      if (args.Length > 1)
                      {
                          if (!bool.TryParse(args[1], out value))
                          {
                              Console.WriteLine(
                                  "cannot parse \"{0}\" as boolean",
                                  args[1]);

                              return 1;
                          }
                      }

                      return BinaryGuidTest2(value);
                  }
#endif
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
              case "round":
                  {
                      return RoundTest();
                  }
#endif
              case "complexprimarykey":
                  {







|



















|







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

                              return 1;
                          }
                      }

                      return BinaryGuidTest(value);
                  }
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_21
              case "binaryguid2":
                  {
                      bool value = false;

                      if (args.Length > 1)
                      {
                          if (!bool.TryParse(args[1], out value))
                          {
                              Console.WriteLine(
                                  "cannot parse \"{0}\" as boolean",
                                  args[1]);

                              return 1;
                          }
                      }

                      return BinaryGuidTest2(value);
                  }
#endif
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_21
              case "round":
                  {
                      return RoundTest();
                  }
#endif
              case "complexprimarykey":
                  {
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
                          territories.Regions = db.Regions.First();

                          db.AddObject("Territories", territories);
                      }

                      try
                      {
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
                          db.SaveChanges(SaveOptions.None);
#else
                          db.SaveChanges(false);
#endif
                      }
                      catch (Exception e)
                      {







|







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
                          territories.Regions = db.Regions.First();

                          db.AddObject("Territories", territories);
                      }

                      try
                      {
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_21
                          db.SaveChanges(SaveOptions.None);
#else
                          db.SaveChanges(false);
#endif
                      }
                      catch (Exception e)
                      {
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
              }
          }
          else
          {
              using (northwindEFEntities db = new northwindEFEntities())
              {
                  bool once = false;
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
                  var query = from t in db.Territories
                    where territoryIds.AsQueryable<long>().Contains<long>(t.TerritoryID)
                    orderby t.TerritoryID
                    select t;

                  foreach (Territories territories in query)
                  {







|







515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
              }
          }
          else
          {
              using (northwindEFEntities db = new northwindEFEntities())
              {
                  bool once = false;
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_21
                  var query = from t in db.Territories
                    where territoryIds.AsQueryable<long>().Contains<long>(t.TerritoryID)
                    orderby t.TerritoryID
                    select t;

                  foreach (Territories territories in query)
                  {
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
          Environment.SetEnvironmentVariable(
              "AppendManifestToken_SQLiteProviderManifest",
              null);

          return 0;
      }

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
      //
      // NOTE: Used to test the BinaryGUID connection string property with
      //       the Contains() function (ticket [a4d9c7ee94]).  We cannot
      //       use the Contains extension method within a LINQ query with
      //       the .NET Framework 3.5.
      //
      private static int BinaryGuidTest2(bool binaryGuid)







|







728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
          Environment.SetEnvironmentVariable(
              "AppendManifestToken_SQLiteProviderManifest",
              null);

          return 0;
      }

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_21
      //
      // NOTE: Used to test the BinaryGUID connection string property with
      //       the Contains() function (ticket [a4d9c7ee94]).  We cannot
      //       use the Contains extension method within a LINQ query with
      //       the .NET Framework 3.5.
      //
      private static int BinaryGuidTest2(bool binaryGuid)
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
                  null);
          }

          Environment.SetEnvironmentVariable("SQLite_ForceLogPrepare", null);
          Trace.Listeners.Remove(listener);
      }

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472
      //
      // NOTE: Used to test the ROUND fix (i.e. being able to properly handle
      //       the two argument form).
      //
      private static int RoundTest()
      {
            using (northwindEFEntities db = new northwindEFEntities())







|







921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
                  null);
          }

          Environment.SetEnvironmentVariable("SQLite_ForceLogPrepare", null);
          Trace.Listeners.Remove(listener);
      }

#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471 || NET_472 || NET_STANDARD_21
      //
      // NOTE: Used to test the ROUND fix (i.e. being able to properly handle
      //       the two argument form).
      //
      private static int RoundTest()
      {
            using (northwindEFEntities db = new northwindEFEntities())