Classes | Functions | Variables
pyclearsilver::odb Namespace Reference

Classes

class  _ODB_BigString
class  _ODB_Blob
class  _ODB_CreatedStamp
class  _ODB_CreatedStampMS
class  _ODB_DateTime
class  _ODB_Enumeration
class  _ODB_FixedString
class  _ODB_GUID
class  _ODB_IncInteger
class  _ODB_Integer
class  _ODB_ModifiedStamp
class  _ODB_Object
class  _ODB_Real
class  _ODB_TimeStamp
class  _ODB_VarString
class  _ReflectTable
class  Connection
class  Cursor
class  Database
class  eDuplicateKey
class  eInternalError
class  eInvalidData
class  eInvalidJoinSpec
class  eInvalidMatchSpec
class  eNoMatchingRows
class  eNonUniqueMatchSpec
class  eNoSuchColumn
class  eUnsavedObjectLost
class  odb_Exception
class  ODB_FixedPoint
class  Replication_DeletedTable
class  Replication_KeyValueTable
class  Replication_LogRow
class  Replication_LogTable
class  ReplicationLog
class  Row
class  Table
 Table. More...

Functions

def __del__
def __deleteRow
def __delitem__
def __getattr__
def __getitem__
def __insertRow
def __len__
def __packVColumn
 #warn(self) val2 = self.getDB().decode(val) warn("val2", repr(val2)) self.__vcoldata = marshal.loads(val2)
def __repr__
def __setattr__
def __setitem__
def __updateRowList
def _getRaw
def beginTransaction
def changedList
 changedList()
def checkRowActive
def commitTransaction
def copyFrom
def createIndices
 self.alterTableToMatch(tbl)
def createTables
 schema creation code
def createTrigger
def createTriggers
def databaseSizeForColumn
def delete
def deleteRow
 deleteRow(col_match_spec)
def discard
def dropIndices
def dropTrigger
def fetchAllRows
 fetchAllRows()
def fetchRow
 fetchRow(col_match_spec)
def fetchRowCount
def fetchRows
 fetchRows(col_match_spec)
def fetchRowUsingPrimaryKey
def fillDefaults
def get
def has_key
def inc
def items
def keys
def listFields
def listFieldsDict
def listIndices
def listTables
def listTriggers
def lookup
def lookupCreate
def lookupRows
def newRow
def parseFieldType
def r_deleteRow
 r_deleteRow(a_row_obj,cursor = None)
def r_insertRow
 InsertRow(a_row_obj,cursor = None)
def r_updateRow
 r_updateRow(a_row_obj,cursor = None)
def reflect
 parse the schema of an existing db and build table objects to reflect the schema.
def repl_parsePrimaryKey
def rollbackTransaction
def save
def synchronizeSchema
def values

Variables

 __colchanged_dict
 __coldata
 __vcolchanged
 __vcoldata
 _inside_getattr
 _rowInactive
 _should_insert
 _should_replace
tuple all_rows = cursor.fetchall()
list aval = a_row[col_num]
int col_num = 0
tuple cursor = self.defaultCursor()
 for name, tbl in self._tables.items(): tbl.db = None
dictionary data_dict = {}
 bug out is the user justs want the raw rows
int DEBUG = 0
 kInteger = "kInteger" # - kFixedString = "kFixedString" # size kVarString = "kVarString" # maxsize kBigString = "kBigString" # - kIncInteger = "kIncInteger" # - kDateTime = "kDateTime" kTimeStamp = "kTimeStamp" kReal = "kReal"
tuple kBigString = _ODB_BigString()
tuple kBlob = _ODB_Blob()
tuple kCreatedStamp = _ODB_CreatedStamp()
tuple kCreatedStampMS = _ODB_CreatedStampMS()
tuple kDateTime = _ODB_DateTime()
tuple kEnumeration = _ODB_Enumeration()
tuple kFixedPoint = ODB_FixedPoint()
tuple kFixedString = _ODB_FixedString()
tuple kGUID = _ODB_GUID()
tuple kIncInteger = _ODB_IncInteger()
tuple kInteger = _ODB_Integer()
tuple kModifiedStamp = _ODB_ModifiedStamp()
tuple kReal = _ODB_Real()
tuple kTimeStamp = _ODB_TimeStamp()
tuple kVarString = _ODB_VarString()
list name = parts[1]
tuple newrowobj = self.__defaultRowClass(self,data_dict,joined_cols = joined_cols)
tuple parts = string.split(fullname, ".", 1)
tuple return_rows = self.__defaultRowListClass()
string sql = " LIMIT %s OFFSET %s "
 log("limit,skip = %s,%s" % (limit_to,skip_to))
list table = parts[0]

Function Documentation

----- utility stuff ----------------------------------

Definition at line 504 of file odb.py.

def pyclearsilver.odb.__deleteRow (   self,
  a_row,
  cursor = None 
) [private]

Definition at line 1500 of file odb.py.

def pyclearsilver.odb.__delitem__ (   self,
  key,
  data 
)

Definition at line 2082 of file odb.py.

---- class emulation --------------------------------

Definition at line 517 of file odb.py.

