The list of indexes on a table now also shows the access method (ie btree)
This commit is contained in:
parent
7c4f1a4752
commit
50cb21b6f9
17 changed files with 198 additions and 26 deletions
|
|
@ -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>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue