WIP: Added page showing list of functions.

Only list is shown, still working on details.
This commit is contained in:
eelke 2018-11-25 09:06:01 +01:00
parent 7db859737a
commit 840af1e0a9
19 changed files with 635 additions and 92 deletions

View file

@ -1,5 +1,6 @@
#include "PgTypeContainer.h"
#include "Pgsql_Connection.h"
#include "Pgsql_Col.h"
#include <algorithm>
//const PgType& PgTypeContainer::getTypeByOid(Oid oid) const
@ -29,7 +30,7 @@
std::string PgTypeContainer::getLoadQuery() const
{
return
"SELECT oid, typname, typnamespace, typowner, typlen, typbyval, typtype, typcategory, \n"
"SELECT oid, format_type(oid, NULL) AS name, typname, typnamespace, typowner, typlen, typbyval, typtype, typcategory, \n"
" typispreferred, typisdefined, typdelim, typrelid, typelem, typarray, typinput, typoutput, \n"
" typreceive, typsend, typmodin, typmodout, typanalyze, typalign, typstorage, typnotnull, \n"
" typbasetype, typtypmod, typndims, typcollation, typdefaultbin, typdefault, typacl \n"
@ -38,37 +39,11 @@ std::string PgTypeContainer::getLoadQuery() const
PgType PgTypeContainer::loadElem(const Pgsql::Row &row)
{
Pgsql::Col col(row);
PgType v;
v.oid << row.get(0); // InvalidOid;
v.name << row.get(1); //. operator QString(); // "name";"NO"
v.typnamespace << row.get(2); // InvalidOid;//"oid";"NO"
v.owner << row.get(3); // InvalidOid;//"oid";"NO"
v.len << row.get(4); // -1;//"smallint";"NO"
v.byval << row.get(5); // false;//"boolean";"NO"
v.type << row.get(6);//""char"";"NO"
v.category << row.get(7);//""char"";"NO"
v.ispreferred << row.get(8); //false;//"boolean";"NO"
v.isdefined << row.get(9); //false;//"boolean";"NO"
v.delim << row.get(10); //""char"";"NO"
v.relid << row.get(11); // InvalidOid;//"oid";"NO"
v.elem << row.get(12); // InvalidOid;//"oid";"NO"
v.array << row.get(13); // InvalidOid;//"oid";"NO"
v.input << row.get(14);//regproc";"NO"
v.output << row.get(15);//"regproc";"NO"
v.receive << row.get(16);//"regproc";"NO"
v.send << row.get(17);//"regproc";"NO"
v.modin << row.get(18);//"regproc";"NO"
v.modout << row.get(19);//"regproc";"NO"
v.analyze << row.get(20);//"regproc";"NO"
v.align << row.get(21); // //""char"";"NO"
v.storage << row.get(22); //""char"";"NO"
v.notnull << row.get(23); //"boolean";"NO"
v.basetype << row.get(24); //"oid";"NO"
v.typmod << row.get(25); //-1;//"integer";"NO"
v.ndims << row.get(26); //"integer";"NO"
v.collation << row.get(27); //InvalidOid;//"oid";"NO"
v.defaultbin << row.get(28);//"pg_node_tree";"YES"
v.typdefault << row.get(29);//"text";"YES"
v.acl << row.get(30);//"ARRAY";"YES"
col >> v.oid >> v.name >> v.typname >> v.typnamespace >> v.owner >> v.len >> v.byval >> v.type >> v.category
>> v.ispreferred >> v.isdefined >> v.delim >> v.relid >> v.elem >> v.array >> v.input >> v.output
>> v.receive >> v.send >> v.modin >> v.modout >> v.analyze >> v.align >> v.storage >> v.notnull
>> v.basetype >> v.typmod >> v.ndims >> v.collation >> v.defaultbin >> v.typdefault >> v.acl;
return v;
}