Package gavo :: Package rsc :: Module dbtable :: Class DBMethodsMixin
[frames] | no frames]

Class DBMethodsMixin

source code

                        object --+        
                                 |        
base.sqlsupport.PostgresQueryMixin --+    
                                     |    
                        object --+   |    
                                 |   |    
base.sqlsupport.StandardQueryMixin --+    
                                     |    
          base.sqlsupport.QuerierMixin --+
                                         |
                                        DBMethodsMixin
Known Subclasses:

is a mixin for on-disk tables.

The parent must have tableDef, tableName (from tabledef.getQName()), and connection attributes.

Instance Methods
 
dropIndices(self) source code
 
makeIndices(self)
creates all indices on the table, including any definition of a primary key.
source code
 
getDeleteQuery(self, matchCondition, pars={}) source code
 
deleteMatching(self, matchCondition, pars={})
deletes all rows matching matchCondition.
source code
 
copyIn(self, inFile, binary=True) source code
 
copyOut(self, outFile, binary=True) source code
 
ensureSchema(self)
creates self's schema if necessary.
source code
 
ensureOnDiskMatches(self)
raises a DataError if the on-disk structure of a table doesn't match DaCHS' idea of it.
source code

Inherited from base.sqlsupport.QuerierMixin: abort, configureConnection, enableAutocommit, finish, query, queryDicts, queryToDicts

Inherited from base.sqlsupport.PostgresQueryMixin: dropTable, foreignKeyExists, getACLFromRes, getColumnsFromDB, getForeignKeyName, getOIDForTable, getPrimaryIndexName, getRowEstimate, getSchemaPrivileges, getServerVersion, getTablePrivileges, getTableType, hasIndex, parsePGACL, roleExists, schemaExists

Inherited from base.sqlsupport.StandardQueryMixin: getTimeout, setSchemaPrivileges, setTablePrivileges, setTimeout

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  scripts = None
hash(x)

Inherited from base.sqlsupport.QuerierMixin: defaultProfile

Properties

Inherited from object: __class__

Method Details

deleteMatching(self, matchCondition, pars={})

source code 

deletes all rows matching matchCondition.

For now, matchCondition a boolean SQL expression. All rows matching it will be deleted.

ensureOnDiskMatches(self)

source code 

raises a DataError if the on-disk structure of a table doesn't match DaCHS' idea of it.

If the table doesn't exist on disk, this will raise a NotFoundError.