phpDocumentor openbiz.bin.data.private
[ class tree: openbiz.bin.data.private ] [ index: openbiz.bin.data.private ] [ all elements ]

Procedural File: BizDataObj_SQLHelper.php

Source Location: /data/private/BizDataObj_SQLHelper.php

Page Details

PHPOpenBiz Framework

LICENSE

This source file is subject to the BSD license that is bundled with this package in the file LICENSE.txt.

Version:  $Id$
Link:  http://www.phpopenbiz.org/
License:  http://www.opensource.org/licenses/bsd-license.php
Copyright:  Copyright © 2005-2009, Rocky Swen
Classes
Class Description
BizDataObj_SQLHelper Class BizDataObj_SQLHelper takes care of building sql for BizDataObj BizDataObj_SQLHelper is singleton object
Functions
BuildDeleteSQL  [line 277]

string BuildDeleteSQL( BizDataObj $dataObj  )

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

Parameters:
BizDataObj   $dataObj: 

API Tags:
Return:  SQL statement


[ Top ]
BuildDeleteSQLforTableJoin  [line 293]

array BuildDeleteSQLforTableJoin( BizDataObj $dataObj  )

Build delete-SQL for table join

NOTE: Added by Jixian on 2009-02-16 for implement onSaveDataObj

Parameters:
BizDataObj   $dataObj: 

API Tags:
Return:  array of SQL


[ Top ]
BuildInsertSQL  [line 319]

string BuildInsertSQL( BizDataObj $dataObj, [ $joinValues = null]  )

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

Parameters:
BizDataObj   $dataObj: 
   $joinValues: 

API Tags:
Return:  Insert-SQL statement


[ Top ]
BuildInsertSQLforTableExtension  [line 439]

array BuildInsertSQLforTableExtension( BizDataObj $dataObj  )

Build insert-SQL for table extension

NOTE: Added by Jixian on 2009-02-23 for implement onSaveDataObj

Parameters:
BizDataObj   $dataObj: 

API Tags:
Return:  array of SQL


[ Top ]
BuildInsertSQLforTableJoin  [line 381]

array BuildInsertSQLforTableJoin( BizDataObj $dataObj  )

Build insert-SQL for table join

NOTE: Added by Jixian on 2009-02-16 for implement onSaveDataObj

Parameters:
BizDataObj   $dataObj: 

API Tags:
Return:  array of SQL


[ Top ]
BuildUpdateSQL  [line 154]

mixed BuildUpdateSQL( mixed $dataObj, BizDataObj $dataobj  )

Build update sql UPDATE table SET col1=val1, col2=val2 ...

WHERE idcol1='id1' AND idcol2='id2'

Parameters:
BizDataObj   $dataobj: 


[ Top ]
BuildUpdateSQLforTableJoin  [line 217]

array BuildUpdateSQLforTableJoin( BizDataObj $dataObj  )

Build update-SQL for table join

NOTE: Added by Jixian on 2009-02-16 for implement onSaveDataObj

Parameters:
BizDataObj   $dataObj: 

API Tags:
Return:  array of SQL


[ Top ]
RuleToSql  [line 495]

string RuleToSql( BizDataObj $dataObj, string $rule  )

Convert search/sort rule to sql clause, replace [fieldName] with table.column openbiz SQL expression as : "[fieldName] opr 'Value' AND/OR [fieldName] opr 'Value'...". "()" is valid syntax

Parameters:
BizDataObj   $dataObj: 
string   $rule:  "[fieldName] ..."

API Tags:
Return:  sql statement


[ Top ]
substr_lr  [line 599]

string substr_lr( mixed &$str, mixed $left, mixed $right, mixed &$startpos, [mixed $findfirst = false]  )

substr_lr() - help function (helper).

Get the sub string whose left and right boundary character is $left and $right. The search is in $str, starting from position of $startpos. If $findfirst is true, $left must be the charater on the $startpos.



[ Top ]
_compKeyRuleToSql  [line 543]

string _compKeyRuleToSql( string $compColumn, string $compValue  )
Parameters:
string   $compColumn: 
string   $compValue: 

API Tags:
Return:  SQL rule statement


[ Top ]
_convertSqlExpression  [line 569]

string _convertSqlExpression( BizDataObj $dataObj, string $sqlExpr  )

Convert Sql Expression Replace [field name] in the SQL expression with table_alias.column

Parameters:
BizDataObj   $dataObj:  - the instance of BizDataObj
string   $sqlExpr:  - SQL expression supported by the database engine. The syntax is FUNC([FieldName1]...[FieldName2]...)

API Tags:
Return:  real sql expression with column names


[ Top ]


Documentation generated on Tue, 22 Dec 2009 03:02:35 -0800 by phpDocumentor 1.3.0RC3