mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibSQL: Move Lexer and Parser machinery to AST directory
The SQL engine is expected to be a fairly sizeable piece of software. Therefore we're starting to restructure the codebase for growth.
This commit is contained in:
parent
e0f1c237d2
commit
4198f7e1af
24 changed files with 281 additions and 278 deletions
|
@ -13,7 +13,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/Object.h>
|
||||
#include <LibSQL/AST.h>
|
||||
#include <LibSQL/AST/AST.h>
|
||||
#include <LibSQL/Forward.h>
|
||||
#include <LibSQL/Key.h>
|
||||
#include <LibSQL/Type.h>
|
||||
|
@ -90,11 +90,11 @@ class KeyPartDef : public ColumnDef {
|
|||
C_OBJECT(KeyPartDef);
|
||||
|
||||
public:
|
||||
KeyPartDef(IndexDef*, String, SQLType, Order = Order::Ascending);
|
||||
Order sort_order() const { return m_sort_order; }
|
||||
KeyPartDef(IndexDef*, String, SQLType, AST::Order = AST::Order::Ascending);
|
||||
AST::Order sort_order() const { return m_sort_order; }
|
||||
|
||||
private:
|
||||
Order m_sort_order { Order::Ascending };
|
||||
AST::Order m_sort_order { AST::Order::Ascending };
|
||||
};
|
||||
|
||||
class IndexDef : public Relation {
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
NonnullRefPtrVector<KeyPartDef> key_definition() const { return m_key_definition; }
|
||||
bool unique() const { return m_unique; }
|
||||
[[nodiscard]] size_t size() const { return m_key_definition.size(); }
|
||||
void append_column(String, SQLType, Order = Order::Ascending);
|
||||
void append_column(String, SQLType, AST::Order = AST::Order::Ascending);
|
||||
Key key() const override;
|
||||
[[nodiscard]] TupleDescriptor to_tuple_descriptor() const;
|
||||
static NonnullRefPtr<IndexDef> index_def();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue