# SQLFunction Class Reference
[Dynamic query builder]

Reference for calling built-in database functions. More...

Inheritance diagram for SQLFunction:
[legend]

List of all members.

## Public Member Functions

| __construct ($name)
| getAlias ()
| getName ()
| setAlias ($alias)
| setAggregateAll ()
| setAggregateDistinct ()
| toMapped (ProtoDAO $dao, JoinCapableQuery $query)
| toDialectString (Dialect $dialect)

## Static Public Member Functions

static | create ($name)

## Public Attributes

const | AGGREGATE_ALL = 1
const | AGGREGATE_DISTINCT = 2

## Private Attributes

| $name = null
| $alias = null
| $aggregate = null
| $args = array()

## Detailed Description

Reference for calling built-in database functions.

Definition at line 17 of file SQLFunction.class.php.

## Constructor & Destructor Documentation

SQLFunction::__construct | ( | $ | name | ) |

Definition at line 41 of file SQLFunction.class.php.

References $args, and $name.

## Member Function Documentation

static SQLFunction::create | ( | $ | name | ) | `[static]`

Returns:
  SQLFunction

Definition at line 31 of file SQLFunction.class.php.

References $args, and $name.

Referenced by CountProjection::getFunction(), CommonDaoWorker::getQueryResult(), UnifiedContainerWorker::makeCountQuery(), GenericDAO::makeTotalCountQuery(), AggregateProjection::process(), and EqualsLowerExpression::toDialectString().

SQLFunction::getAlias | ( |  | ) |

Implements Aliased.

Definition at line 57 of file SQLFunction.class.php.

SQLFunction::getName | ( |  | ) |

Definition at line 62 of file SQLFunction.class.php.

SQLFunction::setAggregateAll | ( |  | ) |

Returns:
  SQLFunction

Definition at line 80 of file SQLFunction.class.php.

SQLFunction::setAggregateDistinct | ( |  | ) |

Returns:
  SQLFunction

Definition at line 90 of file SQLFunction.class.php.

SQLFunction::setAlias | ( | $ | alias | ) |

Returns:
  SQLFunction

Definition at line 70 of file SQLFunction.class.php.

References $alias.

SQLFunction::toDialectString | ( | Dialect $ | dialect | ) |

Definition at line 122 of file SQLFunction.class.php.

References $args, Dialect::fieldToString(), Assert::isTrue(), Dialect::quoteTable(), and Dialect::toCasted().

Here is the call graph for this function:

SQLFunction::toMapped | ( | ProtoDAO $ | dao,
|  | JoinCapableQuery $ | query |
| ) |  |  |

Returns:
  SQLFunction

Definition at line 100 of file SQLFunction.class.php.

References ProtoDAO::guessAtom().

Here is the call graph for this function:

## Member Data Documentation

SQLFunction::$aggregate = null`[private]`

Definition at line 24 of file SQLFunction.class.php.

SQLFunction::$alias = null`[private]`

Definition at line 23 of file SQLFunction.class.php.

Referenced by setAlias().

SQLFunction::$args = array()`[private]`

Definition at line 26 of file SQLFunction.class.php.

Referenced by __construct(), create(), and toDialectString().

SQLFunction::$name = null`[private]`

Definition at line 22 of file SQLFunction.class.php.

Referenced by __construct(), and create().

const SQLFunction::AGGREGATE_ALL = 1

Definition at line 19 of file SQLFunction.class.php.

const SQLFunction::AGGREGATE_DISTINCT = 2

Definition at line 20 of file SQLFunction.class.php.

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

- core/OSQL/SQLFunction.class.php