Class Table<T>
This is the main entry point for interacting with a table in the Astra DB Data API.
public class Table<T> where T : class
Type Parameters
TThe type to use for rows in the table (when not specified, defaults to Row
- Inheritance
-
Table<T>
- Inherited Members
Properties
TableName
Access the name of the table
public string TableName { get; }
Property Value
Methods
Alter(IAlterTableOperation, AlterTableOptions)
This is a synchronous version of AlterAsync(IAlterTableOperation, AlterTableOptions).
public Table<T> Alter(IAlterTableOperation operation, AlterTableOptions options = null)
Parameters
operationIAlterTableOperationThe alteration operation to apply.
optionsAlterTableOptionsOptions to customize the command execution.
Returns
Remarks
The type-parameterized form of this method, AlterAsync<TRowAfterAlter>(IAlterTableOperation, AlterTableOptions), is recommended for type safety.
AlterAsync(IAlterTableOperation, AlterTableOptions)
Alters a table using the specified operation.
public Task<Table<T>> AlterAsync(IAlterTableOperation operation, AlterTableOptions options = null)
Parameters
operationIAlterTableOperationThe alteration operation to apply.
optionsAlterTableOptionsOptions to customize the command execution.
Returns
Remarks
The type-parameterized form of this method, AlterAsync<TRowAfterAlter>(IAlterTableOperation, AlterTableOptions), is recommended for type safety.
AlterAsync<TRowAfterAlter>(IAlterTableOperation, AlterTableOptions)
Alters a table using the specified operation.
public Task<Table<TRowAfterAlter>> AlterAsync<TRowAfterAlter>(IAlterTableOperation operation, AlterTableOptions options = null) where TRowAfterAlter : class
Parameters
operationIAlterTableOperationThe alteration operation to apply.
optionsAlterTableOptionsOptions to customize the command execution.
Returns
Type Parameters
TRowAfterAlterThe type representing the row after the table is altered.
Alter<TRowAfterAlter>(IAlterTableOperation, AlterTableOptions)
This is a synchronous version of AlterAsync<TRowAfterAlter>(IAlterTableOperation, AlterTableOptions).
public Table<TRowAfterAlter> Alter<TRowAfterAlter>(IAlterTableOperation operation, AlterTableOptions options = null) where TRowAfterAlter : class
Parameters
operationIAlterTableOperationThe alteration operation to apply.
optionsAlterTableOptionsOptions to customize the command execution.
Returns
Type Parameters
TRowAfterAlterThe type representing the row after the table is altered.
CreateIndex(string, string, CreateIndexOptions)
Synchronous version of CreateIndexAsync(string, string, CreateIndexOptions)
public void CreateIndex(string indexName, string columnName, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe name of the column to index
optionsCreateIndexOptions
CreateIndex(string, string, TableIndexDefinition, CreateIndexOptions)
Synchronous version of CreateIndexAsync(string, string, TableIndexDefinition, CreateIndexOptions)
public void CreateIndex(string indexName, string columnName, TableIndexDefinition indexDefinition, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe name of the column to index
indexDefinitionTableIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateIndexOptions
CreateIndexAsync(string, string, CreateIndexOptions)
Create an index on the specified column
public Task CreateIndexAsync(string indexName, string columnName, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe name of the column to index
optionsCreateIndexOptions
Returns
CreateIndexAsync(string, string, TableIndexDefinition, CreateIndexOptions)
Create an index on the specified column
public Task CreateIndexAsync(string indexName, string columnName, TableIndexDefinition indexDefinition, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe name of the column to index
indexDefinitionTableIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateIndexOptions
Returns
CreateIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, CreateIndexOptions)
Create an index on the specified column
public Task CreateIndexAsync<TColumn>(string indexName, Expression<Func<T, TColumn>> column, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The column to index
optionsCreateIndexOptions
Returns
Type Parameters
TColumn
CreateIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, TableIndexDefinition, CreateIndexOptions)
Create an index on the specified column
public Task CreateIndexAsync<TColumn>(string indexName, Expression<Func<T, TColumn>> column, TableIndexDefinition indexDefinition, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The column to index
indexDefinitionTableIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateIndexOptions
Returns
Type Parameters
TColumn
CreateIndex<TColumn>(string, Expression<Func<T, TColumn>>, CreateIndexOptions)
Synchronous version of CreateIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, CreateIndexOptions)
public void CreateIndex<TColumn>(string indexName, Expression<Func<T, TColumn>> column, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The column to index
optionsCreateIndexOptions
Type Parameters
TColumn
CreateIndex<TColumn>(string, Expression<Func<T, TColumn>>, TableIndexDefinition, CreateIndexOptions)
Synchronous version of CreateIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, TableIndexDefinition, CreateIndexOptions)
public void CreateIndex<TColumn>(string indexName, Expression<Func<T, TColumn>> column, TableIndexDefinition indexDefinition, CreateIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The column to index
indexDefinitionTableIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateIndexOptions
Type Parameters
TColumn
CreateTextIndex(string, string, CreateTextIndexOptions)
Synchronous version of CreateTextIndexAsync(string, string, CreateTextIndexOptions)
public void CreateTextIndex(string indexName, string columnName, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe text column to index
optionsCreateTextIndexOptions
CreateTextIndex(string, string, TableTextIndexDefinition, CreateTextIndexOptions)
Synchronous version of CreateTextIndexAsync(string, string, TableTextIndexDefinition, CreateTextIndexOptions)
public void CreateTextIndex(string indexName, string columnName, TableTextIndexDefinition indexDefinition, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe text column to index
indexDefinitionTableTextIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateTextIndexOptions
CreateTextIndexAsync(string, string, CreateTextIndexOptions)
Create a text index on the specified column
public Task CreateTextIndexAsync(string indexName, string columnName, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe text column to index
optionsCreateTextIndexOptions
Returns
CreateTextIndexAsync(string, string, TableTextIndexDefinition, CreateTextIndexOptions)
Create a text index on the specified column
public Task CreateTextIndexAsync(string indexName, string columnName, TableTextIndexDefinition indexDefinition, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe text column to index
indexDefinitionTableTextIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateTextIndexOptions
Returns
CreateTextIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, CreateTextIndexOptions)
Create a text index on the specified column
public Task CreateTextIndexAsync<TColumn>(string indexName, Expression<Func<T, TColumn>> column, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The text column to index
optionsCreateTextIndexOptions
Returns
Type Parameters
TColumnThe type of the column to index
CreateTextIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, TableTextIndexDefinition, CreateTextIndexOptions)
Create a text index on the specified column
public Task CreateTextIndexAsync<TColumn>(string indexName, Expression<Func<T, TColumn>> column, TableTextIndexDefinition indexDefinition, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The text column to index
indexDefinitionTableTextIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateTextIndexOptions
Returns
Type Parameters
TColumnThe type of the column to index
CreateTextIndex<TColumn>(string, Expression<Func<T, TColumn>>, CreateTextIndexOptions)
Synchronous version of CreateTextIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, CreateTextIndexOptions)
public void CreateTextIndex<TColumn>(string indexName, Expression<Func<T, TColumn>> column, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The text column to index
optionsCreateTextIndexOptions
Type Parameters
TColumnThe type of the column to index
CreateTextIndex<TColumn>(string, Expression<Func<T, TColumn>>, TableTextIndexDefinition, CreateTextIndexOptions)
Synchronous version of CreateTextIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, TableTextIndexDefinition, CreateTextIndexOptions)
public void CreateTextIndex<TColumn>(string indexName, Expression<Func<T, TColumn>> column, TableTextIndexDefinition indexDefinition, CreateTextIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The text column to index
indexDefinitionTableTextIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateTextIndexOptions
Type Parameters
TColumnThe type of the column to index
CreateVectorIndex(string, string, CreateVectorIndexOptions)
Synchronous version of CreateVectorIndexAsync(string, string, CreateVectorIndexOptions)
public void CreateVectorIndex(string indexName, string columnName, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe vector column to index
optionsCreateVectorIndexOptions
CreateVectorIndex(string, string, TableVectorIndexDefinition, CreateVectorIndexOptions)
Synchronous version of CreateVectorIndexAsync(string, string, TableVectorIndexDefinition, CreateVectorIndexOptions)
public void CreateVectorIndex(string indexName, string columnName, TableVectorIndexDefinition indexDefinition, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe vector column to index
indexDefinitionTableVectorIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateVectorIndexOptions
CreateVectorIndexAsync(string, string, CreateVectorIndexOptions)
Create a vector index on the specified column
public Task CreateVectorIndexAsync(string indexName, string columnName, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe vector column to index
optionsCreateVectorIndexOptions
Returns
CreateVectorIndexAsync(string, string, TableVectorIndexDefinition, CreateVectorIndexOptions)
Create a vector index on the specified column
public Task CreateVectorIndexAsync(string indexName, string columnName, TableVectorIndexDefinition indexDefinition, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnNamestringThe vector column to index
indexDefinitionTableVectorIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateVectorIndexOptions
Returns
CreateVectorIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, CreateVectorIndexOptions)
Create a vector index on the specified column
public Task CreateVectorIndexAsync<TColumn>(string indexName, Expression<Func<T, TColumn>> column, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The vector column to index
optionsCreateVectorIndexOptions
Returns
Type Parameters
TColumnThe type of the column to index
CreateVectorIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, TableVectorIndexDefinition, CreateVectorIndexOptions)
Create a vector index on the specified column
public Task CreateVectorIndexAsync<TColumn>(string indexName, Expression<Func<T, TColumn>> column, TableVectorIndexDefinition indexDefinition, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The vector column to index
indexDefinitionTableVectorIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateVectorIndexOptions
Returns
Type Parameters
TColumnThe type of the column to index
CreateVectorIndex<TColumn>(string, Expression<Func<T, TColumn>>, CreateVectorIndexOptions)
Synchronous version of CreateVectorIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, CreateVectorIndexOptions)
public void CreateVectorIndex<TColumn>(string indexName, Expression<Func<T, TColumn>> column, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The vector column to index
optionsCreateVectorIndexOptions
Type Parameters
TColumnThe type of the column to index
CreateVectorIndex<TColumn>(string, Expression<Func<T, TColumn>>, TableVectorIndexDefinition, CreateVectorIndexOptions)
Synchronous version of CreateVectorIndexAsync<TColumn>(string, Expression<Func<T, TColumn>>, TableVectorIndexDefinition, CreateVectorIndexOptions)
public void CreateVectorIndex<TColumn>(string indexName, Expression<Func<T, TColumn>> column, TableVectorIndexDefinition indexDefinition, CreateVectorIndexOptions options = null)
Parameters
indexNamestringThe index name
columnExpression<Func<T, TColumn>>The vector column to index
indexDefinitionTableVectorIndexDefinitionUse TableIndex to create the appropriate index definition.
optionsCreateVectorIndexOptions
Type Parameters
TColumnThe type of the column to index
DeleteMany(TableFilter<T>, TableDeleteManyOptions)
Synchronous version of DeleteManyAsync(TableFilter<T>, TableDeleteManyOptions)
public void DeleteMany(TableFilter<T> filter, TableDeleteManyOptions options = null)
Parameters
filterTableFilter<T>The filter to match rows.
optionsTableDeleteManyOptionsOptions for the delete operation.
DeleteManyAsync(TableFilter<T>, TableDeleteManyOptions)
Delete all rows matching the filter from the table.
public Task DeleteManyAsync(TableFilter<T> filter, TableDeleteManyOptions options = null)
Parameters
filterTableFilter<T>The filter to match rows.
optionsTableDeleteManyOptionsOptions for the delete operation.
Returns
- Task
A task representing the asynchronous operation.
DeleteOne(TableFilter<T>, TableDeleteOneOptions)
Synchronous version of DeleteOneAsync(TableFilter<T>, TableDeleteOneOptions)
public void DeleteOne(TableFilter<T> filter, TableDeleteOneOptions options = null)
Parameters
filterTableFilter<T>The filter to match rows.
optionsTableDeleteOneOptionsOptions for the delete operation.
DeleteOneAsync(TableFilter<T>, TableDeleteOneOptions)
Delete a row from the table.
public Task DeleteOneAsync(TableFilter<T> filter, TableDeleteOneOptions options = null)
Parameters
filterTableFilter<T>The filter to match rows.
optionsTableDeleteOneOptionsOptions for the delete operation.
Returns
- Task
A task representing the asynchronous operation.
Drop(DropTableOptions)
Synchronous version of DropAsync(DropTableOptions)
public void Drop(DropTableOptions options = null)
Parameters
optionsDropTableOptionsAdditional options for the drop operation. Keyspace overriding is not allowed..
DropAsync(DropTableOptions)
Drops the table from the database.
public Task DropAsync(DropTableOptions options = null)
Parameters
optionsDropTableOptionsAdditional options for the drop operation. Keyspace overriding is not allowed..
Returns
Find(TableFilter<T>, TableFindOptions<T>)
Find rows in the table.
The Find() methods return a TableFindCursor<T, TResult> object that can be used to further structure the query by adding Sort, Projection, Skip, Limit, etc. to affect the final results.
The TableFindCursor<T, TResult> object can be directly enumerated both synchronously and asynchronously.
public TableFindCursor<T> Find(TableFilter<T> filter, TableFindOptions<T> options = null)
Parameters
filterTableFilter<T>optionsTableFindOptions<T>
Returns
Examples
Synchronous Enumeration:
var cursor = table.Find();
foreach (var row in cursor)
{
// Process row
}
Asynchronous Enumeration:
var results = table.Find();
await foreach (var row in results)
{
// Process row
}
Remarks
Timeouts passed in the TableFindOptions<T> (ConnectionTimeout
and RequestTimeout) will be used for each batched request to the API,
however BulkOperationCancellationToken settings are ignored due to the nature of Enumeration.
If you need to enforce a timeout for the entire operation, you can pass a CancellationToken to GetAsyncEnumerator.
Find(TableFindOptions<T>)
Find rows in the table.
The Find() methods return a TableFindCursor<T, TResult> object that can be used to further structure the query by adding Sort, Projection, Skip, Limit, etc. to affect the final results.
The TableFindCursor<T, TResult> object can be directly enumerated both synchronously and asynchronously.
public TableFindCursor<T> Find(TableFindOptions<T> options = null)
Parameters
optionsTableFindOptions<T>
Returns
Examples
Synchronous Enumeration:
var cursor = table.Find();
foreach (var row in cursor)
{
// Process row
}
Asynchronous Enumeration:
var results = table.Find();
await foreach (var row in results)
{
// Process row
}
Remarks
Timeouts passed in the TableFindOptions<T> (ConnectionTimeout
and RequestTimeout) will be used for each batched request to the API,
however BulkOperationCancellationToken settings are ignored due to the nature of Enumeration.
If you need to enforce a timeout for the entire operation, you can pass a CancellationToken to GetAsyncEnumerator.
FindOne(TableFilter<T>, TableFindOneOptions<T>)
Find a single row in the table using the specified find options.
public T FindOne(TableFilter<T> filter, TableFindOneOptions<T> options = null)
Parameters
filterTableFilter<T>optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- T
FindOne(TableFindOneOptions<T>)
Find a single row in the table using the specified find options.
public T FindOne(TableFindOneOptions<T> options = null)
Parameters
optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- T
FindOneAsync(TableFilter<T>, TableFindOneOptions<T>)
Find a single row in the table using the specified find options.
public Task<T> FindOneAsync(TableFilter<T> filter, TableFindOneOptions<T> options = null)
Parameters
filterTableFilter<T>optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- Task<T>
FindOneAsync(TableFindOneOptions<T>)
Find a single row in the table using the specified find options.
public Task<T> FindOneAsync(TableFindOneOptions<T> options = null)
Parameters
optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- Task<T>
FindOneAsync<TResult>(TableFilter<T>, TableFindOneOptions<T>)
Find a single row in the table, specifying a different result row class type TResult
(useful when you want to project only certain fields).
public Task<TResult> FindOneAsync<TResult>(TableFilter<T> filter, TableFindOneOptions<T> options = null) where TResult : class
Parameters
filterTableFilter<T>optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- Task<TResult>
Type Parameters
TResult
FindOneAsync<TResult>(TableFindOneOptions<T>)
Find a single row in the table, specifying a different result row class type TResult
(useful when you want to project only certain fields).
public Task<TResult> FindOneAsync<TResult>(TableFindOneOptions<T> options = null) where TResult : class
Parameters
optionsTableFindOneOptions<T>
Returns
- Task<TResult>
Type Parameters
TResult
FindOne<TResult>(TableFilter<T>, TableFindOneOptions<T>)
Find a single row in the table, specifying a different result row class type TResult
(useful when you want to project only certain fields).
public TResult FindOne<TResult>(TableFilter<T> filter, TableFindOneOptions<T> options = null) where TResult : class
Parameters
filterTableFilter<T>optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- TResult
Type Parameters
TResult
FindOne<TResult>(TableFindOneOptions<T>)
Find a single row in the table, specifying a different result row class type TResult
(useful when you want to project only certain fields).
public TResult FindOne<TResult>(TableFindOneOptions<T> options = null) where TResult : class
Parameters
optionsTableFindOneOptions<T>Specify Sort options for the find operation.
Returns
- TResult
Type Parameters
TResult
Find<TResult>(TableFilter<T>, TableFindOptions<T>)
Find rows in the table.
The Find() methods return a TableFindCursor<T, TResult> object that can be used to further structure the query by adding Sort, Projection, Skip, Limit, etc. to affect the final results.
The TableFindCursor<T, TResult> object can be directly enumerated both synchronously and asynchronously.
public TableFindCursor<T, TResult> Find<TResult>(TableFilter<T> filter, TableFindOptions<T> options = null) where TResult : class
Parameters
filterTableFilter<T>optionsTableFindOptions<T>
Returns
- TableFindCursor<T, TResult>
Type Parameters
TResult
Examples
Synchronous Enumeration:
var cursor = table.Find();
foreach (var row in cursor)
{
// Process row
}
Asynchronous Enumeration:
var results = table.Find();
await foreach (var row in results)
{
// Process row
}
Remarks
Timeouts passed in the TableFindOptions<T> (ConnectionTimeout
and RequestTimeout) will be used for each batched request to the API,
however BulkOperationCancellationToken settings are ignored due to the nature of Enumeration.
If you need to enforce a timeout for the entire operation, you can pass a CancellationToken to GetAsyncEnumerator.
Find<TResult>(TableFindOptions<T>)
Find rows in the table.
The Find() methods return a TableFindCursor<T, TResult> object that can be used to further structure the query by adding Sort, Projection, Skip, Limit, etc. to affect the final results.
The TableFindCursor<T, TResult> object can be directly enumerated both synchronously and asynchronously.
public TableFindCursor<T, TResult> Find<TResult>(TableFindOptions<T> options = null) where TResult : class
Parameters
optionsTableFindOptions<T>
Returns
- TableFindCursor<T, TResult>
Type Parameters
TResult
Examples
Synchronous Enumeration:
var cursor = table.Find();
foreach (var row in cursor)
{
// Process row
}
Asynchronous Enumeration:
var results = table.Find();
await foreach (var row in results)
{
// Process row
}
Remarks
Timeouts passed in the TableFindOptions<T> (ConnectionTimeout
and RequestTimeout) will be used for each batched request to the API,
however BulkOperationCancellationToken settings are ignored due to the nature of Enumeration.
If you need to enforce a timeout for the entire operation, you can pass a CancellationToken to GetAsyncEnumerator.
InsertMany(List<T>, TableInsertManyOptions)
Synchronous version of InsertManyAsync(List<T>, TableInsertManyOptions)
public TableInsertManyResult InsertMany(List<T> rows, TableInsertManyOptions options = null)
Parameters
rowsList<T>The list of rows to insert.
optionsTableInsertManyOptionsAllows specifying the insertion chunk size, ordered/unordered mode, concurrency, as well as other generic command-execution options.
Returns
InsertManyAsync(List<T>, TableInsertManyOptions)
Insert multiple rows into the table.
public Task<TableInsertManyResult> InsertManyAsync(List<T> rows, TableInsertManyOptions options = null)
Parameters
rowsList<T>The list of rows to insert.
optionsTableInsertManyOptionsAllows specifying the insertion chunk size, ordered/unordered mode, concurrency, as well as other generic command-execution options.
Returns
InsertOne(T, TableInsertOneOptions)
Synchronous version of InsertOneAsync(T, TableInsertOneOptions)
public TableInsertOneResult InsertOne(T row, TableInsertOneOptions options = null)
Parameters
rowTThe row to insert.
optionsTableInsertOneOptionsOptions for the insert operation.
Returns
InsertOneAsync(T, TableInsertOneOptions)
Insert a row into the table.
public Task<TableInsertOneResult> InsertOneAsync(T row, TableInsertOneOptions options = null)
Parameters
rowTThe row to insert.
optionsTableInsertOneOptionsOptions for the insert operation.
Returns
ListIndexNames(ListIndexNamesOptions)
Synchronous version of ListIndexNamesAsync(ListIndexNamesOptions)
public List<string> ListIndexNames(ListIndexNamesOptions options = null)
Parameters
optionsListIndexNamesOptions
Returns
ListIndexNamesAsync(ListIndexNamesOptions)
Get a list of index names for the table.
public Task<List<string>> ListIndexNamesAsync(ListIndexNamesOptions options = null)
Parameters
optionsListIndexNamesOptions
Returns
ListIndexes(ListIndexesOptions)
Synchronous version of ListIndexesAsync(ListIndexesOptions)
public List<TableIndexMetadata> ListIndexes(ListIndexesOptions options = null)
Parameters
optionsListIndexesOptions
Returns
ListIndexesAsync(ListIndexesOptions)
Get a list of indexes for the table.
public Task<List<TableIndexMetadata>> ListIndexesAsync(ListIndexesOptions options = null)
Parameters
optionsListIndexesOptions
Returns
UpdateOne(TableFilter<T>, UpdateBuilder<T>, TableUpdateOneOptions)
Synchronous version of UpdateOneAsync(TableFilter<T>, UpdateBuilder<T>, TableUpdateOneOptions)
public void UpdateOne(TableFilter<T> filter, UpdateBuilder<T> update, TableUpdateOneOptions options = null)
Parameters
filterTableFilter<T>The filter to match rows.
updateUpdateBuilder<T>The update operations to apply.
optionsTableUpdateOneOptionsOptions for the update operation.
UpdateOneAsync(TableFilter<T>, UpdateBuilder<T>, TableUpdateOneOptions)
Update a single row in the table using the provided filter and update builder.
public Task UpdateOneAsync(TableFilter<T> filter, UpdateBuilder<T> update, TableUpdateOneOptions options = null)
Parameters
filterTableFilter<T>The filter to match rows.
updateUpdateBuilder<T>The update operations to apply.
optionsTableUpdateOneOptionsOptions for the update operation.
Returns
- Task
A task representing the asynchronous operation.