postglide
Types
pub type Config {
Config(
file_system: FileSystem,
debug_level: Int,
relaxed_durability: Bool,
username: option.Option(String),
)
}
Constructors
-
Config( file_system: FileSystem, debug_level: Int, relaxed_durability: Bool, username: option.Option(String), )
pub type Connection
pub type FileSystem {
Memory
NodeFS(path: String)
IndexedDB(database: String)
OriginPrivateFS(path: String)
}
Constructors
-
Memory
-
NodeFS(path: String)
-
IndexedDB(database: String)
-
OriginPrivateFS(path: String)
pub type QueryError {
DatabaseError(message: String)
DecodeFailed(List(dynamic.DecodeError))
}
Constructors
-
DatabaseError(message: String)
-
DecodeFailed(List(dynamic.DecodeError))
pub type Results(t) {
Results(affected_rows: Int, rows: List(t), blob: Option(Blob))
}
Constructors
-
Results(affected_rows: Int, rows: List(t), blob: Option(Blob))
Functions
pub fn default_config() -> Config
pub fn query(
query: String,
connection: Connection,
arguments: List(Value),
expecting decoder: fn(Dynamic) -> Result(a, List(DecodeError)),
) -> Promise(Result(Results(a), QueryError))