pub enum Driver {
Rusqlite,
Libsql,
Turso,
PostgresSync,
TokioPostgres,
MysqlSync,
MysqlAsync,
D1Http,
DurableSqlite,
AwsDataApi,
}Expand description
The driver config value: which Rust driver the CLI connects with.
Variants§
Rusqlite
rusqlite - synchronous SQLite driver
Libsql
libsql - LibSQL driver (local embedded)
Turso
turso - Turso cloud driver (remote)
PostgresSync
postgres-sync - synchronous PostgreSQL driver
TokioPostgres
tokio-postgres - async PostgreSQL driver
MysqlSync
mysql-sync - blocking MySQL driver
MysqlAsync
mysql-async - Tokio MySQL driver
D1Http
d1-http - Cloudflare D1 over the HTTP API
Targets a remote D1 database via the Cloudflare REST API. Requires
accountId, databaseId, and token in dbCredentials. For deploying
to a Worker binding at runtime use the d1 driver feature on the
drizzle crate itself — this CLI driver is for schema ops (generate /
push / pull / migrate) against a live D1 instance from your dev box.
DurableSqlite
durable-sqlite - Cloudflare Durable Objects SQLite storage
DOs run SQLite embedded inside the Worker runtime. There’s no remote
endpoint to push to from the CLI, so this driver is schema-only:
generate produces SQL migrations and a bundled migrations.js index
(like drizzle-kit’s bundle: true) that the Worker imports at build
time to apply migrations inside DurableObject::new().
AwsDataApi
aws-data-api - AWS RDS Data API (Aurora Serverless PostgreSQL)
Runs SQL through the AWS RDS Data API instead of a direct TCP
connection. Requires database, secretArn (AWS Secrets Manager ARN
holding the DB password), and resourceArn (Aurora cluster ARN) in
dbCredentials. The AWS region comes from the standard SDK chain
(env vars, ~/.aws/config, EC2/ECS metadata) — drizzle-kit takes no
region field and we match that.
At the Rust layer this would route through the aws-sdk-rdsdata crate,
which isn’t yet wired into drizzle-rs — this driver is currently
recognized by the CLI for config parity, but operations return a
pointed UnsupportedForDriver error.
Implementations§
Source§impl Driver
impl Driver
Sourcepub const fn valid_for(dialect: Dialect) -> &'static [Self]
pub const fn valid_for(dialect: Dialect) -> &'static [Self]
Returns the drivers allowed for dialect.
Sourcepub const fn is_valid_for(self, dialect: Dialect) -> bool
pub const fn is_valid_for(self, dialect: Dialect) -> bool
Returns true if this driver is allowed for dialect.
Sourcepub const fn is_codegen_only(self) -> bool
pub const fn is_codegen_only(self) -> bool
Returns true for drivers the CLI cannot connect through, so only
generate-style commands work (currently durable-sqlite, which runs
inside the Workers runtime).
Trait Implementations§
impl Copy for Driver
Source§impl<'de> Deserialize<'de> for Driver
impl<'de> Deserialize<'de> for Driver
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Driver
Source§impl JsonSchema for Driver
impl JsonSchema for Driver
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Driver
Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl Send for Driver
impl Sync for Driver
impl Unpin for Driver
impl UnsafeUnpin for Driver
impl UnwindSafe for Driver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Joined, From> JoinKey<From, JoinReverse> for Joined
impl<Joined, From> JoinKey<From, JoinReverse> for Joined
impl<List> ListIncludes<Nil, ()> for List
impl<Mk> MarkerAggValidFor<()> for Mk
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more