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:

bool

Raises:
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.

  • is_overwrite (bool) – If True, overwrite existing table.

Returns:

True if the copy operation succeed.

Return type:

bool

Raises:
simplesqlite.connect_memdb(max_workers: int | None = None) SimpleSQLite[source]
Returns:

Instance of an in memory database.

Return type:

SimpleSQLite

Example:

Make an in-memory database