2. The Database Class

2.1. Method Documentation

Table A.2, “Database Methods” contains the exhaustive list of methods, in alphabetical order. The documentation of each method follows.

Table A.2. Database Methods

TypeNameArgs
method open() 5
method close() 0
method error() 0
method query() 1


method: open()

open() opens a connection to a database.

Definition

def open(host, db, username, password, driver)

  • host: the database host.

  • db: the database name.

  • username: the username.

  • password: the password.

  • driver: the driver name.

method: close()

close() closes the database connection.

method: error()

error() returns a string containing the last error.

method: query()

query() returns a new query object bound to this database.