pub struct ConnectedMssqlClient { /* private fields */ }Expand description
Opaque SQL Server client constructed with this crate’s compatible Tiberius dependency.
Use connect_mssql_client_from_ado_string to create this type. Its
concrete Tiberius client and async transport types are intentionally hidden
so downstream crates do not have to name or match tiberius-raw-bulk
directly.
Implementations§
Source§impl ConnectedMssqlClient
impl ConnectedMssqlClient
Sourcepub async fn table_exists(&mut self, table: &TableName) -> Result<bool>
pub async fn table_exists(&mut self, table: &TableName) -> Result<bool>
Returns whether the target table exists in SQL Server metadata.
This is a narrow metadata probe, not a generic query API. For schema-qualified names it checks the exact schema and table. For unqualified names it checks whether any table with that name exists in the current database.
Sourcepub async fn execute_statement(
&mut self,
sql: &str,
) -> Result<SqlExecutionOutcome>
pub async fn execute_statement( &mut self, sql: &str, ) -> Result<SqlExecutionOutcome>
Executes a prepared lifecycle SQL statement.
This method accepts statement text but intentionally returns only affected-row metadata. It does not expose a generic result-row mapping API.
Sourcepub async fn bulk_writer(
&mut self,
table: TableName,
mappings: Vec<SchemaMapping>,
options: WriteOptions,
) -> Result<ConnectedBulkWriter<'_>>
pub async fn bulk_writer( &mut self, table: TableName, mappings: Vec<SchemaMapping>, options: WriteOptions, ) -> Result<ConnectedBulkWriter<'_>>
Starts a bulk writer on this same SQL Server connection.
The returned writer borrows the connected client, so lifecycle SQL and bulk loading cannot accidentally use two different connections through this API.