Skip to content

Commit e42dc89

Browse files
committed
Add new APIs.
1 parent 5415286 commit e42dc89

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

sources/TileDB.CSharp/QueryField.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ public DataType DataType
5353
}
5454
}
5555

56+
/// <summary>
57+
/// Gets whether the <see cref="QueryField"/> is nullable.
58+
/// </summary>
59+
public bool IsNullable
60+
{
61+
get
62+
{
63+
using var ctxHandle = _ctx.Handle.Acquire();
64+
using var handle = _handle.Acquire();
65+
byte result;
66+
_ctx.handle_error(Methods.tiledb_field_get_nullable(ctxHandle, handle, &result));
67+
return result != 0;
68+
}
69+
}
70+
5671
/// <summary>
5772
/// Gets the origin of the <see cref="QueryField"/>.
5873
/// </summary>

sources/TileDB.CSharp/Stats.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ public static unsafe class Stats
1818
/// </summary>
1919
public static void Disable() => ErrorHandling.ThrowOnError(Methods.tiledb_stats_disable());
2020

21+
/// <summary>
22+
/// Gets whether statistics are enabled.
23+
/// </summary>
24+
/// <seealso cref="Enable"/>
25+
/// <seealso cref="Disable"/>
26+
public static bool IsEnabled
27+
{
28+
get {
29+
byte val;
30+
ErrorHandling.ThrowOnError(Methods.tiledb_stats_is_enabled(&val));
31+
return val != 0;
32+
}
33+
}
34+
2135
/// <summary>
2236
/// Resets all previously gathered statistics.
2337
/// </summary>

0 commit comments

Comments
 (0)