sqlite3.Row.keys()

keys() This method returns a list of column names. Immediately after a query, it is the first member of each tuple in Cursor.description.

sqlite3.Row

class sqlite3.Row A Row instance serves as a highly optimized row_factory for Connection objects. It tries to mimic a tuple in most of its features. It supports mapping access by column name and index, iteration, representation, equality testing and len(). If two Row objects have exactly the same columns and their members are equal, they compare equal. keys() This method returns a list of column names. Immediately after a query, it is the first member of each tuple in Cursor.description.

sqlite3.register_converter()

sqlite3.register_converter(typename, callable) Registers a callable to convert a bytestring from the database into a custom Python type. The callable will be invoked for all database values that are of the type typename. Confer the parameter detect_types of the connect() function for how the type detection works. Note that the case of typename and the name of the type in your query must match!

sqlite3.register_adapter()

sqlite3.register_adapter(type, callable) Registers a callable to convert the custom Python type type into one of SQLite’s supported types. The callable callable accepts as single parameter the Python value, and must return a value of the following types: int, float, str or bytes.

sqlite3.enable_callback_tracebacks()

sqlite3.enable_callback_tracebacks(flag) By default you will not get any tracebacks in user-defined functions, aggregates, converters, authorizer callbacks etc. If you want to debug them, you can call this function with flag set to True. Afterwards, you will get tracebacks from callbacks on sys.stderr. Use False to disable the feature again.

sqlite3.Cursor.rowcount

rowcount Although the Cursor class of the sqlite3 module implements this attribute, the database engine’s own support for the determination of “rows affected”/”rows selected” is quirky. For executemany() statements, the number of modifications are summed up into rowcount. As required by the Python DB API Spec, the rowcount attribute “is -1 in case no executeXX() has been performed on the cursor or the rowcount of the last operation is not determinable by the interface”. This includes SELECT

sqlite3.Cursor.lastrowid

lastrowid This read-only attribute provides the rowid of the last modified row. It is only set if you issued an INSERT statement using the execute() method. For operations other than INSERT or when executemany() is called, lastrowid is set to None.

sqlite3.Cursor.fetchone()

fetchone() Fetches the next row of a query result set, returning a single sequence, or None when no more data is available.

sqlite3.Cursor.fetchmany()

fetchmany(size=cursor.arraysize) Fetches the next set of rows of a query result, returning a list. An empty list is returned when no more rows are available. The number of rows to fetch per call is specified by the size parameter. If it is not given, the cursor’s arraysize determines the number of rows to be fetched. The method should try to fetch as many rows as indicated by the size parameter. If this is not possible due to the specified number of rows not being available, fewer rows may b

sqlite3.Cursor.fetchall()

fetchall() Fetches all (remaining) rows of a query result, returning a list. Note that the cursor’s arraysize attribute can affect the performance of this operation. An empty list is returned when no rows are available.