BioSQL.DBUtils模块

Biopython的BioSQL代码的帮助器代码(供内部使用)。

class BioSQL.DBUtils.Generic_dbutils

基类:object

默认数据库实用程序。

__init__()

创建Generic_dbutils对象。

tname(table)

返回表的名称。

last_id(cursor, table)

返回表的上次使用的id。

execute(cursor, sql, args=None)

只需执行SQL命令即可。

executemany(cursor, sql, seq)

执行许多SQL命令。

autocommit(conn, y=1)

在数据库连接上设置自动提交。

class BioSQL.DBUtils.Sqlite_dbutils

基类:Generic_dbutils

SQLite的自定义数据库实用程序。

execute(cursor, sql, args=None)

执行SQL命令。

将%s替换为?用于sqlite3中的变量替换。

executemany(cursor, sql, seq)

执行许多SQL语句。

class BioSQL.DBUtils.Mysql_dbutils

基类:Generic_dbutils

MySQL的自定义数据库实用程序。

last_id(cursor, table)

返回表的上次使用的id。

class BioSQL.DBUtils.Psycopg2_dbutils

基类:_PostgreSQL_dbutils

Mental copg2(PostgreSQL)的自定义数据库实用程序。

autocommit(conn, y=True)

在数据库连接上设置自动提交。

class BioSQL.DBUtils.Pgdb_dbutils

基类:_PostgreSQL_dbutils

用于Pgdb的自定义数据库实用程序(也称为PyGreSQL,用于PostgreSQL)。

autocommit(conn, y=True)

在数据库连接上设置自动提交。目前尚未实施。

BioSQL.DBUtils.get_dbutils(module_name)

返回数据库驱动程序的正确dbutils对象。