rdkit.Dbase.DbInfo module

rdkit.Dbase.DbInfo.GetColumnInfoFromCursor(cursor)
rdkit.Dbase.DbInfo.GetColumnNames(dBase, table, user='sysdba', password='masterkey', join='', what='*', cn=None)

gets a list of columns available in a DB table

Arguments

  • dBase: the name of the DB file to be used

  • table: the name of the table to query

  • user: the username for DB access

  • password: the password to be used for DB access

  • join: an optional join clause (omit the verb ‘join’)

  • what: an optional clause indicating what to select

Returns

  • a list of column names

rdkit.Dbase.DbInfo.GetColumnNamesAndTypes(dBase, table, user='sysdba', password='masterkey', join='', what='*', cn=None)

gets a list of columns available in a DB table along with their types

Arguments

  • dBase: the name of the DB file to be used

  • table: the name of the table to query

  • user: the username for DB access

  • password: the password to be used for DB access

  • join: an optional join clause (omit the verb ‘join’)

  • what: an optional clause indicating what to select

Returns

  • a list of 2-tuples containing:

    1. column name

    2. column type

rdkit.Dbase.DbInfo.GetDbNames(user='sysdba', password='masterkey', dirName='.', dBase='::template1', cn=None)

returns a list of databases that are available

Arguments

  • user: the username for DB access

  • password: the password to be used for DB access

Returns

  • a list of db names (strings)

rdkit.Dbase.DbInfo.GetTableNames(dBase, user='sysdba', password='masterkey', includeViews=0, cn=None)

returns a list of tables available in a database

Arguments

  • dBase: the name of the DB file to be used

  • user: the username for DB access

  • password: the password to be used for DB access

  • includeViews: if this is non-null, the views in the db will also be returned

Returns

  • a list of table names (strings)