Class AfBaseDbHelper
The base class for all advanced filter database helpers.
The methods in this class are used by filters to add database specific syntax to conditions.
The base class provides default functionality for database operations where the syntax is common amongst multiple databases, and abstract methods that must be overridden where the syntax is database specific.
- CComponent
-
AfBaseDbHelper
Direct known subclasses
Indirect known subclasses
Package: advancedfilters\dbhelpers
Author: Keith Burton kburton@kappasoft.net
Located at dbhelpers/AfBaseDbHelper.php
Methods summary
public
string
|
#
convertNullToEmptyString( string $dbExpression )
Alters a database expression so that null values are converted to an empty string. Override this method in child classes if the database uses different syntax. |
public
string
|
#
convertEmptyStringToNull( string $dbExpression )
Alters a database expression so that empty strings are converted to null. Override this method in child classes if the database uses different syntax. |
abstract public
string
|
#
convertExpressionToDecimal( string $dbExpression, integer $numDigits, integer $decimalPlaces, integer $nonNumericResultValue )
Alters a database expression so that strings are converted to decimals. |
abstract public
boolean
|
#
checkRegex( CDbConnection $dbConnection, string $regex )
Verifies that the provided pattern is syntactically valid for the specific database. This may require a test query to be run. No default implementation is provided as each database uses its own syntax. |
abstract public
|
#
addRegexCondition( CDbCriteria $criteria, string $columnExpression, string $regex, boolean $invertLogic )
Adds a regular expression condition to the provided criteria. No default implementation is provided as each database uses its own syntax. |