/** * 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 $link->quote(\r8\reduce($this->value)); }
/** * Quotes a variable to be used in a query * * Wraps the equivilent function in the Link * * @param mixed $value The value to quote * @param Boolean $allowNull Whether to allow * @return String|Array */ public function quote($value, $allowNull = TRUE) { return $this->link->quote($value, $allowNull); }