Switching to linux for development of pglab.
Switched from qmake to cmake. Code changes to make it compile.
This commit is contained in:
parent
dd9906dbd8
commit
04723a289b
142 changed files with 124 additions and 83 deletions
49
pglab/PgType.h
Normal file
49
pglab/PgType.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#ifndef PGTYPE_H
|
||||
#define PGTYPE_H
|
||||
|
||||
#include <QString>
|
||||
#include <pgsql/libpq-fe.h>
|
||||
|
||||
class PgType {
|
||||
public:
|
||||
PgType();
|
||||
|
||||
Oid oid = InvalidOid;
|
||||
QString typname;//"name";"NO"
|
||||
Oid typnamespace = InvalidOid;//"oid";"NO"
|
||||
Oid typowner = InvalidOid;//"oid";"NO"
|
||||
short typlen = -1;//"smallint";"NO"
|
||||
bool typbyval = false;//"boolean";"NO"
|
||||
QString typtype;//""char"";"NO"
|
||||
QString typcategory;//""char"";"NO"
|
||||
bool typispreferred = false;//"boolean";"NO"
|
||||
bool typisdefined = false;//"boolean";"NO"
|
||||
QString typdelim;//""char"";"NO"
|
||||
Oid typrelid = InvalidOid;//"oid";"NO"
|
||||
Oid typelem = InvalidOid;//"oid";"NO"
|
||||
Oid typarray = InvalidOid;//"oid";"NO"
|
||||
QString typinput;//regproc";"NO"
|
||||
QString typoutput;//"regproc";"NO"
|
||||
QString typreceive;//"regproc";"NO"
|
||||
QString typsend;//"regproc";"NO"
|
||||
QString typmodin;//"regproc";"NO"
|
||||
QString typmodout;//"regproc";"NO"
|
||||
QString typanalyze;//"regproc";"NO"
|
||||
QString typalign;//""char"";"NO"
|
||||
QString typstorage;//""char"";"NO"
|
||||
bool typnotnull = false;//"boolean";"NO"
|
||||
Oid typbasetype = InvalidOid;//"oid";"NO"
|
||||
int typtypmod = -1;//"integer";"NO"
|
||||
int typndims = 0;//"integer";"NO"
|
||||
Oid typcollation = InvalidOid;//"oid";"NO"
|
||||
QString typdefaultbin;//"pg_node_tree";"YES"
|
||||
QString typdefault;//"text";"YES"
|
||||
QString typacl;//"ARRAY";"YES"
|
||||
|
||||
bool operator==(Oid _oid) const { return oid == _oid; }
|
||||
bool operator==(const QString &n) const { return typname == n; }
|
||||
bool operator<(Oid _oid) const { return oid < _oid; }
|
||||
bool operator<(const PgType &rhs) const { return oid < rhs.oid; }
|
||||
};
|
||||
|
||||
#endif // PGTYPE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue