green_copper_runtime/modules/db/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use quickjs_runtime::builder::QuickJsRuntimeBuilder;

#[cfg(any(feature = "all", feature = "db", feature = "mysql"))]
pub mod mysql;

#[cfg(any(feature = "all", feature = "db", feature = "sqlx"))]
pub mod sqlx;

pub(crate) fn init(builder: QuickJsRuntimeBuilder) -> QuickJsRuntimeBuilder {
    #[cfg(any(feature = "all", feature = "db", feature = "mysql"))]
    let builder = mysql::init(builder);
    #[cfg(any(feature = "all", feature = "db", feature = "sqlx"))]
    let builder = sqlx::init(builder);
    builder
}