ClassInterface INFA_DBMS_TABLEOBJ

Description

interface to handle a database table object

Located in /db/INFA_DBMS_TABLEOBJ.phpclass (line 26)


	
			
Method Summary
 boolean dbDelete ([boolean $backupData = FALSE], [boolean $debug = FALSE])
 int dbInsert ([boolean $debug = FALSE])
 boolean dbReplace ([boolean $debug = FALSE], [boolean $ignorPopulated = FALSE])
 mixed dbSave ([boolean $debug = FALSE])
 array getDBRow ([boolean $withoutNull = True], [boolean $debug = False], [boolean $withoutOV = False], [boolean $fldAutoPopulate = True])
 array getDefaults ([boolean $debug = FALSE])
 boolean setDBRow (array $row, [boolean $asPopulated = True], [boolean $debug = False])
 void setLinkedTableRow (string $tblName, string $dbCmd, array $aRow, [boolean $debug = FALSE])
Methods
dbDelete (line 125)

deletes the row from the database

boolean dbDelete ([boolean $backupData = FALSE], [boolean $debug = FALSE])
  • boolean $backupData
  • boolean $debug
dbInsert (line 100)

inserts a new row to the table

  • return: returns the autoIncFld ID if exists or 1 on success
int dbInsert ([boolean $debug = FALSE])
  • boolean $debug: show debug info
dbReplace (line 114)

replaces a row in the table

if the object has not been populated (!$this->populateTS) FALSE is returned

boolean dbReplace ([boolean $debug = FALSE], [boolean $ignorPopulated = FALSE])
  • boolean $debug: show debug info
  • boolean $ignorPopulated: (if false the table MUST have been populated)
dbSave (line 90)

save the Object

mixed dbSave ([boolean $debug = FALSE])
  • boolean $debug: SHOW DEBUG INFO
getDBRow (line 63)

returns a field => value array

used also in insert and update statements

make sure to not include some special values and object columns are serialised

array getDBRow ([boolean $withoutNull = True], [boolean $debug = False], [boolean $withoutOV = False], [boolean $fldAutoPopulate = True])
  • boolean $withoutNull: if True null values are not added to the array
  • boolean $debug
  • boolean $withoutOV: if False and $this->hasObjVals() the object value array is added with index __OCSP_OBJ_VALS__
  • boolean $fldAutoPopulate
getDefaults (line 41)

returns an array of db default values

  • access: public
array getDefaults ([boolean $debug = FALSE])
  • boolean $debug
setDBRow (line 80)

sets a database row to the object fields

sets each key (=columname) value

if $row['__OCSP_OBJ_VALS__'] isset and an array this values are set as object values else if $asPopulated object values are loaded

boolean setDBRow (array $row, [boolean $asPopulated = True], [boolean $debug = False])
  • array $row: the row form a select * from DBMS_TABLEOBJ::myTable
  • boolean $asPopulated: set populateTS as if the object has been populated
  • boolean $debug
setLinkedTableRow (line 155)

sets the row of an other table

this method is used to cache form values of other tables which are joined in to $this->myTable

this rows must be considert in insert,update,delete

possible commands are

  • _OCSP_DBCMD_INSERT_ (insert a new row)
  • _OCSP_DBCMD_REPLACE_ (update an existing row or insert if not exists)
  • _OCSP_DBCMD_UPDATE_ (update an existing row)
  • _OCSP_DBCMD_DELETE_ (delete an existing row)

void setLinkedTableRow (string $tblName, string $dbCmd, array $aRow, [boolean $debug = FALSE])
  • string $tblName
  • string $dbCmd
  • array $aRow
  • boolean $debug

Documentation generated on Thu, 08 Jan 2009 17:44:27 +0100 by phpDocumentor 1.4.0a2