mirror of
https://github.com/denoland/deno.git
synced 2025-02-20 20:33:42 -05:00

Depends on: - https://github.com/denoland/deno_core/pull/994 - https://github.com/denoland/deno_core/pull/993 - https://github.com/denoland/deno_core/issues/999 - https://github.com/denoland/deno_core/pull/1000 - https://github.com/denoland/deno_core/pull/1001 Closes https://github.com/denoland/deno/issues/24828  --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
41 lines
1,002 B
Rust
41 lines
1,002 B
Rust
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
|
|
mod database;
|
|
mod statement;
|
|
|
|
pub use database::DatabaseSync;
|
|
pub use statement::StatementSync;
|
|
|
|
#[derive(Debug, thiserror::Error, deno_error::JsError)]
|
|
pub enum SqliteError {
|
|
#[class(generic)]
|
|
#[error(transparent)]
|
|
SqliteError(#[from] rusqlite::Error),
|
|
#[class(generic)]
|
|
#[error("Database is already in use")]
|
|
InUse,
|
|
#[class(generic)]
|
|
#[error("Failed to step statement")]
|
|
FailedStep,
|
|
#[class(generic)]
|
|
#[error("Failed to bind parameter. {0}")]
|
|
FailedBind(&'static str),
|
|
#[class(generic)]
|
|
#[error("Unknown column type")]
|
|
UnknownColumnType,
|
|
#[class(generic)]
|
|
#[error("Failed to get SQL")]
|
|
GetSqlFailed,
|
|
#[class(generic)]
|
|
#[error("Database is already closed")]
|
|
AlreadyClosed,
|
|
#[class(generic)]
|
|
#[error("Database is already open")]
|
|
AlreadyOpen,
|
|
#[class(generic)]
|
|
#[error("Failed to prepare statement")]
|
|
PrepareFailed,
|
|
#[class(generic)]
|
|
#[error("Invalid constructor")]
|
|
InvalidConstructor,
|
|
}
|