예제 #1
0
 /**
  * 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);
 }
예제 #2
0
파일: Star.php 프로젝트: Nycto/Round-Eights
 /**
  * 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) . "." : "") . "*";
 }
예제 #3
0
 /**
  * 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) : "");
 }
예제 #4
0
 /**
  * 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);
 }