def pyclearsilver::odb::__getitem__ (   self,
  tblname 
)

Definition at line 507 of file odb.py.

def pyclearsilver.odb.__insertRow (   self,
  a_row_obj,
  cursor = None,
  replace = 0 
) [private]

Definition at line 1584 of file odb.py.

def pyclearsilver.odb.__len__ (   self)

Definition at line 2147 of file odb.py.

def pyclearsilver.odb.__packVColumn (   self) [private]

#warn(self) val2 = self.getDB().decode(val) warn("val2", repr(val2)) self.__vcoldata = marshal.loads(val2)

Definition at line 1960 of file odb.py.

Definition at line 1979 of file odb.py.

def pyclearsilver.odb.__setattr__ (   self,
  key,
  val 
)

Definition at line 1999 of file odb.py.

def pyclearsilver.odb.__setitem__ (   self,
  key,
  data 
)

Definition at line 2058 of file odb.py.

def pyclearsilver.odb.__updateRowList (   self,
  a_row_list,
  cursor = None 
) [private]

Definition at line 1518 of file odb.py.

def pyclearsilver.odb._getRaw (   self,
  key,
  convert = 1 
) [private]

---- dict emulation ---------------------------------

Definition at line 2016 of file odb.py.

def pyclearsilver.odb.beginTransaction (   self,
  cursor = None 
)

Definition at line 527 of file odb.py.

changedList()

returns a list of tuples for the columns which have changed

changedList() -> [ ('name', 'fred'), ('age', 20) ]

Definition at line 2221 of file odb.py.

Definition at line 2264 of file odb.py.

def pyclearsilver.odb.commitTransaction (   self,
  cursor = None 
)

Definition at line 534 of file odb.py.

def pyclearsilver.odb.copyFrom (   self,
  source 
)

Definition at line 2097 of file odb.py.

self.alterTableToMatch(tbl)

Definition at line 566 of file odb.py.

schema creation code

Definition at line 552 of file odb.py.

def pyclearsilver.odb.createTrigger (   self,
  triggerName,
  sql,
  cursor = None 
)

Definition at line 597 of file odb.py.

Definition at line 582 of file odb.py.

def pyclearsilver.odb.databaseSizeForColumn (   self,
  key 
)

Definition at line 2268 of file odb.py.

def pyclearsilver.odb.delete (   self,
  cursor = None 
)

Definition at line 2237 of file odb.py.

def pyclearsilver.odb.deleteRow (   self,
  col_match_spec,
  where = None 
)

deleteRow(col_match_spec)

The col_match_spec paramaters must include all primary key columns.

Ex: a_row = tbl.fetchRow( ("order_id", 1) ) a_row = tbl.fetchRow( [ ("order_id", 1), ("enterTime", now) ] )

Definition at line 1714 of file odb.py.

def pyclearsilver.odb.discard (   self)

Definition at line 2231 of file odb.py.

Definition at line 575 of file odb.py.

def pyclearsilver.odb.dropTrigger (   self,
  triggerName,
  cursor = None 
)

Definition at line 601 of file odb.py.

def pyclearsilver.odb.fetchAllRows (   self,
  join2 = None 
)

fetchAllRows()

Ex: a_row_list = tbl.fetchRows( ("order_id", 1) ) a_row_list = tbl.fetchRows( [ ("order_id", 1), ("enterTime", now) ] )

Definition at line 1803 of file odb.py.

def pyclearsilver.odb.fetchRow (   self,
  col_match_spec,
  cursor = None,
  join2 = None 
)

fetchRow(col_match_spec)

The col_match_spec paramaters must include all primary key columns.

Ex: a_row = tbl.fetchRow( ("order_id", 1) ) a_row = tbl.fetchRow( [ ("order_id", 1), ("enterTime", now) ] )

Definition at line 1738 of file odb.py.

def pyclearsilver.odb.fetchRowCount (   self,
  col_match_spec = None,
  cursor = None,
  where = None 
)

Definition at line 1778 of file odb.py.

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

fetchRows(col_match_spec)

Ex: a_row_list = tbl.fetchRows( ("order_id", 1) ) a_row_list = tbl.fetchRows( [ ("order_id", 1), ("enterTime", now) ] )

Definition at line 1759 of file odb.py.

def pyclearsilver.odb.fetchRowUsingPrimaryKey (   self,
  args 
)

Definition at line 1824 of file odb.py.

---------------------------------- real interface

Definition at line 2208 of file odb.py.

def pyclearsilver.odb.get (   self,
  key,
  default = None 
)

Definition at line 2169 of file odb.py.

def pyclearsilver.odb.has_key (   self,
  key 
)

Definition at line 2157 of file odb.py.

def pyclearsilver.odb.inc (   self,
  key,
  count = 1 
)

Definition at line 2190 of file odb.py.

def pyclearsilver.odb.items (   self)

Definition at line 2120 of file odb.py.

def pyclearsilver.odb.keys (   self)

Definition at line 2105 of file odb.py.

def pyclearsilver.odb.listFields (   self,
  table_name,
  cursor = None 
)

Definition at line 643 of file odb.py.

