private function GetConstraintRules($constraintName, ConstraintRule &$onUpdate = null, ConstraintRule &$onDelete = null)
    {
        $sql = new Sql\Builder($this);
        $tbl = $sql->Table('information_schema.REFERENTIAL_CONSTRAINTS', array('CONSTRAINT_NAME', 'UPDATE_RULE', 'DELETE_RULE'));
       
        $where = $sql->Equals($tbl->Field('CONSTRAINT_NAME'), $sql->Value($constraintName));
        $selectList = $sql->SelectList($tbl->Field('UPDATE_RULE'));
        $selectList->Add($tbl->Field('DELETE_RULE'));
        $select = $sql->Select(false, $selectList, $tbl, $where);
        $reader = $this->ExecuteQuery((string) $select);
        if ($reader->Read())
        {
            $onUpdate = ConstraintRule::ByValue($reader->ByName('UPDATE_RULE'));
            $onDelete = ConstraintRule::ByValue($reader->ByName('DELETE_RULE'));
        }
    }