Public Member Functions | Private Member Functions | Private Attributes | List of all members
pyclearsilver.odb.Table Class Reference

Table. More...

Inheritance diagram for pyclearsilver.odb.Table:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, database, table_name, rowClass=None, check=0, create=0, rowListClass=None, replication=None)
 
def addIndex (self, columns, indexName=None, unique=0)
 
def alterTableToMatch (self, cursor=None)
 
def checkTable (self, warnflag=1)
 
def columnType (self, col_name)
 
def convertDataForColumn (self, data, col_name)
 
def createIndex (self, columns, indexName=None, unique=0, cursor=None)
 
def createTable (self, cursor=None)
 
def d_addColumn (self, col_name, ctype, size=None, primarykey=0, notnull=0, indexed=0, default=None, unique=0, autoincrement=0, autoguid=0, safeupdate=0, enum_values=None, no_export=0, relations=None, foreign_key=None, compress_ok=0, int_date=0)
 
def d_addDeleteTrigger (self, triggerName, tsql)
 
def d_addInsertTrigger (self, triggerName, tsql)
 
def d_addUpdateColumnsTrigger (self, triggerName, columns, tsql)
 
def d_addUpdateTrigger (self, triggerName, tsql)
 
def d_addValueColumn (self)
 
def d_addVColumn (self, col_name, type, size=None, default=None)
 
def d_belongsTo (self, col_name, tblNameStr=None, foreign_key=None, order=None)
 
def d_fullTextSearch (self)
 
def d_hasMany (self, tblname, col_name, foreign_key=None, order=None)
 
def d_hasOne (self, col_name, tblname, foreign_key=None, order=None)
 
def databaseSizeForData_ColumnName_ (self, data, col_name)
 
def deleteAllRows (self, cursor=None)
 
def dropTable (self, cursor=None)
 
def getAppColumnList (self)
 
def getColumnDef (self, column_name)
 
def getColumnList (self)
 
def getColumnOption (self, columnName, optionName)
 
def getDB (self)
 
def getIndices (self)
 
def getPrimaryKeyList (self)
 
def getRelations (self)
 
def getReplication (self)
 
def getTableColumnsFromDB (self)
 
def getTableName (self)
 
def hasColumn (self, column_name)
 Column Definition. More...
 
def hasColumn (self, name)
 
def hasReplication (self)
 
def hasValueColumn (self)
 
def hasVColumn (self, name)
 
def renameTable (self, newTableName, cursor=None)
 
def setTableName (self, tablename)
 
def subclassinit (self)
 

Private Member Functions

def __buildWhereClause (self, col_match_spec, other_clauses=None)
 
def __checkColumnLock (self)
 
def __fetchRows (self, col_match_spec, cursor=None, where=None, order_by=None, limit_to=None, skip_to=None, join=None, join2=None, column_list=None, raw_rows=False)
 
def __lockColumnsAndInit (self)
 
def _colTypeToSQLType (self, colname, coltype, options, singlePrimaryKey=0)
 
def _createTableSQL (self)
 
def _defineRelations (self)
 
def _defineRows (self)
 
def _fixColMatchSpec (self, col_match_spec, should_match_unique_row=0)
 _checkColMatchSpec(col_match_spec,should_match_unique_row = 0) More...
 

Private Attributes

 __col_def_hash
 
 __column_list
 
 __columns_locked
 
 __db
 
 __defaultRowClass
 
 __defaultRowListClass
 
 __fullTextSearchable
 
 __has_value_column
 
 __indices
 
 __primary_key_list
 
 __relations_by_table
 
 __replication
 
 __table_name
 
 __vcol_def_hash
 
 __vcolumn_list
 
 _triggers
 

Detailed Description

Table.

Definition at line 653 of file odb.py.

Constructor & Destructor Documentation

def pyclearsilver.odb.Table.__init__ (   self,
  database,
  table_name,
  rowClass = None,
  check = 0,
  create = 0,
  rowListClass = None,
  replication = None 
)

Definition at line 661 of file odb.py.

Member Function Documentation

def pyclearsilver.odb.Table.__buildWhereClause (   self,
  col_match_spec,
  other_clauses = None 
)
private

Definition at line 1280 of file odb.py.

def pyclearsilver.odb.Table.__checkColumnLock (   self)
private

Definition at line 1045 of file odb.py.