def pyclearsilver.odb.listFieldsDict (   self,
  table_name,
  cursor = None 
)

Definition at line 639 of file odb.py.

def pyclearsilver.odb.listIndices (   self,
  tableName,
  cursor = None 
)

Definition at line 634 of file odb.py.

def pyclearsilver.odb.listTables (   self,
  cursor = None 
)

Definition at line 626 of file odb.py.

def pyclearsilver.odb.listTriggers (   self,
  cursor = None 
)

Definition at line 630 of file odb.py.

def pyclearsilver.odb.lookup (   self,
  join2 = None,
  kws 
)

Definition at line 1838 of file odb.py.

def pyclearsilver.odb.lookupCreate (   self,
  kws 
)

Definition at line 1860 of file odb.py.

def pyclearsilver.odb.lookupRows (   self,
  join2 = None,
  kws 
)

Definition at line 1849 of file odb.py.

def pyclearsilver.odb.newRow (   self,
  replace = 0,
  save = 0,
  kws 
)

Definition at line 1810 of file odb.py.

Definition at line 318 of file odb.py.

def pyclearsilver.odb.r_deleteRow (   self,
  a_row_obj,
  cursor = None 
)

r_deleteRow(a_row_obj,cursor = None)

normally this is called from within the Row "delete()" method but you can call it yourself if you want

Definition at line 1670 of file odb.py.

def pyclearsilver.odb.r_insertRow (   self,
  a_row_obj,
  cursor = None,
  replace = 0 
)

InsertRow(a_row_obj,cursor = None)

normally this is called from within the Row "save()" method but you can call it yourself if you want

Definition at line 1693 of file odb.py.

def pyclearsilver.odb.r_updateRow (   self,
  a_row_obj,
  cursor = None 
)

r_updateRow(a_row_obj,cursor = None)

normally this is called from within the Row "save()" method but you can call it yourself if you want

Definition at line 1682 of file odb.py.

def pyclearsilver.odb.reflect (   self)

parse the schema of an existing db and build table objects to reflect the schema.

Definition at line 608 of file odb.py.

Definition at line 2404 of file odb.py.

def pyclearsilver.odb.rollbackTransaction (   self,
  cursor = None 
)

Definition at line 541 of file odb.py.

def pyclearsilver.odb.save (   self,
  cursor = None 
)

Definition at line 2247 of file odb.py.

Definition at line 614 of file odb.py.

def pyclearsilver.odb.values (   elf)

Definition at line 2136 of file odb.py.


Variable Documentation

Definition at line 2231 of file odb.py.

Definition at line 2231 of file odb.py.

Definition at line 2058 of file odb.py.

Definition at line 2231 of file odb.py.

Definition at line 1984 of file odb.py.

Definition at line 2237 of file odb.py.

Definition at line 2247 of file odb.py.

Definition at line 2247 of file odb.py.

tuple pyclearsilver::odb::all_rows = cursor.fetchall()

Definition at line 1458 of file odb.py.

Definition at line 1483 of file odb.py.

Definition at line 1465 of file odb.py.

tuple pyclearsilver::odb::cursor = self.defaultCursor()

for name, tbl in self._tables.items(): tbl.db = None

Definition at line 496 of file odb.py.

bug out is the user justs want the raw rows

Definition at line 1463 of file odb.py.

kInteger = "kInteger" # - kFixedString = "kFixedString" # size kVarString = "kVarString" # maxsize kBigString = "kBigString" # - kIncInteger = "kIncInteger" # - kDateTime = "kDateTime" kTimeStamp = "kTimeStamp" kReal = "kReal"

kEnumeration = "kEnumeration" # -

Definition at line 118 of file odb.py.

Definition at line 305 of file odb.py.

Definition at line 306 of file odb.py.

Definition at line 311 of file odb.py.

Definition at line 312 of file odb.py.

Definition at line 307 of file odb.py.

Definition at line 315 of file odb.py.

Definition at line 297 of file odb.py.

Definition at line 303 of file odb.py.

Definition at line 316 of file odb.py.

Definition at line 302 of file odb.py.

Definition at line 301 of file odb.py.

Definition at line 310 of file odb.py.

Definition at line 314 of file odb.py.

Definition at line 308 of file odb.py.

Definition at line 304 of file odb.py.

Definition at line 1472 of file odb.py.

tuple pyclearsilver::odb::newrowobj = self.__defaultRowClass(self,data_dict,joined_cols = joined_cols)

Definition at line 1493 of file odb.py.

tuple pyclearsilver::odb::parts = string.split(fullname, ".", 1)

Definition at line 1470 of file odb.py.

tuple pyclearsilver::odb::return_rows = self.__defaultRowListClass()

Definition at line 1455 of file odb.py.

string pyclearsilver::odb::sql = " LIMIT %s OFFSET %s "

log("limit,skip = %s,%s" % (limit_to,skip_to))

Definition at line 1436 of file odb.py.

Definition at line 1471 of file odb.py.



pyclearsilver
Author(s): Scott Hassan/hassan@willowgarage.com
autogenerated on Sat Dec 28 2013 17:47:30