Prado\Data\Common\Pgsql\TPgsqlMetaData::getIsView PHP Method

getIsView() protected method

protected getIsView ( $schemaName, $tableName ) : boolean
return boolean true if the table is a view.
    protected function getIsView($schemaName, $tableName)
    {
        $sql = <<<EOD
\t\tSELECT count(c.relname) FROM pg_catalog.pg_class c
\t\tLEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace)
\t\tWHERE (n.nspname=:schema) AND (c.relkind = 'v'::"char") AND c.relname = :table
EOD;
        $this->getDbConnection()->setActive(true);
        $command = $this->getDbConnection()->createCommand($sql);
        $command->bindValue(':schema', $schemaName);
        $command->bindValue(':table', $tableName);
        return intval($command->queryScalar()) === 1;
    }