File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
FirebirdSql.Data.FirebirdClient.Tests
FirebirdSql.Data.FirebirdClient Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public void CompleteDatabaseInfoTest()
5252 nameof ( FbDatabaseInfo . GetDbFileIdAsync ) ,
5353 nameof ( FbDatabaseInfo . GetDbGuidAsync ) ,
5454 nameof ( FbDatabaseInfo . GetCreationTimestampAsync ) ,
55+ nameof ( FbDatabaseInfo . GetProtocolVersionAsync ) ,
5556 } . Contains ( m . Name ) )
5657 continue ;
5758
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public static List<object> ParseDatabaseInfo(byte[] buffer)
7373 case IscCodes . isc_info_active_tran_count :
7474 case IscCodes . fb_info_next_attachment :
7575 case IscCodes . fb_info_next_statement :
76+ case IscCodes . fb_info_protocol_version :
7677 info . Add ( VaxInteger ( buffer , pos , length ) ) ;
7778 break ;
7879
Original file line number Diff line number Diff line change @@ -450,6 +450,15 @@ public Task<FbZonedDateTime> GetCreationTimestampAsync(CancellationToken cancell
450450 return GetValueAsync < FbZonedDateTime > ( IscCodes . fb_info_creation_timestamp_tz , cancellationToken ) ;
451451 }
452452
453+ public int GetProtocolVersion ( )
454+ {
455+ return GetValue < int > ( IscCodes . fb_info_protocol_version ) ;
456+ }
457+ public Task < int > GetProtocolVersionAsync ( CancellationToken cancellationToken = default )
458+ {
459+ return GetValueAsync < int > ( IscCodes . fb_info_protocol_version , cancellationToken ) ;
460+ }
461+
453462 #endregion
454463
455464 #region Constructors
@@ -473,7 +482,7 @@ private T GetValue<T>(byte item)
473482 IscCodes . isc_info_end
474483 } ;
475484 var info = Connection . InnerConnection . Database . GetDatabaseInfo ( items ) ;
476- return info . Any ( ) ? ConvertValue < T > ( info [ 0 ] ) : default ;
485+ return info . Any ( ) ? ConvertValue < T > ( info [ 0 ] ) : default ;
477486 }
478487 private async Task < T > GetValueAsync < T > ( byte item , CancellationToken cancellationToken = default )
479488 {
You can’t perform that action at this time.
0 commit comments