| S.No |
Function & Description |
| 1 |
sqlite3.connect()
This API function opens a connection to the SQLite database file. If database is opened successfully, this returns a connection object.
|
| 2 |
connection.cursor()
This creates a cursor which is used for database programming with Python. This function accepts a single optional parameter cursorClass.
|
| 3 |
cursor.execute()
This executes an SQL statements which can be parameterized i.e., placeholders instead of SQL literals.
|
| 4 |
connection.execute()
This executes the cursor object and it creates an intermediate cursor object by calling the cursor method.
|
| 5 |
connection.executemany()
This function executes an SQL command against all parameter sequences or mappings in the sql sequence.
|
| 6 |
connection.executemany()
This is a shortcut that creates an intermediate cursor object by calling the cursor method with the parameters.
|
| 7 |
cursor.executescript()
This function executes the multiple statements in the form of scripts.
|
| 8 |
connection.excutescript()
This is the shortcut that creates an intermediate cursor object by calling the cursor method.
|
| 9 |
connection.commit()
It returns the total number of database rows that have been modified, inserted, or deleted.
|
| 10 |
connection.total_changes()
This function returns the current transaction until the last call to commit() is not visible from the other database.
|
| 11 |
connection.rollback()
This function rolls back any changes to the database from the last call to commit().
|
| 12 |
connection.close()
This function closes the database connection and doesn't call commit() function to close the database connection.
|
| 13 |
cursor.fetchone()
This functions fetches the next row of a query that results a single sequence, or None when no more data is available.
|
| 14 |
cursor.fetchmany()
This function fetches the next set of rows of a query that returns a list. A list is returned when no rows are available.
|
| 15 |
cursor.fetchall()
This function fetches all rows of a query that returns a list.
|