System.Data.SQLite

Check-in [e8abe75ff5]
Login

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

Overview
Comment:Seal various internal classes that are never derived from.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e8abe75ff5dfcbfae4d04cb306f664938e229c12
User & Date: mistachkin 2013-05-29 10:21:13.882
Context
2013-05-29
10:24
Seal one class missed in the previous commit. check-in: 499406843e user: mistachkin tags: trunk
10:21
Seal various internal classes that are never derived from. check-in: e8abe75ff5 user: mistachkin tags: trunk
10:04
Further refactoring work on the DbType/TypeName map handling. check-in: 48b50f802e user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite.Linq/Properties/Resources.Designer.cs.
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {







|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal sealed class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
Changes to System.Data.SQLite.Linq/SQL Generation/KeyToListMap.cs.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#if NET_40 || NET_45
using System.Runtime;
#endif

namespace System.Data.SQLite
{
	internal class KeyToListMap<TKey, TValue> : InternalBase
	{
		// Fields
		private Dictionary<TKey, List<TValue>> m_map;

		// Methods
		internal KeyToListMap(IEqualityComparer<TKey> comparer)
		{







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#if NET_40 || NET_45
using System.Runtime;
#endif

namespace System.Data.SQLite
{
	internal sealed class KeyToListMap<TKey, TValue> : InternalBase
	{
		// Fields
		private Dictionary<TKey, List<TValue>> m_map;

		// Methods
		internal KeyToListMap(IEqualityComparer<TKey> comparer)
		{
Changes to System.Data.SQLite.Linq/SQL Generation/SqlChecker.cs.
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!
 ********************************************************/

namespace System.Data.SQLite
{
  using System;
  using System.Collections.Generic;
  using System.Data.Common.CommandTrees;

    internal class SqlChecker : DbExpressionVisitor<bool>
  {
#if false
    private static Type sql8rewriter;

    static SqlChecker()
    {
        string version =













|







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

namespace System.Data.SQLite
{
  using System;
  using System.Collections.Generic;
  using System.Data.Common.CommandTrees;

    internal sealed class SqlChecker : DbExpressionVisitor<bool>
  {
#if false
    private static Type sql8rewriter;

    static SqlChecker()
    {
        string version =
Changes to System.Data.SQLite.Linq/SQLiteProviderManifest.cs.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  using System.Xml;
  using System.Data.Common;
  using System.Data.Metadata.Edm;

  /// <summary>
  /// The Provider Manifest for SQL Server
  /// </summary>
  internal class SQLiteProviderManifest : DbXmlEnabledProviderManifest
  {
    internal SQLiteDateFormats _dateFormat;

    /// <summary>
    /// Constructs the provider manifest.
    /// </summary>
    /// <remarks>







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  using System.Xml;
  using System.Data.Common;
  using System.Data.Metadata.Edm;

  /// <summary>
  /// The Provider Manifest for SQL Server
  /// </summary>
  internal sealed class SQLiteProviderManifest : DbXmlEnabledProviderManifest
  {
    internal SQLiteDateFormats _dateFormat;

    /// <summary>
    /// Constructs the provider manifest.
    /// </summary>
    /// <remarks>
Changes to System.Data.SQLite.Linq/SQLiteProviderServices.cs.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  using System.Data.Common.CommandTrees;
  using System.Data.Metadata.Edm;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Text;
  using System.Globalization;

  internal class SQLiteProviderServices : DbProviderServices, ISQLiteSchemaExtensions
  {
    internal static readonly SQLiteProviderServices Instance = new SQLiteProviderServices();

    protected override DbCommandDefinition CreateDbCommandDefinition(DbProviderManifest manifest, DbCommandTree commandTree)
    {
      DbCommand prototype = CreateCommand(manifest, commandTree);
      DbCommandDefinition result = this.CreateCommandDefinition(prototype);







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  using System.Data.Common.CommandTrees;
  using System.Data.Metadata.Edm;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Text;
  using System.Globalization;

  internal sealed class SQLiteProviderServices : DbProviderServices, ISQLiteSchemaExtensions
  {
    internal static readonly SQLiteProviderServices Instance = new SQLiteProviderServices();

    protected override DbCommandDefinition CreateDbCommandDefinition(DbProviderManifest manifest, DbCommandTree commandTree)
    {
      DbCommand prototype = CreateCommand(manifest, commandTree);
      DbCommandDefinition result = this.CreateCommandDefinition(prototype);
Changes to System.Data.SQLite/SQLite3_UTF16.cs.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

  using System.IO;
  using System.Runtime.InteropServices;

  /// <summary>
  /// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode)
  /// </summary>
  internal class SQLite3_UTF16 : SQLite3
  {
    internal SQLite3_UTF16(SQLiteDateFormats fmt, DateTimeKind kind)
      : base(fmt, kind)
    {
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

  using System.IO;
  using System.Runtime.InteropServices;

  /// <summary>
  /// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode)
  /// </summary>
  internal sealed class SQLite3_UTF16 : SQLite3
  {
    internal SQLite3_UTF16(SQLiteDateFormats fmt, DateTimeKind kind)
      : base(fmt, kind)
    {
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////
Changes to System.Data.SQLite/SQLiteEnlistment.cs.
1
2
3
4
5
6
7
8
9
10
11
/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/

#if !PLATFORM_COMPACTFRAMEWORK
namespace System.Data.SQLite
{
  using System.Transactions;



|







1
2
3
4
5
6
7
8
9
10
11
/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 *
 * Released to the public domain, use at your own risk!
 ********************************************************/

#if !PLATFORM_COMPACTFRAMEWORK
namespace System.Data.SQLite
{
  using System.Transactions;
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
        if (disposed)
            throw new ObjectDisposedException(typeof(SQLiteEnlistment).Name);
#endif
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////

    protected virtual void Dispose(bool disposing)
    {
        if (!disposed)
        {
            if (disposing)
            {
                ////////////////////////////////////
                // dispose managed resources here...







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
        if (disposed)
            throw new ObjectDisposedException(typeof(SQLiteEnlistment).Name);
#endif
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////

    private /* protected virtual */ void Dispose(bool disposing)
    {
        if (!disposed)
        {
            if (disposing)
            {
                ////////////////////////////////////
                // dispose managed resources here...
Changes to System.Data.SQLite/SR.Designer.cs.
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
#if !NET_COMPACT_20
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
#endif
    internal class SR {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal SR() {







|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
#if !NET_COMPACT_20
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
#endif
    internal sealed class SR {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal SR() {
Changes to test/Properties/Resources.Designer.cs.
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {







|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal sealed class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
Changes to test/TestCases.cs.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System.Data.SQLite;
using System.Transactions;
using System.Collections.Generic;
using System.Text;

namespace test
{
  internal class TestCases : TestCaseBase
  {
    private const int NumThreads = 8;
    private const int ThreadTimeout = 60000;

    private List<string> droptables = new List<string>();
    private List<string> maydroptable = new List<string>();








|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System.Data.SQLite;
using System.Transactions;
using System.Collections.Generic;
using System.Text;

namespace test
{
  internal sealed class TestCases : TestCaseBase
  {
    private const int NumThreads = 8;
    private const int ThreadTimeout = 60000;

    private List<string> droptables = new List<string>();
    private List<string> maydroptable = new List<string>();

1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
        {
          if (reader.Read() == false) throw new Exception("Failed to read from the table");
          if (reader.GetInt32(0) != 2) throw new Exception(String.Format("Expected {0} got {1}", 2, reader.GetInt32(0)));
        }
      }
    }

    internal class MTTest
    {
      internal DbConnection cnn;
      internal Exception e;
      internal System.Threading.Thread t;
      internal int value;
      internal System.Threading.ManualResetEvent ev;
    }







|







1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
        {
          if (reader.Read() == false) throw new Exception("Failed to read from the table");
          if (reader.GetInt32(0) != 2) throw new Exception(String.Format("Expected {0} got {1}", 2, reader.GetInt32(0)));
        }
      }
    }

    internal sealed class MTTest
    {
      internal DbConnection cnn;
      internal Exception e;
      internal System.Threading.Thread t;
      internal int value;
      internal System.Threading.ManualResetEvent ev;
    }
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
  internal enum TestResultEnum
  {
    Succeeded = 0,
    Failed = 1,
    Inconclusive = 2,
  }

  internal class InconclusiveException : Exception
  {
    internal InconclusiveException()
      : base()
    {
    }

    internal InconclusiveException(string message)







|







2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
  internal enum TestResultEnum
  {
    Succeeded = 0,
    Failed = 1,
    Inconclusive = 2,
  }

  internal sealed class InconclusiveException : Exception
  {
    internal InconclusiveException()
      : base()
    {
    }

    internal InconclusiveException(string message)
Changes to testce/TestCases.cs.
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
      // Make sure the string "Field3" is sorted out of order
      if (param1 == "Field3") return 1;
      if (param2 == "Field3") return -1;
      return String.Compare(param1, param2, true);
    }
  }

  internal class TestCases
  {
    internal Form1 frm;

    private string connectionString;
    private DbConnection cnn;
    private string sql;
    private bool autoClose;







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
      // Make sure the string "Field3" is sorted out of order
      if (param1 == "Field3") return 1;
      if (param2 == "Field3") return -1;
      return String.Compare(param1, param2, true);
    }
  }

  internal sealed class TestCases
  {
    internal Form1 frm;

    private string connectionString;
    private DbConnection cnn;
    private string sql;
    private bool autoClose;