File tree 3 files changed +76
-1
lines changed
3 files changed +76
-1
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Data . Common ;
4
+ using System . Globalization ;
5
+ using System . Linq ;
6
+ using System . Text ;
7
+ using System . Threading . Tasks ;
8
+ using NHibernate . Id . Insert ;
9
+
10
+ namespace NHibernate . AdoNet
11
+ {
12
+ public class FirebirdDbDataReader : DbDataReaderWrapper
13
+ {
14
+ public FirebirdDbDataReader ( DbDataReader reader ) : base ( reader ) { }
15
+
16
+ public override DateTime GetDateTime ( int ordinal )
17
+ {
18
+ var value = DataReader [ ordinal ] ;
19
+
20
+ return value switch
21
+ {
22
+ string s => DateTime . Parse ( s , CultureInfo . InvariantCulture ) ,
23
+ _ => ( DateTime ) value
24
+ } ;
25
+ }
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ //------------------------------------------------------------------------------
2
+ // <auto-generated>
3
+ // This code was generated by AsyncGenerator.
4
+ //
5
+ // Changes to this file may cause incorrect behavior and will be lost if
6
+ // the code is regenerated.
7
+ // </auto-generated>
8
+ //------------------------------------------------------------------------------
9
+
10
+
11
+ using System ;
12
+ using System . Collections . Generic ;
13
+ using System . Data ;
14
+ using System . Data . Common ;
15
+ using System . Linq ;
16
+ using System . Reflection ;
17
+ using System . Text . RegularExpressions ;
18
+ using NHibernate . AdoNet ;
19
+ using NHibernate . Dialect ;
20
+ using NHibernate . SqlCommand ;
21
+ using NHibernate . SqlTypes ;
22
+ using NHibernate . Util ;
23
+ using Environment = NHibernate . Cfg . Environment ;
24
+
25
+ namespace NHibernate . Driver
26
+ {
27
+ using System . Threading . Tasks ;
28
+ using System . Threading ;
29
+ public partial class FirebirdClientDriver : ReflectionBasedDriver
30
+ {
31
+
32
+ public override async Task < DbDataReader > ExecuteReaderAsync ( DbCommand command , CancellationToken cancellationToken )
33
+ {
34
+ cancellationToken . ThrowIfCancellationRequested ( ) ;
35
+ var reader = await ( command . ExecuteReaderAsync ( cancellationToken ) ) . ConfigureAwait ( false ) ;
36
+
37
+ return new FirebirdDbDataReader ( reader ) ;
38
+ }
39
+ }
40
+ }
Original file line number Diff line number Diff line change 5
5
using System . Linq ;
6
6
using System . Reflection ;
7
7
using System . Text . RegularExpressions ;
8
+ using NHibernate . AdoNet ;
8
9
using NHibernate . Dialect ;
9
10
using NHibernate . SqlCommand ;
10
11
using NHibernate . SqlTypes ;
@@ -17,7 +18,7 @@ namespace NHibernate.Driver
17
18
/// A NHibernate Driver for using the Firebird data provider located in
18
19
/// <c>FirebirdSql.Data.FirebirdClient</c> assembly.
19
20
/// </summary>
20
- public class FirebirdClientDriver : ReflectionBasedDriver
21
+ public partial class FirebirdClientDriver : ReflectionBasedDriver
21
22
{
22
23
private const string SELECT_CLAUSE_EXP = @"(?<=\bselect\b|\bwhere\b).*" ;
23
24
private const string CAST_PARAMS_EXP =
@@ -212,5 +213,12 @@ public void ClearPool(string connectionString)
212
213
/// See http://tracker.firebirdsql.org/browse/DNET-766.
213
214
/// </summary>
214
215
public override bool SupportsEnlistmentWhenAutoEnlistmentIsDisabled => false ;
216
+
217
+ public override DbDataReader ExecuteReader ( DbCommand command )
218
+ {
219
+ var reader = command . ExecuteReader ( ) ;
220
+
221
+ return new FirebirdDbDataReader ( reader ) ;
222
+ }
215
223
}
216
224
}
You can’t perform that action at this time.
0 commit comments