sqlx-firebird 0.1.0-beta.1

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

use std::borrow::Cow;

use sqlx_core::column::ColumnIndex;
use sqlx_core::statement::Statement;
use sqlx_core::Either;
use sqlx_core::{impl_statement_query, Error};

use crate::{FbArguments, FbColumn, FbTypeInfo, Firebird};

#[derive(Debug, Clone)]
pub struct FbStatement<'q> {
    pub(crate) sql: Cow<'q, str>,
}

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

    fn to_owned(&self) -> FbStatement<'static> {
        todo!()
    }

    fn sql(&self) -> &str {
        &self.sql
    }

    fn parameters(&self) -> Option<Either<&[FbTypeInfo], usize>> {
        todo!()
    }

    fn columns(&self) -> &[FbColumn] {
        todo!()
    }

    impl_statement_query!(FbArguments<'_>);
}

impl ColumnIndex<FbStatement<'_>> for &'_ str {
    fn index(&self, container: &FbStatement<'_>) -> Result<usize, Error> {
        todo!()
    }
}