/** * Quotes the named identifier. This could be the name of a field, table, * or database * * @param String $name The named identifier to quote * @return String */ public function quoteName($name) { return $this->link->quoteName($name); }
/** * Returns the SQL string for this expression * * @param \r8\iface\DB\Link $link The database connection this WHERE clause * is being run against. This is being passed in for escaping purposes * @return String */ public function toSelectSQL(\r8\iface\DB\Link $link) { return ($this->table && $this->database ? $link->quoteName($this->database) . "." : "") . ($this->table ? $link->quoteName($this->table) . "." : "") . "*"; }
/** * Returns the SQL FROM clause * * @param \r8\iface\DB\Link $link The database connection this WHERE clause * is being run against. This is being passed in for escaping purposes * @return String */ public function toFromSQL(\r8\iface\DB\Link $link) { return ($this->database ? $link->quoteName($this->database) . "." : "") . $link->quoteName($this->table) . ($this->alias ? " AS " . $link->quoteName($this->alias) : ""); }
/** * Returns the SQL this atom represents * * @param \r8\iface\DB\Link $link The database connection this atom * is being created against. This is being passed in for escaping * purposes * @return String */ public function toAtomSQL(\r8\iface\DB\Link $link) { return ($this->table && $this->database ? $link->quoteName($this->database) . "." : "") . ($this->table ? $link->quoteName($this->table) . "." : "") . $link->quoteName($this->field); }