public function from($from, $alias = null) {
$this->queryBuilder->from(
$this->getTableName($from),
- $alias
+ $this->quoteAlias($alias)
);
return $this;
*/
public function join($fromAlias, $join, $alias, $condition = null) {
$this->queryBuilder->join(
- $fromAlias,
+ $this->quoteAlias($fromAlias),
$this->getTableName($join),
- $alias,
+ $this->quoteAlias($alias),
$condition
);
*/
public function innerJoin($fromAlias, $join, $alias, $condition = null) {
$this->queryBuilder->innerJoin(
- $fromAlias,
+ $this->quoteAlias($fromAlias),
$this->getTableName($join),
- $alias,
+ $this->quoteAlias($alias),
$condition
);
*/
public function leftJoin($fromAlias, $join, $alias, $condition = null) {
$this->queryBuilder->leftJoin(
- $fromAlias,
+ $this->quoteAlias($fromAlias),
$this->getTableName($join),
- $alias,
+ $this->quoteAlias($alias),
$condition
);
*/
public function rightJoin($fromAlias, $join, $alias, $condition = null) {
$this->queryBuilder->rightJoin(
- $fromAlias,
+ $this->quoteAlias($fromAlias),
$this->getTableName($join),
- $alias,
+ $this->quoteAlias($alias),
$condition
);
return $this->helper->quoteColumnName($tableAlias . $column);
}
+
+ /**
+ * Returns the column name quoted and with table alias prefix as needed by the implementation
+ *
+ * @param string $alias
+ * @return string
+ */
+ public function quoteAlias($alias) {
+ if ($alias === '' || $alias === null) {
+ return $alias;
+ }
+
+ return $this->helper->quoteColumnName($alias);
+ }
}