# BioSQL.DBUtils module

Helper code for Biopython’s BioSQL code (for internal use).

class BioSQL.DBUtils.Generic_dbutils

  Bases: `object`

  Default database utilities.

  __init__()

    Create a Generic_dbutils object.

  tname(table)

    Return the name of the table.

  last_id(cursor, table)

    Return the last used id for a table.

  execute(cursor, sql, args=None)

    Just execute an sql command.

  executemany(cursor, sql, seq)

    Execute many sql commands.

  autocommit(conn, y=1)

    Set autocommit on the database connection.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 20
  __static_attributes__ = ()

class BioSQL.DBUtils.Sqlite_dbutils

  Bases: `Generic_dbutils`

  Custom database utilities for SQLite.

  execute(cursor, sql, args=None)

    Execute SQL command.

    Replaces %s with ? for variable substitution in sqlite3.

  executemany(cursor, sql, seq)

    Execute many sql statements.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 55
  __static_attributes__ = ()

class BioSQL.DBUtils.Mysql_dbutils

  Bases: `Generic_dbutils`

  Custom database utilities for MySQL.

  last_id(cursor, table)

    Return the last used id for a table.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 79
  __static_attributes__ = ()

class BioSQL.DBUtils.Psycopg2_dbutils

  Bases: `_PostgreSQL_dbutils`

  Custom database utilities for Psycopg2 (PostgreSQL).

  autocommit(conn, y=True)

    Set autocommit on the database connection.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 117
  __static_attributes__ = ()

class BioSQL.DBUtils.Pgdb_dbutils

  Bases: `_PostgreSQL_dbutils`

  Custom database utilities for Pgdb (aka PyGreSQL, for PostgreSQL).

  autocommit(conn, y=True)

    Set autocommit on the database connection. Currently not implemented.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 137
  __static_attributes__ = ()

BioSQL.DBUtils.get_dbutils(module_name)

  Return the correct dbutils object for the database driver.

BioSQL.DBUtils.__annotate__(format, /)

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub