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 |
More... | |
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 |
More... | |
class | Row |
class | Table |
Table. More... | |
Functions | |
def | __del__ (self) |
--— utility stuff -------------------------------— More... | |
def | __deleteRow (self, a_row, cursor=None) |
def | __delitem__ (self, key, data) |
def | __getattr__ (self,key) |
-— class emulation -----------------------------— More... | |
def | __getitem__ (self, tblname) |
def | __insertRow (self, a_row_obj, cursor=None, replace=0) |
def | __len__ (self) |
def | __packVColumn (self) |
#warn(self) val2 = self.getDB().decode(val) warn("val2", repr(val2)) self.__vcoldata = marshal.loads(val2) More... | |
def | __repr__ (self) |
def | __setattr__ (self, key, val) |
def | __setitem__ (self, key, data) |
def | __updateRowList (self, a_row_list, cursor=None) |
def | _getRaw (self, key, convert=1) |
-— dict emulation ------------------------------— More... | |
def | beginTransaction (self, cursor=None) |
def | changedList (self) |
changedList() More... | |
def | checkRowActive (self) |
def | commitTransaction (self, cursor=None) |
def | copyFrom (self, source) |
def | createIndices (self) |
self.alterTableToMatch(tbl) More... | |
def | createTables (self) |
schema creation code More... | |
def | createTrigger (self, triggerName, sql, cursor=None) |
def | createTriggers (self) |
def | databaseSizeForColumn (self, key) |
def | delete (self, cursor=None) |
def | deleteRow (self, col_match_spec, where=None) |
deleteRow(col_match_spec) More... | |
def | discard (self) |
def | dropIndices (self) |
def | dropTrigger (self, triggerName, cursor=None) |
def | fetchAllRows (self, join2=None) |
fetchAllRows() More... | |
def | fetchRow (self, col_match_spec, cursor=None, join2=None) |
fetchRow(col_match_spec) More... | |
def | fetchRowCount (self, col_match_spec=None, cursor=None, where=None) |
def | 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) More... | |
def | fetchRowUsingPrimaryKey (self, args) |
def | fillDefaults (self) |
real interface More... | |
def | get (self, key, default=None) |
def | has_key (self, key) |
def | inc (self, key, count=1) |
def | items (self) |
def | keys (self) |
def | listFields (self, table_name, cursor=None) |
def | listFieldsDict (self, table_name, cursor=None) |
def | listIndices (self, tableName, cursor=None) |
def | listTables (self, cursor=None) |
def | listTriggers (self, cursor=None) |
def | lookup (self, join2=None, kws) |
def | lookupCreate (self, kws) |
def | lookupRows (self, join2=None, kws) |
def | newRow (self, replace=0, save=0, kws) |
def | parseFieldType (dataStr) |
def | r_deleteRow (self, a_row_obj, cursor=None) |
r_deleteRow(a_row_obj,cursor = None) More... | |
def | r_insertRow (self, a_row_obj, cursor=None, replace=0) |
InsertRow(a_row_obj,cursor = None) More... | |
def | r_updateRow (self, a_row_obj, cursor=None) |
r_updateRow(a_row_obj,cursor = None) More... | |
def | reflect (self) |
parse the schema of an existing db and build table objects to reflect the schema. More... | |
def | repl_parsePrimaryKey (key) |
def | rollbackTransaction (self, cursor=None) |
def | save (self, cursor=None) |
def | synchronizeSchema (self) |
def | values (elf) |
Variables | |
__colchanged_dict | |
__coldata | |
__vcolchanged | |
__vcoldata | |
_cursor | |
_inside_getattr | |
_rowInactive | |
_should_insert | |
_should_replace | |
_tables | |
for name, tbl in self._tables.items(): tbl.db = None More... | |
all_rows = cursor.fetchall() | |
aval = a_row[col_num] | |
c_name | |
c_options | |
c_type | |
int | col_num = 0 |
conn | |
cursor = self.defaultCursor() | |
dictionary | data_dict = {} |
bug out is the user justs want the raw rows More... | |
int | DEBUG = 0 |
kInteger = "kInteger" # - kFixedString = "kFixedString" # size kVarString = "kVarString" # maxsize kBigString = "kBigString" # - kIncInteger = "kIncInteger" # - kDateTime = "kDateTime" kTimeStamp = "kTimeStamp" kReal = "kReal" More... | |
kBigString = _ODB_BigString() | |
kBlob = _ODB_Blob() | |
kCreatedStamp = _ODB_CreatedStamp() | |
kCreatedStampMS = _ODB_CreatedStampMS() | |
kDateTime = _ODB_DateTime() | |
kEnumeration = _ODB_Enumeration() | |
kFixedPoint = ODB_FixedPoint() | |
kFixedString = _ODB_FixedString() | |
kGUID = _ODB_GUID() | |
kIncInteger = _ODB_IncInteger() | |
kInteger = _ODB_Integer() | |
kModifiedStamp = _ODB_ModifiedStamp() | |
kReal = _ODB_Real() | |
kTimeStamp = _ODB_TimeStamp() | |
kVarString = _ODB_VarString() | |
name = parts[1] | |
newrowobj = self.__defaultRowClass(self,data_dict,joined_cols = joined_cols) | |
parts = string.split(fullname, ".", 1) | |
return_rows = self.__defaultRowListClass() | |
string | sql = sql+" LIMIT %s OFFSET %s " |
log("limit,skip = %s,%s" % (limit_to,skip_to)) More... | |
table = parts[0] | |
def pyclearsilver.odb.__del__ | ( | self | ) |
|
private |
def pyclearsilver.odb.__getattr__ | ( | self, | |
key | |||
) |
|
private |
|
private |
|
private |
|
private |
def pyclearsilver.odb.beginTransaction | ( | self, | |
cursor = None |
|||
) |
def pyclearsilver.odb.changedList | ( | self | ) |
returns a list of tuples for the columns which have changed
changedList() -> [ ('name', 'fred'), ('age', 20) ]
def pyclearsilver.odb.commitTransaction | ( | self, | |
cursor = None |
|||
) |
def pyclearsilver.odb.createIndices | ( | self | ) |
def pyclearsilver.odb.createTables | ( | self | ) |
def pyclearsilver.odb.createTrigger | ( | self, | |
triggerName, | |||
sql, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.deleteRow | ( | self, | |
col_match_spec, | |||
where = None |
|||
) |
def pyclearsilver.odb.dropTrigger | ( | self, | |
triggerName, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.fetchAllRows | ( | self, | |
join2 = None |
|||
) |
Ex: a_row_list = tbl.fetchRows( ("order_id", 1) ) a_row_list = tbl.fetchRows( [ ("order_id", 1), ("enterTime", now) ] )
def pyclearsilver.odb.fetchRow | ( | self, | |
col_match_spec, | |||
cursor = None , |
|||
join2 = None |
|||
) |
def pyclearsilver.odb.fetchRowCount | ( | self, | |
col_match_spec = None , |
|||
cursor = None , |
|||
where = None |
|||
) |
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 |
|||
) |
def pyclearsilver.odb.fetchRowUsingPrimaryKey | ( | self, | |
args | |||
) |
def pyclearsilver.odb.listFields | ( | self, | |
table_name, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.listFieldsDict | ( | self, | |
table_name, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.listIndices | ( | self, | |
tableName, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.lookupRows | ( | self, | |
join2 = None , |
|||
kws | |||
) |
def pyclearsilver.odb.newRow | ( | self, | |
replace = 0 , |
|||
save = 0 , |
|||
kws | |||
) |
def pyclearsilver.odb.r_deleteRow | ( | self, | |
a_row_obj, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.r_insertRow | ( | self, | |
a_row_obj, | |||
cursor = None , |
|||
replace = 0 |
|||
) |
def pyclearsilver.odb.r_updateRow | ( | self, | |
a_row_obj, | |||
cursor = None |
|||
) |
def pyclearsilver.odb.reflect | ( | self | ) |
def pyclearsilver.odb.rollbackTransaction | ( | self, | |
cursor = None |
|||
) |
|
private |
for name, tbl in self._tables.items(): tbl.db = None
dictionary pyclearsilver.odb.data_dict = {} |
int pyclearsilver.odb.DEBUG = 0 |
pyclearsilver.odb.kBigString = _ODB_BigString() |
pyclearsilver.odb.kCreatedStamp = _ODB_CreatedStamp() |
pyclearsilver.odb.kCreatedStampMS = _ODB_CreatedStampMS() |
pyclearsilver.odb.kDateTime = _ODB_DateTime() |
pyclearsilver.odb.kEnumeration = _ODB_Enumeration() |
pyclearsilver.odb.kFixedPoint = ODB_FixedPoint() |
pyclearsilver.odb.kFixedString = _ODB_FixedString() |
pyclearsilver.odb.kIncInteger = _ODB_IncInteger() |
pyclearsilver.odb.kInteger = _ODB_Integer() |
pyclearsilver.odb.kModifiedStamp = _ODB_ModifiedStamp() |
pyclearsilver.odb.kTimeStamp = _ODB_TimeStamp() |
pyclearsilver.odb.kVarString = _ODB_VarString() |
pyclearsilver.odb.newrowobj = self.__defaultRowClass(self,data_dict,joined_cols = joined_cols) |
pyclearsilver.odb.return_rows = self.__defaultRowListClass() |
string pyclearsilver.odb.sql = sql+" LIMIT %s OFFSET %s " |