fetchmany()

Fetches the number of rows specified by the size parameter.

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_1 = cursor.fetchmany() # Fetches the default row size (usually 1 row)
lst_2 = cursor.fetchmany(5) # Fetches up to 5 rows