@@ -35,58 +35,43 @@ public SQLite20Driver() : base(
3535 {
3636 }
3737
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 ( )
7139 {
72- get { return "@" ; }
40+ var connection = base . CreateConnection ( ) ;
41+ connection . StateChange += Connection_StateChange ;
42+ return connection ;
7343 }
7444
75- public override bool SupportsMultipleOpenReaders
45+ private static void Connection_StateChange ( object sender , StateChangeEventArgs e )
7646 {
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+ }
7858 }
7959
8060 public override IResultSetsCommand GetResultSetsCommand ( Engine . ISessionImplementor session )
8161 {
8262 return new BasicResultSetsCommand ( session ) ;
8363 }
8464
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+
9075 public override bool SupportsNullEnlistment => false ;
9176
9277 public override bool HasDelayedDistributedTransactionCompletion => true ;
0 commit comments