fieldinfo()

Overview

Returns a MariaDB field information object.

See also: MariaDB Connector/Python 1.1 and in 1.0

EXAMPLES

import mariadb

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

finfo = mariadb.fieldinfo()

cursor = conn.cursor()

cursor.execute("SELECT * FROM sample")

# This prints each field name followed its type:
for fld in cursor.description:
   print(fld[0], finfo.type(fld))

CHANGE HISTORY

Release Series

History

1.1

  • Present starting in MariaDB Connector/Python 1.1.2.

1.0

  • Present starting in MariaDB Connector/Python 1.0.0.