sqlx-firebird 0.1.0-beta.1

sqlx firebird driver
Documentation
//
// Copyright © 2023, RedSoft
// License: MIT
//

use sqlx_core::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};

use crate::{
    FbArgumentValue, FbArguments, FbColumn, FbConnection, FbQueryResult, FbRow, FbStatement,
    FbTransactionManager, FbTypeInfo, FbValue, FbValueRef,
};

#[derive(Debug)]
pub struct Firebird;

impl Database for Firebird {
    type Connection = FbConnection;

    type TransactionManager = FbTransactionManager;

    type QueryResult = FbQueryResult;

    type Row = FbRow;

    type Column = FbColumn;

    type TypeInfo = FbTypeInfo;

    type Value = FbValue;

    const NAME: &'static str = "Firebird";

    const URL_SCHEMES: &'static [&'static str] = &["firebird"];
}

impl<'q> HasStatement<'q> for Firebird {
    type Database = Firebird;

    type Statement = FbStatement<'q>;
}

impl<'q> HasArguments<'q> for Firebird {
    type Database = Firebird;

    type Arguments = FbArguments<'q>;

    type ArgumentBuffer = Vec<FbArgumentValue<'q>>;
}

impl<'r> HasValueRef<'r> for Firebird {
    type Database = Firebird;

    type ValueRef = FbValueRef<'r>;
}

impl HasStatementCache for Firebird {}