def pyclearsilver.odb.Table.__fetchRows (   self,
  col_match_spec,
  cursor = None,
  where = None,
  order_by = None,
  limit_to = None,
  skip_to = None,
  join = None,
  join2 = None,
  column_list = None,
  raw_rows = False 
)
private

Definition at line 1328 of file odb.py.

def pyclearsilver.odb.Table.__lockColumnsAndInit (   self)
private

Definition at line 1012 of file odb.py.

def pyclearsilver.odb.Table._colTypeToSQLType (   self,
  colname,
  coltype,
  options,
  singlePrimaryKey = 0 
)
private

Definition at line 720 of file odb.py.

def pyclearsilver.odb.Table._createTableSQL (   self)
private

Definition at line 758 of file odb.py.

def pyclearsilver.odb.Table._defineRelations (   self)
private

Definition at line 1009 of file odb.py.

def pyclearsilver.odb.Table._defineRows (   self)
private

Definition at line 1006 of file odb.py.

def pyclearsilver.odb.Table._fixColMatchSpec (   self,
  col_match_spec,
  should_match_unique_row = 0 
)
private

_checkColMatchSpec(col_match_spec,should_match_unique_row = 0)

raise an error if the col_match_spec contains invalid columns, or (in the case of should_match_unique_row) if it does not fully specify a unique row.

NOTE: we don't currently support where clauses with value column fields!

Definition at line 1212 of file odb.py.

def pyclearsilver.odb.Table.addIndex (   self,
  columns,
  indexName = None,
  unique = 0 
)

Definition at line 860 of file odb.py.

def pyclearsilver.odb.Table.alterTableToMatch (   self,
  cursor = None 
)

Definition at line 856 of file odb.py.

def pyclearsilver.odb.Table.checkTable (   self,
  warnflag = 1 
)

Definition at line 817 of file odb.py.

def pyclearsilver.odb.Table.columnType (   self,
  col_name 
)

Definition at line 952 of file odb.py.

def pyclearsilver.odb.Table.convertDataForColumn (   self,
  data,
  col_name 
)

Definition at line 964 of file odb.py.

def pyclearsilver.odb.Table.createIndex (   self,
  columns,
  indexName = None,
  unique = 0,
  cursor = None 
)

Definition at line 866 of file odb.py.

def pyclearsilver.odb.Table.createTable (   self,
  cursor = None 
)

Definition at line 781 of file odb.py.

def pyclearsilver.odb.Table.d_addColumn (   self,
  col_name,
  ctype,
  size = None,
  primarykey = 0,
  notnull = 0,
  indexed = 0,
  default = None,
  unique = 0,
  autoincrement = 0,
  autoguid = 0,
  safeupdate = 0,
  enum_values = None,
  no_export = 0,
  relations = None,
  foreign_key = None,
  compress_ok = 0,
  int_date = 0 
)

Definition at line 1074 of file odb.py.

def pyclearsilver.odb.Table.d_addDeleteTrigger (   self,
  triggerName,
  tsql 
)

Definition at line 1155 of file odb.py.

def pyclearsilver.odb.Table.d_addInsertTrigger (   self,
  triggerName,
  tsql 
)

Definition at line 1143 of file odb.py.

def pyclearsilver.odb.Table.d_addUpdateColumnsTrigger (   self,
  triggerName,
  columns,
  tsql 
)

Definition at line 1151 of file odb.py.

def pyclearsilver.odb.Table.d_addUpdateTrigger (   self,
  triggerName,
  tsql 
)

Definition at line 1147 of file odb.py.

def pyclearsilver.odb.Table.d_addValueColumn (   self)

Definition at line 1160 of file odb.py.

def pyclearsilver.odb.Table.d_addVColumn (   self,
  col_name,
  type,
  size = None,
  default = None 
)

Definition at line 1164 of file odb.py.

def pyclearsilver.odb.Table.d_belongsTo (   self,
  col_name,
  tblNameStr = None,
  foreign_key = None,
  order = None 
)

Definition at line 1184 of file odb.py.

def pyclearsilver.odb.Table.d_fullTextSearch (   self)

Definition at line 1181 of file odb.py.

def pyclearsilver.odb.Table.d_hasMany (   self,
  tblname,
  col_name,
  foreign_key = None,
  order = None 
)

Definition at line 1189 of file odb.py.

def pyclearsilver.odb.Table.d_hasOne (   self,
  col_name,
  tblname,
  foreign_key = None,
  order = None 
)

