Class: atkDb2Query
Source Location: /db/class.atkdb2query.inc
Class atkDb2Query
Method Summary
| String |
buildCount() |
Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields. |
| String |
regexpCondition() |
Generate an SQL searchcondition for a regular expression match. |
Methods
void &addField(
$name, [
$value = ""], [
$table = ""], [
$fieldaliasprefix = ""], [
$quote = true], [
$mode = ""], [
$fieldType = ""]
)
|
|
Parameters:
|
|
$name: |
|
|
|
$value: |
|
|
|
$table: |
|
|
|
$fieldaliasprefix: |
|
|
|
$quote: |
|
|
|
$mode: |
|
|
|
$fieldType: |
|
Redefinition of:
- atkQuery::addField()
- Add's a field to the query
String buildCount(
[boolean
$distinct = FALSE]
)
|
|
Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.
Parameters:
|
boolean |
$distinct: |
distinct rows? |
API Tags:
| Return: | a SQL Select COUNT(*) Query |
Redefinition of:
- atkQuery::buildCount()
- Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.
String regexpCondition(
String
$field, String
$value, [boolean
$inverse = false]
)
|
|
Generate an SQL searchcondition for a regular expression match.
Parameters:
|
String |
$field: |
The fieldname on which the regular expression match will be performed. |
|
String |
$value: |
The regular expression to search for. |
|
boolean |
$inverse: |
Set to false (default) to perform a normal match. Set to true to generate a SQL string that searches for values dat do not match. |
API Tags:
| Return: | A SQL regexp expression. |
Information Tags:
String soundexCondition(
String
$field, String
$value, [boolean
$inverse = false]
)
|
|
Generate an SQL searchcondition for a soundex match.
Parameters:
|
String |
$field: |
The fieldname on which the soundex match will be performed. |
|
String |
$value: |
The value to search for. |
|
boolean |
$inverse: |
Set to false (default) to perform a normal match. Set to true to generate a SQL string that searches for values dat do not match. |
API Tags:
| Return: | A SQL soundex expression. |
Information Tags:
| Todo: | convert to db2 (is this ever used anyway???) |
void _addLimiter(
&$query, String
$query
)
|
|
Prepare the query for a limit.
Parameters:
|
String |
$query: |
The SQL query that is being constructed. |
|
|
&$query: |
|
API Tags:
Information Tags:
| Todo: | add limit statement in db2 style (limit 10,5 will not work) |
Redefinition of:
- atkQuery::_addLimiter()
- Add limiting clauses to the query.