Public Member Functions | Static Public Member Functions | Protected Member Functions

BizDataObj_SQLHelper Class Reference

Public Member Functions

 buildQuerySQL ($dataObj)
 buildUpdateSQL ($dataObj)
 buildUpdateSQLwithCondition ($dataObj, $setValue, $condition=null)
 buildDeleteSQL ($dataObj)
 buildDeleteSQLwithCondition ($dataObj, $condition=null)
 buildInsertSQL ($dataObj, $joinValues=null)

Static Public Member Functions

static instance ()

Protected Member Functions

 getDataSqlObj ()
 getNewDataSqlObj ()

Detailed Description

Definition at line 25 of file BizDataObj_SQLHelper.php.


Member Function Documentation

buildDeleteSQL ( dataObj )

Build delete-sql DELETE FROM table WHERE idcol1='id1' AND idcol2='id2'

Parameters:
BizDataObj$dataObj
Returns:
string SQL statement

Definition at line 281 of file BizDataObj_SQLHelper.php.

buildInsertSQL ( dataObj,
joinValues = null 
)

Build insert-sql INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)

Parameters:
BizDataObj$dataObj
array$joinValuesarray of join values
Returns:
string Insert-SQL statement

Definition at line 339 of file BizDataObj_SQLHelper.php.

Here is the call graph for this function:

buildQuerySQL ( dataObj )

Build the Select SQL statement based on the fields and search/sort rule

Parameters:
BizDataObj$dataObj
Returns:
void

Definition at line 81 of file BizDataObj_SQLHelper.php.

Here is the call graph for this function:

buildUpdateSQL ( dataObj )

Build update sql UPDATE table SET col1=val1, col2=val2 ... WHERE idcol1='id1' AND idcol2='id2'

Parameters:
BizDataObj$dataObj
Returns:
mixed
Todo:
consider the record data on main table as well as join table, this function can return a sql array.

Definition at line 175 of file BizDataObj_SQLHelper.php.

Here is the call graph for this function:

getDataSqlObj (  ) [protected]

Get curent BizDataSql object, if object=null, create new object

Returns:
BizDataSql

Definition at line 56 of file BizDataObj_SQLHelper.php.

getNewDataSqlObj (  ) [protected]

Get new BizDataSql object and store on internal variable (current object)

Returns:
BizDataSql

Definition at line 68 of file BizDataObj_SQLHelper.php.

Here is the caller graph for this function:

static instance (  ) [static]

Get the singleton instance

Returns:
BizDataObj_SQLHelper BizDataObj_SQLHelper object

Definition at line 44 of file BizDataObj_SQLHelper.php.

Here is the caller graph for this function:


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