The list of indexes on a table now also shows the access method (ie btree)

This commit is contained in:
eelke 2018-08-25 18:11:12 +02:00
parent 7c4f1a4752
commit 50cb21b6f9
17 changed files with 198 additions and 26 deletions

View file

@ -84,6 +84,31 @@ private:
using PKeyValues = std::vector<std::string>;
class ColumnSort {
public:
enum Direction { Ascending, Descending };
enum NullSorting {
Default, ///< Behaves like NULL values are larger then non NULL values ASC NULLS LAST or DESC NULLS FIRST
First,
Last };
std::string columnName;
Direction direction = Direction::Ascending;
NullSorting nulls = NullSorting::Default;
std::string toSql() const
{
std::string res = columnName;
if (direction == Direction::Descending)
res += " DESC";
if (nulls == NullSorting::First)
res += " NULLS FIRST";
else if (nulls == NullSorting::Last)
res += " NULLS LAST";
}
};
// using RowData = std::vector<std::string>;
// using RowDataPtr = std::unique_ptr<RowData>;