framework/db/QueryBuilder.php
public function addCheck($name, $table, $expression)
    {
        return 'ALTER TABLE ' . $this->db->quoteTableName($table) . ' ADD CONSTRAINT '
            . $this->db->quoteColumnName($name) . ' CHECK (' . $this->db->quoteSql($expression) . ')';
    }
public function addCheck($name, $table, $expression)
    {
        return 'ALTER TABLE ' . $this->db->quoteTableName($table) . ' ADD CONSTRAINT '
            . $this->db->quoteColumnName($name) . ' CHECK (' . $this->db->quoteSql($expression) . ')';
    }
public function addCheck ( $ name , $ table , $ expression ) { return 'ALTER TABLE ' . $ this -> db -> quoteTableName ( $ table ) . ' ADD CONSTRAINT ' . $ this -> db -> quoteColumnName ( $ name ) . ' CHECK (' . $ this -> db -> quoteSql ( $ expression ) . ')' ; }
Creates a SQL command for adding a check constraint to an existing table.
@param string $name the name of the check constraint.
The name will be properly quoted by the method.
@param string $table the table that the check constraint will be added to.
The name will be properly quoted by the method.
@param string $expression the SQL of the `CHECK` constraint.
@return string the SQL statement for adding a check constraint to an existing table.
@since 2.0.13
Creates a SQL command for adding a check constraint to an existing table .