Encapsulates the text and parameters of a database command.
public struct DbConnectorCommand
name | description |
---|---|
CommandType { get; } | The CommandType of the command. |
Connector { get; } | The connector of the command. |
IsCached { get; } | True after Cache is called. |
IsPrepared { get; } | True after Prepare is called. |
Parameters { get; } | The parameters of the command. |
Text { get; } | The text of the command. |
Timeout { get; } | The timeout of the command. |
Cache() | Caches the command. |
Create() | Creates an IDbCommand from the text and parameters. |
CreateAsync(…) | Creates an IDbCommand from the text and parameters. |
Enumerate<T>() | Executes the query, reading one record at a time and converting it to the specified type. |
Enumerate<T>(…) | Executes the query, reading one record at a time and converting it to the specified type with the specified delegate. |
EnumerateAsync<T>(…) | Executes the query, reading one record at a time and converting it to the specified type. (2 methods) |
Execute() | Executes the command, returning the number of rows affected. |
ExecuteAsync(…) | Executes the command, returning the number of rows affected. |
Prepare() | Prepares the command. |
Query<T>() | Executes the query, reading every record and converting it to the specified type. |
Query<T>(…) | Executes the query, reading every record and converting it to the specified type with the specified delegate. |
QueryAsync<T>(…) | Executes the query, converting each record to the specified type. (2 methods) |
QueryFirst<T>() | Executes the query, converting the first record to the specified type. |
QueryFirst<T>(…) | Executes the query, converting the first record to the specified type with the specified delegate. |
QueryFirstAsync<T>(…) | Executes the query, converting the first record to the specified type. (2 methods) |
QueryFirstOrDefault<T>() | Executes the query, converting the first record to the specified type. |
QueryFirstOrDefault<T>(…) | Executes the query, converting the first record to the specified type with the specified delegate. |
QueryFirstOrDefaultAsync<T>(…) | Executes the query, converting the first record to the specified type. (2 methods) |
QueryMultiple() | Executes the query, preparing to read multiple result sets. |
QueryMultipleAsync(…) | Executes the query, preparing to read multiple result sets. |
QuerySingle<T>() | Executes the query, converting the first record to the specified type. |
QuerySingle<T>(…) | Executes the query, converting the first record to the specified type with the specified delegate. |
QuerySingleAsync<T>(…) | Executes the query, converting the first record to the specified type. (2 methods) |
QuerySingleOrDefault<T>() | Executes the query, converting the first record to the specified type. |
QuerySingleOrDefault<T>(…) | Executes the query, converting the first record to the specified type with the specified delegate. |
QuerySingleOrDefaultAsync<T>(…) | Executes the query, converting the first record to the specified type. (2 methods) |
WithTimeout(…) | Sets the timeout of the command. |