@@ -35,58 +35,43 @@ public SQLite20Driver() : base(
35
35
{
36
36
}
37
37
38
- public override DbConnection CreateConnection ( )
39
- {
40
- var connection = base . CreateConnection ( ) ;
41
- connection . StateChange += Connection_StateChange ;
42
- return connection ;
43
- }
44
-
45
- private static void Connection_StateChange ( object sender , StateChangeEventArgs e )
46
- {
47
- if ( ( e . OriginalState == ConnectionState . Broken || e . OriginalState == ConnectionState . Closed || e . OriginalState == ConnectionState . Connecting ) &&
48
- e . CurrentState == ConnectionState . Open )
49
- {
50
- var connection = ( DbConnection ) sender ;
51
- using ( var command = connection . CreateCommand ( ) )
52
- {
53
- // Activated foreign keys if supported by SQLite. Unknown pragmas are ignored.
54
- command . CommandText = "PRAGMA foreign_keys = ON" ;
55
- command . ExecuteNonQuery ( ) ;
56
- }
57
- }
58
- }
59
-
60
- public override bool UseNamedPrefixInSql
61
- {
62
- get { return true ; }
63
- }
64
-
65
- public override bool UseNamedPrefixInParameter
66
- {
67
- get { return true ; }
68
- }
69
-
70
- public override string NamedPrefix
38
+ public override DbConnection CreateConnection ( )
71
39
{
72
- get { return "@" ; }
40
+ var connection = base . CreateConnection ( ) ;
41
+ connection . StateChange += Connection_StateChange ;
42
+ return connection ;
73
43
}
74
44
75
- public override bool SupportsMultipleOpenReaders
45
+ private static void Connection_StateChange ( object sender , StateChangeEventArgs e )
76
46
{
77
- get { return false ; }
47
+ if ( ( e . OriginalState == ConnectionState . Broken || e . OriginalState == ConnectionState . Closed || e . OriginalState == ConnectionState . Connecting ) &&
48
+ e . CurrentState == ConnectionState . Open )
49
+ {
50
+ var connection = ( DbConnection ) sender ;
51
+ using ( var command = connection . CreateCommand ( ) )
52
+ {
53
+ // Activated foreign keys if supported by SQLite. Unknown pragmas are ignored.
54
+ command . CommandText = "PRAGMA foreign_keys = ON" ;
55
+ command . ExecuteNonQuery ( ) ;
56
+ }
57
+ }
78
58
}
79
59
80
60
public override IResultSetsCommand GetResultSetsCommand ( Engine . ISessionImplementor session )
81
61
{
82
62
return new BasicResultSetsCommand ( session ) ;
83
63
}
84
64
85
- public override bool SupportsMultipleQueries
86
- {
87
- get { return true ; }
88
- }
89
-
65
+ public override bool UseNamedPrefixInSql => true ;
66
+
67
+ public override bool UseNamedPrefixInParameter => true ;
68
+
69
+ public override string NamedPrefix => "@" ;
70
+
71
+ public override bool SupportsMultipleOpenReaders => false ;
72
+
73
+ public override bool SupportsMultipleQueries => true ;
74
+
90
75
public override bool SupportsNullEnlistment => false ;
91
76
92
77
public override bool HasDelayedDistributedTransactionCompletion => true ;
0 commit comments