This module defines the abstract base class for all database interfaces.
Ths module is used internally by PyORQ, You don't need this information to use the databases
The following methods constitute the external interface of the database interfaces
cls) |
cls
with the database.
This method is called by ptype.__init__
. If the class was not
previously registered, a table will be created.
cls, *args, **kwargs) |
If 'oid'
is in the kwargs
dict, return a known instance, else
create a new instance.
instance) |
If the instance is known, update the contents of the database, else insert the instance in the database.
cls, query) |
In addition, the following methods are available for simple database operations.
class_name) |
class_name
.
PyORQ does not support schema evolution yet. You can use this method to remove the old table before modifying a persistent class definition
CAUTION. This may leave the database in an inconsistent state with dangling references.
class_name) |
class_name
.
CAUTION. This may leave the database in an inconsistent state with dangling references.
This module imports libpq
from pyPgSQL
dsn=None, user=None, password=None, host=None, database=None, port=None, options=None, tty=None, client_encoding=None, unicode_results=None) |
Create an interface to a PostgreSQL database.
All parameters are used to create the argument for the function
libpq.PQconnectdb
, which creates a connection.
dsn
is a string of the form
'host:port:database:user:passwd:options:tty'
, that can be used as an
alternative to the named arguments.
See Also:
This module imports _mysql
, the low-level interface to MySQL, that is
part of MySQL-Python.
host=None, user=None, passwd=None, db=None, port=None) |
Create an interface to a MySQL database.
All parameters are used to create the argument for the function
_mysql.connect
, which creates a connection.
See Also:
This module imports _sqlite
, the low-level interface to SQLite, that is
provided by PySQLite.
database, mode=0755) |
database
(the filename of the database) and mode
(the
permissions for the file that constitutes the database) are passed to
_sqlite.connect
See Also: