sea-schema 0.18.0

🌿 SQL schema definition and discovery
Documentation
1
2
3
4
5
6
7
8
9
use crate::sqlx_types::{SqlxError, SqlxRow};
use sea_query::SelectStatement;

#[async_trait::async_trait(?Send)]
pub trait Connection: Sized + Sync {
    async fn query_all(&self, select: SelectStatement) -> Result<Vec<SqlxRow>, SqlxError>;

    async fn query_all_raw(&self, sql: String) -> Result<Vec<SqlxRow>, SqlxError>;
}