5.3. Functions¶
- simplesqlite.append_table(src_con: SimpleSQLite, dst_con: SimpleSQLite, table_name: str) bool [source]¶
Append a table from source database to destination database.
- Parameters:
src_con (SimpleSQLite) – Connection to the source database.
dst_con (SimpleSQLite) – Connection to the destination database.
table_name (str) – Table name to append.
- Returns:
True
if the append operation succeed.- Return type:
- Raises:
simplesqlite.TableNotFoundError – If the table not found in the database.
ValueError – If attributes of the table are different from each other.
- simplesqlite.copy_table(src_con: SimpleSQLite, dst_con: SimpleSQLite, src_table_name: str, dst_table_name: str, is_overwrite: bool = True) bool [source]¶
Copy a table from source to destination.
- Parameters:
src_con (SimpleSQLite) – Connection to the source database.
dst_con (SimpleSQLite) – Connection to the destination database.
src_table_name (str) – Source table name to copy.
dst_table_name (str) – Destination table name.
- Returns:
True
if the copy operation succeed.- Return type:
- Raises:
simplesqlite.TableNotFoundError – If the table not found in the database.
ValueError – If attributes of the table are different from each other.
- simplesqlite.connect_memdb(max_workers: int | None = None) SimpleSQLite [source]¶
- Returns:
Instance of an in memory database.
- Return type:
- Example: