Skip to content

Commit 353fe22

Browse files
committed
Support for fb_info_next_statement (#939)
1 parent ebce3a3 commit 353fe22

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient.Tests/FbDatabaseInfoTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void CompleteDatabaseInfoTest()
4242
.Where(x => !x.IsSpecialName)
4343
.Where(x => x.Name.EndsWith("Async")))
4444
{
45-
if (ServerVersion < new Version(4, 0, 0, 0) && new[] { "GetWireCryptAsync", "GetCryptPluginAsync", "GetNextAttachmentAsync" }.Contains(m.Name))
45+
if (ServerVersion < new Version(4, 0, 0, 0) && new[] { "GetWireCryptAsync", "GetCryptPluginAsync", "GetNextAttachmentAsync", "GetNextStatementAsync" }.Contains(m.Name))
4646
continue;
4747

4848
Assert.DoesNotThrowAsync(() => (Task)m.Invoke(dbInfo, new object[] { CancellationToken.None }), m.Name);

Provider/src/FirebirdSql.Data.FirebirdClient/Common/IscHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public static List<object> ParseDatabaseInfo(byte[] buffer)
7272
case IscCodes.isc_info_active_transactions:
7373
case IscCodes.isc_info_active_tran_count:
7474
case IscCodes.fb_info_next_attachment:
75+
case IscCodes.fb_info_next_statement:
7576
info.Add(VaxInteger(buffer, pos, length));
7677
break;
7778

Provider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbDatabaseInfo.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,15 @@ public Task<long> GetNextAttachmentAsync(CancellationToken cancellationToken = d
404404
return GetValueAsync<long>(IscCodes.fb_info_next_attachment, cancellationToken);
405405
}
406406

407+
public long GetNextStatement()
408+
{
409+
return GetValue<long>(IscCodes.fb_info_next_statement);
410+
}
411+
public Task<long> GetNextStatementAsync(CancellationToken cancellationToken = default)
412+
{
413+
return GetValueAsync<long>(IscCodes.fb_info_next_statement, cancellationToken);
414+
}
415+
407416
#endregion
408417

409418
#region Constructors

0 commit comments

Comments
 (0)