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

Class View

source code

                        object --+                
                                 |                
base.sqlsupport.PostgresQueryMixin --+            
                                     |            
                        object --+   |            
                                 |   |            
base.sqlsupport.StandardQueryMixin --+            
                                     |            
          base.sqlsupport.QuerierMixin --+        
                                         |        
                            DBMethodsMixin --+    
                                             |    
                            object --+       |    
                                     |       |    
                   base.meta.MetaMixin --+   |    
                                         |   |    
                            object --+   |   |    
                                     |   |   |    
                     common.ParamMixin --+   |    
                                         |   |    
                           table.BaseTable --+    
                                             |    
                                object --+   |    
                                         |   |    
                            MetaTableMixin --+    
                                             |    
                                       DBTable --+
                                                 |
                                                View

is a view, i.e., a table in the database you can't add to.

Strictly, I should derive both View and DBTable from a common base, but that's currently not worth the effort.

Technically, Views are DBTables with a non-None viewStatement (this is what TableForDef checks for when deciding whether to construct a DBTable or a View). You can get a feeder for them, but trying to actually feed anything will raise a DataError.

On import, views only run postCreation scripts; since there are no indices, no preIndex scripts are not run, since no import takes place, there's no preImport or newSource.

Instance Methods
 
__init__(self, *args, **kwargs)
is a constructor for standalone use.
source code
 
addRow(self, row)
adds a row to the table.
source code
 
feedRows(self, row)
adds a row to the table.
source code
 
setStatisticsTargets(self) source code
 
getFeeder(self, **kwargs) source code
 
create(self) source code
 
makeIndices(self)
creates all indices on the table, including any definition of a primary key.
source code
 
importFinished(self) source code

Inherited from DBTable: __iter__, __len__, configureTable, createIfNecessary, createUniquenessRules, drop, exists, getQuery, getRow, getSelectClause, getTableForQuery, importFailed, iterQuery, query, recreate, updateMeta

Inherited from DBMethodsMixin: copyIn, copyOut, deleteMatching, dropIndices, ensureOnDiskMatches, ensureSchema, getDeleteQuery

Inherited from base.sqlsupport.QuerierMixin: abort, configureConnection, enableAutocommit, finish, 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 table.BaseTable: addTuple, close, removeRow, runScripts, validateParams

Inherited from base.meta.MetaMixin: addMeta, buildRepr, copyMetaFrom, delMeta, getAllMetaPairs, getMeta, getMetaKeys, getMetaParent, isEmpty, iterMeta, keys, makeOriginal, setMeta, setMetaParent, traverse

Inherited from common.ParamMixin: getParam, getParamByName, getParamByUtype, getParamDict, iterParams, setParam, setParams

Inherited from MetaTableMixin: addToMeta, cleanFromMeta

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

Class Variables

Inherited from DBMethodsMixin: scripts

Inherited from base.sqlsupport.QuerierMixin: defaultProfile

Properties

Inherited from object: __class__

Method Details

__init__(self, *args, **kwargs)
(Constructor)

source code 

is a constructor for standalone use. You do *not* want to call this when mixing into a Structure.

Overrides: object.__init__
(inherited documentation)

addRow(self, row)

source code 

adds a row to the table.

Use this only to add one or two rows, otherwise go for getFeeder.

Overrides: table.BaseTable.addRow

feedRows(self, row)

source code 

adds a row to the table.

Use this only to add one or two rows, otherwise go for getFeeder.

Overrides: DBTable.feedRows
(inherited documentation)

setStatisticsTargets(self)

source code 
Overrides: DBTable.setStatisticsTargets

getFeeder(self, **kwargs)

source code 
Overrides: table.BaseTable.getFeeder

create(self)

source code 
Overrides: DBTable.create

makeIndices(self)

source code 

creates all indices on the table, including any definition of a primary key.

Overrides: DBMethodsMixin.makeIndices
(inherited documentation)

importFinished(self)

source code 
Overrides: table.BaseTable.importFinished