public function sqlCheckIntegrity($check = true, $schema = '', $table = '')
    {
        if (empty($schema) && empty($table)) {
            return 'SET CONSTRAINTS ALL '.($check ? 'IMMEDIATE' : 'DEFERRED');
        }

        return sprintf(
                'ALTER TABLE %s.%s %s TRIGGER ALL',
                $this->getQuotedName($table),
                $this->getQuotedName($schema),
                $check ? 'ENABLE' : 'DISABLE'
            );
    }