# mayim.sql.sqlite.interface
# Table of Contents
# SQLitePool
class SQLitePool(BaseInterface)
[view_source] (opens new window)
Interface for connecting to a SQLite database
Parents: BaseInterface
# __init__
def __init__(db_path: str)
[view_source] (opens new window)
# close
async def close()
[view_source] (opens new window)
Close connections to the pool
# connection
@asynccontextmanager
async def connection(timeout: Optional[float] = None)
[view_source] (opens new window)
Obtain a connection to the database
Arguments:
timeout
float, optional - Not implemented. Defaults toNone
.
Returns:
AsyncIterator[Connection]
- Iterator that will yield a connection
Yields:
Iterator[AsyncIterator[Connection]]
- A database connection
# open
async def open()
[view_source] (opens new window)
Open connections to the pool
# scheme
Default: ""