diff --git a/pglab/FunctionsPage.cpp b/pglab/FunctionsPage.cpp index 9b8dd03..ac901d0 100644 --- a/pglab/FunctionsPage.cpp +++ b/pglab/FunctionsPage.cpp @@ -43,11 +43,9 @@ FunctionsPage::FunctionsPage(QWidget *parent) auto item_delegate = new PgLabItemDelegate(this); m_functionTable->setItemDelegate(item_delegate); - connect(m_functionTable->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &FunctionsPage::functionTable_currentRowChanged); - retranslateUi(); } @@ -82,7 +80,6 @@ void FunctionsPage::functionTable_currentRowChanged(const QModelIndex ¤t, void FunctionsPage::selectedProcChanged(const std::optional &proc) { - updateSqlTab(proc); } diff --git a/pglab/MainWindow.cpp b/pglab/MainWindow.cpp index 5614b1b..7aba195 100644 --- a/pglab/MainWindow.cpp +++ b/pglab/MainWindow.cpp @@ -2,6 +2,7 @@ #include "ui_MainWindow.h" #include "TablesPage.h" #include "FunctionsPage.h" +#include "SequencesPage.h" #include #include @@ -112,6 +113,10 @@ void MainWindow::catalogLoaded() functions_page->setCatalog(m_database->catalog()); ui->tabWidget->addTab(functions_page, "Functions"); + auto sequences_page = new SequencesPage(this); + sequences_page->setCatalog(m_database->catalog()); + ui->tabWidget->addTab(sequences_page, "Sequences"); + newSqlPage(); newCreateTablePage(); } catch (std::runtime_error &ex) { diff --git a/pglab/MainWindow.h b/pglab/MainWindow.h index 33e4406..de42880 100644 --- a/pglab/MainWindow.h +++ b/pglab/MainWindow.h @@ -47,6 +47,7 @@ public: void newCrudPage(const PgClass &table); void newCodeGenPage(QString query, std::shared_ptr dbres); + private: Ui::MainWindow *ui; diff --git a/pglab/ProcTableModel.h b/pglab/ProcTableModel.h index 4cc3e21..2a49a6d 100644 --- a/pglab/ProcTableModel.h +++ b/pglab/ProcTableModel.h @@ -38,8 +38,7 @@ public: // Basic functionality: int rowCount(const QModelIndex &parent = QModelIndex()) const override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; - - virtual QVariant data(const QModelIndex &index, int role) const override; + QVariant data(const QModelIndex &index, int role) const override; PgProc proc(int row) const; diff --git a/pglab/SequenceModel.cpp b/pglab/SequenceModel.cpp new file mode 100644 index 0000000..a18203e --- /dev/null +++ b/pglab/SequenceModel.cpp @@ -0,0 +1,82 @@ +#include "SequenceModel.h" +#include "catalog/PgDatabaseCatalog.h" +#include "catalog/PgSequenceContainer.h" + +SequenceModel::SequenceModel(QObject * parent) + : QAbstractTableModel(parent) +{} + +QVariant SequenceModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if (orientation == Qt::Horizontal) { + if (role == Qt::DisplayRole) { + switch (section) { + case NameCol: return tr("Name"); + case SchemaCol: return tr("Schema"); + case OwnerCol: return tr("Owner"); + case LastCol: return tr("Last"); + case StartCol: return tr("Start"); + case MinCol: return tr("Min"); + case MaxCol: return tr("Max"); + case IncrementCol: return tr("Inc"); + case CacheCol: return tr("Cached"); + case CycledCol: return tr("Cycled"); + case CalledCol: return tr("Called"); + case AclCol: return tr("ACL"); + } + } + } + return {}; +} + +void SequenceModel::setCatalog(std::shared_ptr cat) +{ + beginResetModel(); + + m_catalog = cat; + m_sequences = cat->sequences(); + + endResetModel(); +} + +PgSequence SequenceModel::sequence(int row) const +{ + return m_sequences->getByIdx(row); +} + +int SequenceModel::rowCount(const QModelIndex &) const +{ + return m_sequences ? static_cast(m_sequences->count()) : 0; +} + +int SequenceModel::columnCount(const QModelIndex &) const +{ + return colCount; +} + +QVariant SequenceModel::data(const QModelIndex &index, int role) const +{ + if (!m_sequences) + return {}; + + int row = index.row(); + auto && seq = m_sequences->getByIdx(row); + if (role == Qt::DisplayRole) { + switch (index.column()) { + case NameCol: return seq.objectName(); + case SchemaCol: return seq.nsName(); + case OwnerCol: return seq.ownerName(); + case LastCol: return seq.last; + case StartCol: return seq.start; + case MinCol: return seq.min; + case MaxCol: return seq.max; + case IncrementCol: return seq.increment; + case CacheCol: return seq.cache; + case CycledCol: return seq.cycled; + case CalledCol: return seq.called; + case AclCol: return seq.aclString(); + } + } + + return {}; +} diff --git a/pglab/SequenceModel.h b/pglab/SequenceModel.h new file mode 100644 index 0000000..9b3ce5a --- /dev/null +++ b/pglab/SequenceModel.h @@ -0,0 +1,48 @@ +#ifndef SEQUENCEMODEL_H +#define SEQUENCEMODEL_H + +#include +//#include "catalog/PgClass.h" +#include "catalog/PgSequence.h" +#include + +class PgDatabaseCatalog; +class PgSequenceContainer; + +class SequenceModel: public QAbstractTableModel { + Q_OBJECT +public: + + enum e_Columns : int { + NameCol, + SchemaCol, + OwnerCol, + LastCol, + StartCol, + MinCol, + MaxCol, + IncrementCol, + CacheCol, + CycledCol, + CalledCol, + AclCol, + + colCount + }; + + SequenceModel(QObject * parent = nullptr); + + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + void setCatalog(std::shared_ptr cat); + + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role) const override; + + PgSequence sequence(int row) const; +private: + std::shared_ptr m_catalog; + std::shared_ptr m_sequences; +}; + +#endif // SEQUENCEMODEL_H diff --git a/pglab/SequencesPage.cpp b/pglab/SequencesPage.cpp new file mode 100644 index 0000000..fbd46fd --- /dev/null +++ b/pglab/SequencesPage.cpp @@ -0,0 +1,81 @@ +#include "SequencesPage.h" +#include "ResultTableModelUtil.h" +#include "CustomFilterSortModel.h" +#include "CustomDataRole.h" +#include "PgLabItemDelegate.h" +#include "SequenceModel.h" +#include "SqlCodePreview.h" +#include + +SequencesPage::SequencesPage(QWidget *parent) +{ + m_sequenceTable = new QTableView(this); + m_definitionView = new SqlCodePreview(this); + + // build widget tree + // add top level widgets to splitter + addWidget(m_sequenceTable); + addWidget(m_definitionView); + + SetTableViewDefault(m_sequenceTable); + + m_model = new SequenceModel(this); + m_sortFilterProxy = new CustomFilterSortModel(this); + m_sortFilterProxy->setSourceModel(m_model); + m_sequenceTable->setModel(m_sortFilterProxy); + m_sequenceTable->setSortingEnabled(true); + m_sequenceTable->setSelectionBehavior(QAbstractItemView::SelectRows); + + auto item_delegate = new PgLabItemDelegate(this); + m_sequenceTable->setItemDelegate(item_delegate); + + connect(m_sequenceTable->selectionModel(), &QItemSelectionModel::currentRowChanged, this, + &SequencesPage::sequenceTable_currentRowChanged); + + retranslateUi(); +} + +void SequencesPage::retranslateUi() +{ +// auto set_tabtext = [this] (QWidget *widget, QString translation) { +// m_detailTabs->setTabText(m_detailTabs->indexOf(widget), translation); +// }; + +// set_tabtext(m_definitionView, QApplication::translate("FunctionsPage", "SQL", nullptr)); +} + +void SequencesPage::setCatalog(std::shared_ptr cat) +{ + m_catalog = cat; + m_model->setCatalog(cat); +} + +void SequencesPage::sequenceTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous) +{ + if (current.row() != previous.row()) { + if (current.isValid()) { + auto source_index = m_sortFilterProxy->mapToSource(current); + auto proc = m_model->sequence(source_index.row()); + + selectedSequenceChanged(proc); + } + else + selectedSequenceChanged({}); + } +} + +void SequencesPage::selectedSequenceChanged(const std::optional &seq) +{ + updateSqlTab(seq); +} + +void SequencesPage::updateSqlTab(const std::optional &seq) +{ + if (!seq.has_value()) { + m_definitionView->clear(); + return; + } + QString create_sql = seq->createSql(); + + m_definitionView->setPlainText(create_sql); +} diff --git a/pglab/SequencesPage.h b/pglab/SequencesPage.h new file mode 100644 index 0000000..e93212f --- /dev/null +++ b/pglab/SequencesPage.h @@ -0,0 +1,40 @@ +#ifndef SEQUENCESPAGES_H +#define SEQUENCESPAGES_H + +#include +#include +#include + +class QTableView; +class PgDatabaseCatalog; +class SequenceModel; +class CustomFilterSortModel; +//class QTabWidget; +class SqlCodePreview; +class PgSequence; + + +class SequencesPage : public QSplitter { + Q_OBJECT +public: + SequencesPage(QWidget *parent = nullptr); + + void setCatalog(std::shared_ptr cat); +public slots: + + void sequenceTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous); + +private: + QTableView *m_sequenceTable = nullptr; + //QTabWidget *m_detailTabs = nullptr; + SqlCodePreview *m_definitionView = nullptr; + SequenceModel *m_model = nullptr; + CustomFilterSortModel *m_sortFilterProxy = nullptr; + std::shared_ptr m_catalog; + + void retranslateUi(); + void selectedSequenceChanged(const std::optional &seq); + void updateSqlTab(const std::optional &seq); +}; + +#endif // SEQUENCESPAGES_H diff --git a/pglab/pglab.pro b/pglab/pglab.pro index 0b7672a..5912e59 100644 --- a/pglab/pglab.pro +++ b/pglab/pglab.pro @@ -81,7 +81,9 @@ PropertyProxyModel.cpp \ FunctionsPage.cpp \ ColumnPage.cpp \ EditTableWidget.cpp \ - EditColumnTableModel.cpp + EditColumnTableModel.cpp \ + SequenceModel.cpp \ + SequencesPage.cpp HEADERS += \ QueryResultModel.h \ @@ -140,7 +142,9 @@ CustomDataRole.h \ FunctionsPage.h \ ColumnPage.h \ EditTableWidget.h \ - EditColumnTableModel.h + EditColumnTableModel.h \ + SequenceModel.h \ + SequencesPage.h FORMS += mainwindow.ui \ ConnectionManagerWindow.ui \ diff --git a/pglablib/catalog/PgClassContainer.cpp b/pglablib/catalog/PgClassContainer.cpp index ab4d5b0..f2124bb 100644 --- a/pglablib/catalog/PgClassContainer.cpp +++ b/pglablib/catalog/PgClassContainer.cpp @@ -12,7 +12,8 @@ std::string PgClassContainer::getLoadQuery() const " reltuples, reltoastrelid, relisshared, relpersistence, " " relkind, relhasoids, relispopulated, relfrozenxid, relminmxid, " " reloptions, relacl \n" - "FROM pg_catalog.pg_class"; + "FROM pg_catalog.pg_class \n" + "WHERE relkind IN ('r', 'i', 'p', 'I')"; } PgClass PgClassContainer::loadElem(const Pgsql::Row &row) diff --git a/pglablib/catalog/PgContainer.cpp b/pglablib/catalog/PgContainer.cpp index 7321599..29fbec8 100644 --- a/pglablib/catalog/PgContainer.cpp +++ b/pglablib/catalog/PgContainer.cpp @@ -1,5 +1,6 @@ #include "PgContainer.h" #include "PgDatabaseCatalog.h" +#include "Pgsql_Connection.h" IPgContainer::IPgContainer(PgDatabaseCatalog& cat) : m_catalog(cat) @@ -9,3 +10,26 @@ bool IPgContainer::minimumVersion(int required_version) const { return m_catalog.serverVersion() >= required_version; } + +bool IPgContainer::lessThenVersion(int required_version) const +{ + return m_catalog.serverVersion() < required_version; +} + +void IPgContainer::loadAll(Pgsql::Connection &conn) +{ + std::string q = getLoadQuery(); + Pgsql::Result result = conn.query(q.c_str()); + if (result && result.resultStatus() == PGRES_TUPLES_OK) { + load(result); + } + else { + auto details = result.diagDetails(); + if (details.state == "42501") { // permission denied + // ignore this for now + } + else { + throw std::runtime_error("Query failed\n" + details.errorMessage); + } + } +} diff --git a/pglablib/catalog/PgContainer.h b/pglablib/catalog/PgContainer.h index 466127c..c572d87 100644 --- a/pglablib/catalog/PgContainer.h +++ b/pglablib/catalog/PgContainer.h @@ -18,8 +18,11 @@ public: virtual std::string getLoadQuery() const = 0; virtual void load(const Pgsql::Result &res) = 0; + virtual void loadAll(Pgsql::Connection &conn); bool minimumVersion(int required_version) const; + bool lessThenVersion(int required_version) const; + protected: PgDatabaseCatalog& m_catalog; }; diff --git a/pglablib/catalog/PgDatabaseCatalog.cpp b/pglablib/catalog/PgDatabaseCatalog.cpp index 026d37e..a5a8b92 100644 --- a/pglablib/catalog/PgDatabaseCatalog.cpp +++ b/pglablib/catalog/PgDatabaseCatalog.cpp @@ -16,6 +16,7 @@ #include "PgCollationContainer.h" #include "PgInheritsContainer.h" #include "PgLanguageContainer.h" +#include "PgSequenceContainer.h" #include "Pgsql_Connection.h" #include "Pgsql_oids.h" @@ -137,56 +138,69 @@ void PgDatabaseCatalog::loadAll(Pgsql::Connection &conn, loadInfo(conn); const int count = 12; int n = 0; - if (progress_callback && !progress_callback(++n, count)) - return; + + auto pf = [&] () -> bool { + return progress_callback && !progress_callback(++n, count); + }; + + if (pf()) return; // First load server objects load2(m_authIds, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_tablespaces, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_databases, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + // Load database objects load2(m_languages, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_namespaces, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_collations, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_classes, conn); // needs namespaces - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_attributes, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_constraints, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_indexes, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_ams, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_triggers, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_types, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_procs, conn); - if (progress_callback && !progress_callback(++n, count)) - return; + if (pf()) return; + load2(m_inherits, conn); - progress_callback && progress_callback(++n, count); + if (pf()) return; + + load2(m_sequences, conn); +// { +// if (!m_sequences) +// m_sequences = std::make_shared(*this); +// m_sequences->load(conn); + +// } + pf(); refreshed(this, All); } @@ -206,27 +220,6 @@ void PgDatabaseCatalog::loadInfo(Pgsql::Connection &conn) m_dbName = conn.getDBName(); } -void load(Pgsql::Connection &conn, IPgContainer &pg_cont) -{ - //QThread::msleep(400); - std::string q = pg_cont.getLoadQuery(); - Pgsql::Result result = conn.query(q.c_str()); - if (result && result.resultStatus() == PGRES_TUPLES_OK) { - //boost::timer::auto_cpu_timer t; - pg_cont.load(result); - } - else { - auto details = result.diagDetails(); - if (details.state == "42501") { // permission denied - // ignore this for now - } - else { - throw std::runtime_error("Query failed\n" + details.errorMessage); - } - } - -} - const QString& PgDatabaseCatalog::serverVersionString() const { return m_serverVersionString; @@ -311,3 +304,8 @@ std::shared_ptr PgDatabaseCatalog::languages() const { return m_languages; } + +std::shared_ptr PgDatabaseCatalog::sequences() const +{ + return m_sequences; +} diff --git a/pglablib/catalog/PgDatabaseCatalog.h b/pglablib/catalog/PgDatabaseCatalog.h index 28a556b..f1ba75f 100644 --- a/pglablib/catalog/PgDatabaseCatalog.h +++ b/pglablib/catalog/PgDatabaseCatalog.h @@ -30,6 +30,7 @@ class PgProcContainer; class PgCollationContainer; class PgInheritsContainer; class PgLanguageContainer; +class PgSequenceContainer; class PgDatabaseCatalog: public QObject, public std::enable_shared_from_this { Q_OBJECT @@ -63,6 +64,7 @@ public: std::shared_ptr collations() const; std::shared_ptr inherits() const; std::shared_ptr languages() const; + std::shared_ptr sequences() const; enum RefreshFlag { Attributes = 1, @@ -103,6 +105,7 @@ private: std::shared_ptr m_collations; std::shared_ptr m_inherits; std::shared_ptr m_languages; + std::shared_ptr m_sequences; template void load2(std::shared_ptr &ptr, Pgsql::Connection &conn) @@ -110,7 +113,7 @@ private: if (!ptr) ptr = std::make_shared(*this); - load(conn, *ptr); + ptr->loadAll(conn); } }; diff --git a/pglablib/catalog/PgSequence.cpp b/pglablib/catalog/PgSequence.cpp new file mode 100644 index 0000000..2355b16 --- /dev/null +++ b/pglablib/catalog/PgSequence.cpp @@ -0,0 +1,23 @@ +#include "PgSequence.h" +#include "PgDatabaseCatalog.h" +#include "PgTypeContainer.h" +#include + +QString PgSequence::createSql() const +{ + QString sql; + sql = "CREATE"; + // [ TEMPORARY | TEMP ] + sql += " SEQUENCE " % fullyQualifiedQuotedObjectName(); + if (catalog().serverVersion() >= 100000) + sql += "\n AS " % catalog().types()->getByKey(typid)->objectName(); + sql += QString("\n INCREMENT %1\n MINVALUE %2" + " MAXVALUE %3\n START %4 CACHE %5") + .arg(increment).arg(min).arg(max).arg(start).arg(cache); + if (cycled) + sql += "\n CYCLE"; + + // [ OWNED BY { table_name.column_name | NONE } ] + sql += ";"; + return sql; +} diff --git a/pglablib/catalog/PgSequence.h b/pglablib/catalog/PgSequence.h new file mode 100644 index 0000000..5ac65b8 --- /dev/null +++ b/pglablib/catalog/PgSequence.h @@ -0,0 +1,23 @@ +#ifndef PGSEQUENCE_H +#define PGSEQUENCE_H + +#include "catalog/PgClass.h" + +class PgSequence: public PgClass { +public: + Oid typid = InvalidOid; + int64_t last = 0; + int64_t start = 0; + int64_t increment = 0; + int64_t max = 0; + int64_t min = 0; + int64_t cache = 0; + int64_t log = 0; + bool cycled = false; + bool called = false; + + using PgClass::PgClass; + QString createSql() const; +}; + +#endif // PGSEQUENCE_H diff --git a/pglablib/catalog/PgSequenceContainer.cpp b/pglablib/catalog/PgSequenceContainer.cpp new file mode 100644 index 0000000..97995ef --- /dev/null +++ b/pglablib/catalog/PgSequenceContainer.cpp @@ -0,0 +1,83 @@ +#include "PgSequenceContainer.h" +#include "Pgsql_Connection.h" +#include "Pgsql_Col.h" +#include "PgDatabaseCatalog.h" +#include "PgNamespaceContainer.h" +#include + +std::string PgSequenceContainer::getLoadQuery() const +{ + std::string select = "SELECT pg_class.oid, relname, relnamespace, reltype, reloftype, " + " relowner, relam, relfilenode, reltablespace, relpages, " + " reltuples, reltoastrelid, relisshared, relpersistence, " + " relkind, relhasoids, relispopulated, relfrozenxid, relminmxid, " + " reloptions, relacl \n"; + std::string from = + "FROM pg_catalog.pg_class \n"; + + // Starting with pg10 constanst data of sequences is retrieved from pg_sequence + // instead of SELECTing the sequence + if (minimumVersion(100000)) { + select += + " , seqtypid, seqstart, seqincrement, seqmax, \n" + " seqmin, seqcache, seqcycle \n"; + from += + " JOIN pg_catalog.pg_sequence ON (pg_class.oid=seqrelid) \n"; + } + + return select + + from + + "WHERE relkind='S'"; +} + +PgSequence PgSequenceContainer::loadElem(const Pgsql::Row &row) +{ + Pgsql::Col col(row); + Oid class_oid = col.nextValue(); + QString name = col.nextValue(); + Oid schema_oid = col.nextValue(); + + PgSequence v(m_catalog, class_oid, name, schema_oid); + Oid owner ; + AclList acl_list; + col >> v.type >> v.oftype + >> owner >> v.am >> v.filenode >> v.tablespace >> v.pages_est + >> v.tuples_est >> v.toastrelid >> v.isshared >> v.persistence + >> v.kind >> v.hasoids >> v.ispopulated >> v.frozenxid >> v.minmxid + >> v.options >> acl_list; + // Read pg_sequence fields + if (minimumVersion(100000)) + col >> v.typid >> v.start >> v.increment >> v.max >> v.min >> v.cache >> v.cycled; + + v.setOwnerOid(owner); + v.setAcls(std::move(acl_list)); + + return v; +} + +void PgSequenceContainer::loadAll(Pgsql::Connection &conn) +{ + IPgContainer::loadAll(conn); + + for (auto && seq : m_container) { + auto fqn = seq.fullyQualifiedQuotedObjectName().toUtf8(); + // SELECTs on a sequence return less fields starting with pg10 + // the missing fields are now in pg_sequence + std::string q("SELECT last_value, log_cnt, is_called"); + if (lessThenVersion(100000)) { + q += ", start_value, increment_by, max_value, \n" + " min_value, cache_value, is_cycled"; + } + q += "\nFROM " + std::string(fqn.data(), static_cast(fqn.count())); + auto && res = conn.query(q.c_str()); + if (res.rows() == 1) { + Pgsql::Row row(res, 0); + Pgsql::Col col(row); + col >> seq.last >> seq.log >> seq.called; + if (lessThenVersion(100000)) { + col >> seq.start >> seq.increment >> seq.max >> seq.min >> seq.cache >> seq.cycled; + seq.typid = Pgsql::int8_oid; // bigint used to be the only choice + } + } + } +} diff --git a/pglablib/catalog/PgSequenceContainer.h b/pglablib/catalog/PgSequenceContainer.h new file mode 100644 index 0000000..b43b318 --- /dev/null +++ b/pglablib/catalog/PgSequenceContainer.h @@ -0,0 +1,25 @@ +#ifndef PGSEQUENCECONTAINER_H +#define PGSEQUENCECONTAINER_H + +#include "PgContainer.h" +#include "PgSequence.h" + +namespace Pgsql { + + class Result; + +} + +class PgSequenceContainer: public PgContainer { +public: + using PgContainer::PgContainer; + + std::string getLoadQuery() const override; + + void loadAll(Pgsql::Connection &conn) override; +protected: + PgSequence loadElem(const Pgsql::Row &row) override; + +}; + +#endif // PGSEQUENCECONTAINER_H diff --git a/pglablib/pglablib.pro b/pglablib/pglablib.pro index c87d6a8..5ddce1c 100644 --- a/pglablib/pglablib.pro +++ b/pglablib/pglablib.pro @@ -82,7 +82,9 @@ SOURCES += \ model/CollationModelFactory.cpp \ catalog/PgLanguageContainer.cpp \ catalog/PgLanguage.cpp \ - catalog/PgAcl.cpp + catalog/PgAcl.cpp \ + catalog/PgSequence.cpp \ + catalog/PgSequenceContainer.cpp HEADERS += \ Pglablib.h \ @@ -149,7 +151,9 @@ HEADERS += \ model/CollationModelFactory.h \ catalog/PgLanguageContainer.h \ catalog/PgLanguage.h \ - catalog/PgAcl.h + catalog/PgAcl.h \ + catalog/PgSequence.h \ + catalog/PgSequenceContainer.h unix { target.path = /usr/lib