function MetaTables($ttype = false, $showSchema = false, $mask = false) { if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtoupper($mask)); $this->metaTablesSQL .= " AND table_name like {$mask}"; } $ret = ADOConnection::MetaTables($ttype, $showSchema); if ($mask) { $this->metaTablesSQL = $save; } return $ret; }
function &MetaTables($ttype = false, $showSchema = false, $mask = false) { if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr($mask); $this->metaTablesSQL .= " like {$mask}"; } $ret =& ADOConnection::MetaTables($ttype, $showSchema); if ($mask) { $this->metaTablesSQL = $save; } return $ret; }
function MetaTables($ttype = false, $showSchema = false, $mask = false) { $save = $this->metaTablesSQL; if ($showSchema && is_string($showSchema)) { $this->metaTablesSQL .= " from {$showSchema}"; } if ($mask) { $mask = $this->qstr($mask); $this->metaTablesSQL .= " like {$mask}"; } $ret = ADOConnection::MetaTables($ttype, $showSchema); $this->metaTablesSQL = $save; return $ret; }
function MetaTables($ttype = false, $showSchema = false, $mask = false) { $save = $this->metaTablesSQL; if ($showSchema && is_string($showSchema)) { $this->metaTablesSQL .= $this->qstr($showSchema); } else { $this->metaTablesSQL .= "schema()"; } if ($mask) { $mask = $this->qstr($mask); $this->metaTablesSQL .= " AND table_name LIKE {$mask}"; } $ret = ADOConnection::MetaTables($ttype, $showSchema); $this->metaTablesSQL = $save; return $ret; }
function MetaTables($ttype = false, $showSchema = false, $mask = false) { $info = $this->ServerInfo(); if ($info['version'] >= 7.3) { $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\\_%'\n\t\t\t and schemaname not in ( 'pg_catalog','information_schema')\n\tunion \n select viewname,'V' from pg_views where viewname not like 'pg\\_%' and schemaname not in ( 'pg_catalog','information_schema') "; } if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtolower($mask)); if ($info['version'] >= 7.3) { $this->metaTablesSQL = "\nselect tablename,'T' from pg_tables where tablename like {$mask} and schemaname not in ( 'pg_catalog','information_schema') \n union \nselect viewname,'V' from pg_views where viewname like {$mask} and schemaname not in ( 'pg_catalog','information_schema') "; } else { $this->metaTablesSQL = "\nselect tablename,'T' from pg_tables where tablename like {$mask} \n union \nselect viewname,'V' from pg_views where viewname like {$mask}"; } } $ret = ADOConnection::MetaTables($ttype, $showSchema); if ($mask) { $this->metaTablesSQL = $save; } return $ret; }
/** * get table name list * * @return array tablename * @access public */ function getTableNameList() { return $tableArray = $this->connection->MetaTables("TABLES"); }
function MetaTables() { return ADOConnection::MetaTables(); }
function &MetaTables($ttype = false, $showSchema = false, $mask = false) { if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtolower($mask)); $this->metaTablesSQL = "\nselect tablename,'T' from pg_tables where tablename like {$mask} union \nselect viewname,'V' from pg_views where viewname like {$mask}"; } $ret =& ADOConnection::MetaTables($ttype, $showSchema); if ($mask) { $this->metaTablesSQL = $save; } return $ret; }
function MetaTables($ttype=false,$showSchema=false,$mask=false) { if ($mask) {$this->debug=1; $save = $this->metaTablesSQL; $mask = $this->qstr($mask); $this->metaTablesSQL .= " AND name like $mask"; } $ret = ADOConnection::MetaTables($ttype,$showSchema); if ($mask) { $this->metaTablesSQL = $save; } return $ret; }
function MetaTables($ttype = false, $showSchema = false, $mask = false) { // OVERWRITE 3: Insert global $CFG; $schema = $CFG->current_app->getShortName(); // END OVERWRITE 3 $info = $this->ServerInfo(); if ($info['version'] >= 7.3) { // OVERWRITE 4: replacement, changed from: //$this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' //and schemaname not in ( 'pg_catalog','information_schema') //union // select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; // to: $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\\_%'\n\t\t\t and schemaname = '{$schema}'\n\tunion\n select viewname,'V' from pg_views where viewname not like 'pg\\_%' and schemaname = '{$schema}'"; // END OVERWRITE 4 } if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtolower($mask)); if ($info['version'] >= 7.3) { // OVERWRITE 5: replacement, changed from: //$this->metaTablesSQL = " //select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') // union //select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; // to: $this->metaTablesSQL = "\nselect tablename,'T' from pg_tables where tablename like {$mask} and schemaname = '{$schema}'\n union\nselect viewname,'V' from pg_views where viewname like {$mask} and schemaname = '{$schema}'"; } else { $this->metaTablesSQL = "\nselect tablename,'T' from pg_tables where tablename like {$mask}\n union\nselect viewname,'V' from pg_views where viewname like {$mask}"; } } $ret = ADOConnection::MetaTables($ttype, $showSchema); if ($mask) { $this->metaTablesSQL = $save; } return $ret; }