diff --git a/pgadmin/include/schema/pgSequence.h b/pgadmin/include/schema/pgSequence.h index f7ed96d..6776f51 100644 --- a/pgadmin/include/schema/pgSequence.h +++ b/pgadmin/include/schema/pgSequence.h @@ -51,6 +51,10 @@ public: { return lastValue; } + wxLongLong GetNextValue() const + { + return nextValue; + } wxLongLong GetMinValue() const { return minValue; @@ -94,7 +98,7 @@ public: } private: - wxLongLong lastValue, minValue, maxValue, cacheValue, increment; + wxLongLong lastValue, nextValue, minValue, maxValue, cacheValue, increment; bool cycled, called, isReplicated; }; diff --git a/pgadmin/schema/pgSequence.cpp b/pgadmin/schema/pgSequence.cpp index 870cf2f..b16d79c 100644 --- a/pgadmin/schema/pgSequence.cpp +++ b/pgadmin/schema/pgSequence.cpp @@ -128,6 +128,7 @@ void pgSequence::UpdateValues() increment = sequence->GetLongLong(wxT("increment_by")); cycled = sequence->GetBool(wxT("is_cycled")); called = sequence->GetBool(wxT("is_called")); + nextValue = lastValue + increment; delete sequence; } @@ -178,6 +179,7 @@ void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr properties->AppendItem(_("Owner"), GetOwner()); properties->AppendItem(_("ACL"), GetAcl()); properties->AppendItem(_("Current value"), GetLastValue()); + properties->AppendItem(_("Next value"), GetNextValue()); properties->AppendItem(_("Minimum"), GetMinValue()); properties->AppendItem(_("Maximum"), GetMaxValue()); properties->AppendItem(_("Increment"), GetIncrement());