summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSQL/AST
diff options
context:
space:
mode:
authorJan de Visser <jan@de-visser.net>2021-06-27 21:00:08 -0400
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-07-08 17:55:59 +0430
commit30691549fdc0d6f703735fb0c30ab54cf0cecb65 (patch)
treeefb328f7a7b42e5d647cbe8085d94920c57d6932 /Userland/Libraries/LibSQL/AST
parent633dc74606a556cdea4606f93fa50f01f46e2cd6 (diff)
downloadserenity-30691549fdc0d6f703735fb0c30ab54cf0cecb65.zip
LibSQL: Move Order and Nulls enums from SQL::AST to SQL namespace
The Order enum is used in the Meta component of LibSQL. Using this enum meant having to include the monster AST/AST.h include file. Furthermore, they are sort of basic and therefore can live in the general SQL namespace. Moved to LibSQL/Type.h. Also introduced a new class, SQLResult, which is needed in future patches.
Diffstat (limited to 'Userland/Libraries/LibSQL/AST')
-rw-r--r--Userland/Libraries/LibSQL/AST/AST.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/Userland/Libraries/LibSQL/AST/AST.h b/Userland/Libraries/LibSQL/AST/AST.h
index 8f22bbab65..855c0bbd26 100644
--- a/Userland/Libraries/LibSQL/AST/AST.h
+++ b/Userland/Libraries/LibSQL/AST/AST.h
@@ -13,6 +13,8 @@
#include <AK/String.h>
#include <LibSQL/AST/Token.h>
#include <LibSQL/Forward.h>
+#include <LibSQL/SQLResult.h>
+#include <LibSQL/Type.h>
namespace SQL::AST {
@@ -251,16 +253,6 @@ private:
NonnullRefPtrVector<TableOrSubquery> m_subqueries {};
};
-enum class Order {
- Ascending,
- Descending,
-};
-
-enum class Nulls {
- First,
- Last,
-};
-
class OrderingTerm : public ASTNode {
public:
OrderingTerm(NonnullRefPtr<Expression> expression, String collation_name, Order order, Nulls nulls)