sqlite_types
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ColumnInfo toprompt.sqlite_types Information about a SQLite column. |
||
| FileDatabaseLike toprompt.sqlite_types Protocol for file-based database-like objects. |
||
| ForeignKeyInfo toprompt.sqlite_types Information about a SQLite foreign key. |
||
| InMemoryDatabaseLike toprompt.sqlite_types Protocol for in-memory database-like objects. |
||
| IndexInfo toprompt.sqlite_types Information about a SQLite index. |
🛈 DocStrings¶
ColumnInfo
¶
FileDatabaseLike
¶
ForeignKeyInfo
¶
InMemoryDatabaseLike
¶
IndexInfo
¶
get_db_path
¶
Get the path for a SQLite database connection.
Source code in src/toprompt/sqlite_types.py
get_index_info
¶
get_index_info(cursor: Cursor, table: str) -> list[IndexInfo]
Get information about the explicitly created indices on a table.
Source code in src/toprompt/sqlite_types.py
get_sqlite_schema
¶
Generate human-readable documentation from SQLite database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db
|
str | PathLike[str] | Connection
|
Path to SQLite database file or Connection object |
required |
Source code in src/toprompt/sqlite_types.py
get_table_info
¶
Get detailed information about a specific table.
Source code in src/toprompt/sqlite_types.py
get_tables
¶
Get all table names from database.