<?php

//Définition des requêtes de l'api Vitis
$aSql['oci']['getTables'] = "SELECT table_name as \"table_name\" FROM user_tables WHERE TABLESPACE_NAME <> 'SYSTEM'";
$aSql['oci']['getTableColumns'] = "Select COLUMN_NAME as \"column_name\", data_type as \"data_type\" from USER_TAB_COLUMNS where TABLE_NAME = '[sTable]' ";

$aSql['pgsql']['getTables'] = "SELECT table_name FROM(SELECT tablename as \"table_name\", schemaname FROM pg_catalog.pg_tables) as tables WHERE schemaname = '[sSchema]'";
$aSql['pgsql']['getViews'] = "SELECT table_name FROM(SELECT viewname as \"table_name\", schemaname FROM pg_catalog.pg_views) as tables WHERE schemaname = '[sSchema]'";
$aSql['pgsql']['getMatviews'] = "SELECT table_name FROM(SELECT matviewname as \"table_name\", schemaname FROM pg_catalog.pg_matviews) as tables WHERE schemaname = '[sSchema]'";
$aSql['pgsql']['getTableColumns'] = "SELECT column_name, udt_name as data_type FROM INFORMATION_SCHEMA.COLUMNS where table_schema = '[sSchema]' and table_name = '[sTable]' ORDER BY column_name";

$aSql['pgsql']['getDatabases'] = "select pg_database.datname as database from pg_database order by database";
$aSql['pgsql']['getSchemas'] = "SELECT DISTINCT(table_schema) as schema_name FROM information_schema.tables";
?>
