Module spin_sdk.sqlite
Module for interacting with an SQLite database
Functions
async def open(name: str) ‑> Connection-
Expand source code
async def open(name: str) -> Connection: """Open a connection to a named database instance. If `database` is "default", the default instance is opened. A `componentize_py_types.Err(spin_sdk.wit.imports.spin_sqlite_sqlite_3_1_0.Error_AccessDenied)` will be raised when the component does not have access to the specified database. A `componentize_py_types.Err(spin_sdk.wit.imports.spin_sqlite_sqlite_3_1_0.Error_NoSuchDatabase)` will be raised when the host does not recognize the database name requested. A `componentize_py_types.Err(spin_sdk.wit.imports.spin_sqlite_sqlite_3_1_0.Error_InvalidConnection)` will be raised when the provided connection string is not valid. A `componentize_py_types.Err(spin_sdk.wit.imports.spin_sqlite_sqlite_3_1_0.Error_Io(str))` will be raised when implementation-specific error occured (e.g. I/O) """ return await Connection.open_async(name)Open a connection to a named database instance.
If
databaseis "default", the default instance is opened.A
componentize_py_types.Err(Error_AccessDenied)will be raised when the component does not have access to the specified database.A
componentize_py_types.Err(Error_NoSuchDatabase)will be raised when the host does not recognize the database name requested.A
componentize_py_types.Err(Error_InvalidConnection)will be raised when the provided connection string is not valid.A
componentize_py_types.Err(Error_Io(str))will be raised when implementation-specific error occured (e.g. I/O) async def open_default() ‑> Connection-
Expand source code
async def open_default() -> Connection: """Open the default store. A `componentize_py_types.Err(spin_sdk.wit.imports.spin_sqlite_sqlite_3_1_0.Error_AccessDenied)` will be raised when the component does not have access to the default database. A `componentize_py_types.Err(spin_sdk.wit.imports.spin_sqlite_sqlite_3_1_0.Error_Io(str))` will be raised when implementation-specific error occured (e.g. I/O) """ return await Connection.open_async("default")Open the default store.
A
componentize_py_types.Err(Error_AccessDenied)will be raised when the component does not have access to the default database.A
componentize_py_types.Err(Error_Io(str))will be raised when implementation-specific error occured (e.g. I/O)