Reorganize files in pglablib
The enitities and containers of the catalog now go into catalog subfolder Models go into model
This commit is contained in:
parent
56cbeea183
commit
f0c1035378
121 changed files with 226 additions and 183 deletions
27
pglablib/catalog/PgAuthIdContainer.cpp
Normal file
27
pglablib/catalog/PgAuthIdContainer.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "PgAuthIdContainer.h"
|
||||
#include "Pgsql_Col.h"
|
||||
|
||||
std::string PgAuthIdContainer::getLoadQuery() const
|
||||
{
|
||||
std::string result =
|
||||
"SELECT oid, rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, "
|
||||
" rolcanlogin, rolreplication, rolconnlimit, rolvaliduntil";
|
||||
if (minimumVersion(90500))
|
||||
result += ", rolbypassrls";
|
||||
|
||||
result += "\n"
|
||||
"FROM pg_authid";
|
||||
return result;
|
||||
}
|
||||
|
||||
PgAuthId PgAuthIdContainer::loadElem(const Pgsql::Row &row)
|
||||
{
|
||||
Pgsql::Col col(row);
|
||||
PgAuthId v;
|
||||
col >> v.oid >> v.name >> v.super >> v.inherit >> v.createRole >> v.createDB
|
||||
>> v.canlogin >> v.replication >> v.connLimit >> v.validUntil;
|
||||
if (minimumVersion(90500))
|
||||
col >> v.bypassRls;
|
||||
|
||||
return v;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue