pub struct SqlServerConnector { /* private fields */ }Expand description
SQL Server connector using tiberius
Implementations§
Source§impl SqlServerConnector
impl SqlServerConnector
Sourcepub fn build_connection_string(
&self,
config: &ConnectorInitConfig,
) -> NirvResult<String>
pub fn build_connection_string( &self, config: &ConnectorInitConfig, ) -> NirvResult<String>
Build connection string from configuration parameters
Sourcepub fn build_sql_query(&self, query: &InternalQuery) -> NirvResult<String>
pub fn build_sql_query(&self, query: &InternalQuery) -> NirvResult<String>
Build SQL query from internal query representation
Sourcepub fn build_predicate_sql(&self, predicate: &Predicate) -> NirvResult<String>
pub fn build_predicate_sql(&self, predicate: &Predicate) -> NirvResult<String>
Build SQL for a single predicate
Sourcepub fn format_predicate_value(
&self,
value: &PredicateValue,
) -> NirvResult<String>
pub fn format_predicate_value( &self, value: &PredicateValue, ) -> NirvResult<String>
Format predicate value for SQL
Sourcepub fn sqlserver_type_to_data_type(&self, sql_type: &str) -> DataType
pub fn sqlserver_type_to_data_type(&self, sql_type: &str) -> DataType
Convert SQL Server type to internal DataType
Trait Implementations§
Source§impl Connector for SqlServerConnector
impl Connector for SqlServerConnector
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
config: ConnectorInitConfig,
) -> Pin<Box<dyn Future<Output = NirvResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
config: ConnectorInitConfig,
) -> Pin<Box<dyn Future<Output = NirvResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Establish connection to the backend data source
Source§fn execute_query<'life0, 'async_trait>(
&'life0 self,
query: ConnectorQuery,
) -> Pin<Box<dyn Future<Output = NirvResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_query<'life0, 'async_trait>(
&'life0 self,
query: ConnectorQuery,
) -> Pin<Box<dyn Future<Output = NirvResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a query against the connected data source
Source§fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
object_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NirvResult<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
object_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = NirvResult<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve schema information for a specific data object
Source§fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = NirvResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = NirvResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close connection and cleanup resources
Source§fn get_connector_type(&self) -> ConnectorType
fn get_connector_type(&self) -> ConnectorType
Get the type of this connector
Source§fn supports_transactions(&self) -> bool
fn supports_transactions(&self) -> bool
Check if this connector supports transactions
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if the connector is currently connected
Source§fn get_capabilities(&self) -> ConnectorCapabilities
fn get_capabilities(&self) -> ConnectorCapabilities
Get connector-specific capabilities
Source§impl Debug for SqlServerConnector
impl Debug for SqlServerConnector
Auto Trait Implementations§
impl !Freeze for SqlServerConnector
impl RefUnwindSafe for SqlServerConnector
impl Send for SqlServerConnector
impl Sync for SqlServerConnector
impl Unpin for SqlServerConnector
impl UnwindSafe for SqlServerConnector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more