pub type Config = Config;
Aliased Type§
struct Config {
db_opt: PgConnectOptions,
pool_opt: PoolOptions<Postgres>,
schema: String,
reset: bool,
migrations: Vec<Migration>,
no_migrations: bool,
pruner_cfg: Option<PrunerCfg>,
archive: bool,
pool: Option<Pool<Postgres>>,
}
Fields§
§db_opt: PgConnectOptions
§pool_opt: PoolOptions<Postgres>
§schema: String
§reset: bool
§migrations: Vec<Migration>
§no_migrations: bool
§pruner_cfg: Option<PrunerCfg>
§archive: bool
§pool: Option<Pool<Postgres>>
Implementations§
Source§impl Config
impl Config
Sourcepub async fn connect<Types, P: AvailabilityProvider<Types>>(
self,
provider: P,
) -> Result<SqlDataSource<Types, P>, Error>where
Types: NodeType,
Header<Types>: QueryableHeader<Types>,
Payload<Types>: QueryablePayload<Types>,
pub async fn connect<Types, P: AvailabilityProvider<Types>>(
self,
provider: P,
) -> Result<SqlDataSource<Types, P>, Error>where
Types: NodeType,
Header<Types>: QueryableHeader<Types>,
Payload<Types>: QueryablePayload<Types>,
Connect to the database with this config.
Sourcepub async fn builder<Types, P: AvailabilityProvider<Types>>(
self,
provider: P,
) -> Result<Builder<Types, P>, Error>where
Types: NodeType,
Header<Types>: QueryableHeader<Types>,
Payload<Types>: QueryablePayload<Types>,
pub async fn builder<Types, P: AvailabilityProvider<Types>>(
self,
provider: P,
) -> Result<Builder<Types, P>, Error>where
Types: NodeType,
Header<Types>: QueryableHeader<Types>,
Payload<Types>: QueryablePayload<Types>,
Connect to the database, setting options on the underlying FetchingDataSource
using the
fetching::Builder
interface.