BizDataSql __construct(
)
|
|
API Tags:
void AddAssociation(
array
$assc
)
|
|
Add association in the SQL
Parameters:
|
array |
$assc: |
additional SQL statment |
API Tags:
Add a join table in the sql statement Ti alias
SELECT T1.col, T2.col FROM table1 T1 INNER JOIN table2 T2 ON T1.col1=T2.col1 LEFT JOIN table3 T3 ON T1.col1=T3.col1 WHERE
Parameters:
API Tags:
void AddMainTable(
string
$mainTable
)
|
|
Add main table in the sql statement T0 alias
Parameters:
|
string |
$mainTable: |
main table name |
API Tags:
void AddOrderBy(
string
$orderBy
)
|
|
Add order by clause
Parameters:
|
string |
$orderBy: |
SQL ORDER BY clause |
API Tags:
void AddOtherSQL(
string
$otherSQL
)
|
|
Add other SQL clause
Parameters:
|
string |
$otherSQL: |
additional SQL statment |
API Tags:
void AddSqlExpression(
string
$sqlExpr, [string
$alias = null]
)
|
|
Add SQL expression in the sql statement sqlExpr has format of "...join1.column1, ... join2.column2...". Replace join with alias
Parameters:
|
string |
$sqlExpr: |
sql expression |
|
string |
$alias: |
sql alias |
API Tags:
void AddSqlWhere(
string
$sqlWhere
)
|
|
Add the where clause (search rule) into the SQL statement
Parameters:
|
string |
$sqlWhere: |
SQL WHERE clause |
API Tags:
void AddTableColumn(
string
$join, string
$column
)
|
|
Add a join table and cloumn in the sql statement
Parameters:
|
string |
$join: |
table join name |
|
string |
$column: |
column name |
API Tags:
string GetJoinAlias(
string
$join
)
|
|
Get join table alias
Parameters:
|
string |
$join: |
name of join |
API Tags:
| Return: | join table alias |
| Access: | public |
Get the SQL statement
API Tags:
| Return: | statement string |
| Access: | public |
string GetTableColumn(
string
$join, string
$col
)
|
|
Get table column, combine a table with a column.
Parameters:
|
string |
$join: |
join name |
|
string |
$col: |
column |
API Tags:
| Return: | table column combination string |
| Access: | public |
Reset SQL to be empty
API Tags: