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
|
|
@ -1,29 +0,0 @@
|
|||
#include "PgInheritsContainer.h"
|
||||
#include "Pgsql_Col.h"
|
||||
#include "PgDatabaseCatalog.h"
|
||||
#include <algorithm>
|
||||
|
||||
std::vector<Oid> PgInheritsContainer::getParentsOf(Oid oid) const
|
||||
{
|
||||
std::vector<Oid> result;
|
||||
auto&& iter = std::lower_bound(m_container.begin(), m_container.end(), PgInherits::Key{ oid, 1 });
|
||||
for (;iter != m_container.end() && iter->relid == oid; ++iter)
|
||||
result.push_back(iter->parent);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string PgInheritsContainer::getLoadQuery() const
|
||||
{
|
||||
return
|
||||
"SELECT inhrelid, inhparent, inhseqno \n"
|
||||
" FROM pg_inherits";
|
||||
}
|
||||
|
||||
|
||||
PgInherits PgInheritsContainer::loadElem(const Pgsql::Row &row)
|
||||
{
|
||||
Pgsql::Col col(row);
|
||||
PgInherits v;
|
||||
col >> v.relid >> v.parent >> v.seqno;
|
||||
return v;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue