firebolt.db package

firebolt.db.connection module

class firebolt.db.connection.Connection(*args: Any, **kwargs: Any)

Bases: firebolt.async_db.connection.BaseConnection

Firebolt database connection class. Implements PEP-249.

  • engine_url – Firebolt database engine REST API url

  • database – Firebolt database name

  • username – Firebolt account username

  • password – Firebolt account password

  • api_endpoint – Optional. Firebolt API endpoint. Used for authentication.


Firebolt currenly doesn’t support transactions so commit and rollback methods are not implemented.

client_class: type
close() None

Close connection and all underlying cursors.

cursor() firebolt.db.cursor.Cursor

alias of firebolt.db.cursor.Cursor


firebolt.db.cursor module

class firebolt.db.cursor.Cursor(*args: Any, **kwargs: Any)

Bases: firebolt.async_db.cursor.BaseCursor

Class, responsible for executing queries to Firebolt Database. Should not be created directly, use connection.cursor

  • description – Information about a single result row

  • rowcount – The number of rows produced by last query

  • closed – True if connection is closed, False otherwise

  • arraysize – Read/Write,

  • time (specifies the number of rows to fetch at a) –

:param with fetchmany() method:

execute(query: str, parameters: Optional[Sequence[Union[int, float, str, datetime.datetime,, bool, Sequence]]] = None, set_parameters: Optional[Dict] = None) int

Prepare and execute a database query. Return row count.

executemany(query: str, parameters_seq: Sequence[Sequence[Union[int, float, str, datetime.datetime,, bool, Sequence]]]) int

Prepare and execute a database query against all parameter sequences provided. Return last query row count.

fetchall() List[List[Optional[Union[int, float, str, datetime.datetime,, bool, list]]]]

Fetch all remaining rows of a query result.

fetchmany(size: Optional[int] = None) List[List[Optional[Union[int, float, str, datetime.datetime,, bool, list]]]]

Fetch the next set of rows of a query result, cursor.arraysize is default size.

fetchone() Optional[List[Optional[Union[int, float, str, datetime.datetime,, bool, list]]]]

Fetch the next row of a query result set.

nextset() Optional[bool]

Skip to the next available set, discarding any remaining rows from the current set. Returns True if operation was successful, None if there are no more sets to retrive