Definition at line 1193 of file odb.py.

def pyclearsilver.odb.Table.databaseSizeForData_ColumnName_ (   self,
  data,
  col_name 
)

Definition at line 918 of file odb.py.

def pyclearsilver.odb.Table.deleteAllRows (   self,
  cursor = None 
)

Definition at line 798 of file odb.py.

def pyclearsilver.odb.Table.dropTable (   self,
  cursor = None 
)

Definition at line 791 of file odb.py.

def pyclearsilver.odb.Table.getAppColumnList (   self)

Definition at line 915 of file odb.py.

def pyclearsilver.odb.Table.getColumnDef (   self,
  column_name 
)

Definition at line 890 of file odb.py.

def pyclearsilver.odb.Table.getColumnList (   self)

Definition at line 913 of file odb.py.

def pyclearsilver.odb.Table.getColumnOption (   self,
  columnName,
  optionName 
)

Definition at line 947 of file odb.py.

def pyclearsilver.odb.Table.getDB (   self)

Definition at line 750 of file odb.py.

def pyclearsilver.odb.Table.getIndices (   self)

Definition at line 756 of file odb.py.

def pyclearsilver.odb.Table.getPrimaryKeyList (   self)

Definition at line 987 of file odb.py.

def pyclearsilver.odb.Table.getRelations (   self)

Definition at line 1178 of file odb.py.

def pyclearsilver.odb.Table.getReplication (   self)

Definition at line 717 of file odb.py.

def pyclearsilver.odb.Table.getTableColumnsFromDB (   self)

Definition at line 814 of file odb.py.

def pyclearsilver.odb.Table.getTableName (   self)

Definition at line 753 of file odb.py.

def pyclearsilver.odb.Table.hasColumn (   self,
  column_name 
)

Column Definition.

Definition at line 883 of file odb.py.

def pyclearsilver.odb.Table.hasColumn (   self,
  name 
)

Definition at line 1000 of file odb.py.

def pyclearsilver.odb.Table.hasReplication (   self)

Definition at line 713 of file odb.py.

def pyclearsilver.odb.Table.hasValueColumn (   self)

Definition at line 997 of file odb.py.

def pyclearsilver.odb.Table.hasVColumn (   self,
  name 
)

Definition at line 1002 of file odb.py.

def pyclearsilver.odb.Table.renameTable (   self,
  newTableName,
  cursor = None 
)

Definition at line 805 of file odb.py.

def pyclearsilver.odb.Table.setTableName (   self,
  tablename 
)

Definition at line 754 of file odb.py.

def pyclearsilver.odb.Table.subclassinit (   self)

Definition at line 654 of file odb.py.

Member Data Documentation

pyclearsilver.odb.Table.__col_def_hash
private

Definition at line 687 of file odb.py.

pyclearsilver.odb.Table.__column_list
private

Definition at line 678 of file odb.py.

pyclearsilver.odb.Table.__columns_locked
private

Definition at line 680 of file odb.py.

pyclearsilver.odb.Table.__db
private

Definition at line 662 of file odb.py.

pyclearsilver.odb.Table.__defaultRowClass
private

Definition at line 667 of file odb.py.

pyclearsilver.odb.Table.__defaultRowListClass
private

Definition at line 672 of file odb.py.

pyclearsilver.odb.Table.__fullTextSearchable
private

Definition at line 692 of file odb.py.

pyclearsilver.odb.Table.__has_value_column
private

Definition at line 681 of file odb.py.

pyclearsilver.odb.Table.__indices
private

Definition at line 683 of file odb.py.

pyclearsilver.odb.Table.__primary_key_list
private

Definition at line 689 of file odb.py.

pyclearsilver.odb.Table.__relations_by_table
private

Definition at line 690 of file odb.py.

pyclearsilver.odb.Table.__replication
private

Definition at line 664 of file odb.py.

pyclearsilver.odb.Table.__table_name
private

Definition at line 663 of file odb.py.

pyclearsilver.odb.Table.__vcol_def_hash
private

Definition at line 688 of file odb.py.

pyclearsilver.odb.Table.__vcolumn_list
private

Definition at line 679 of file odb.py.

pyclearsilver.odb.Table._triggers
private

Definition at line 684 of file odb.py.


The documentation for this class was generated from the following file:


pyclearsilver
Author(s): Scott Noob Hassan
autogenerated on Mon Jun 10 2019 15:51:13