fetchall()

Fetches all rows of a pending result set and returns a list of tuples.

See also: MariaDB Connector/Python 1.0

EXAMPLES

import mariadb

conn = mariadb.connect(
    host = 'localhost',
    user = 'root',
    password = 'secret',
    database = 'test',
    )

cursor = conn.cursor()

cursor.execute("SELECT * FROM sample")
lst = cursor.fetchall()

# All values have been fetched and the cursor is ready for another request.