insert()
Insert a row into a table and return the new row ID.
Usage
insert(
table,
data,
)Parameters
table: str-
The name of the table to insert into.
data: dict-
A dictionary of column-value pairs.
Returns
int-
The ID of the newly inserted row.
Examples
>>> insert("users", {"name": "Bob"})
2