mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
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.
This commit is contained in:
parent
633dc74606
commit
30691549fd
Notes:
sideshowbarker
2024-07-18 10:04:43 +09:00
Author: https://github.com/JanDeVisser
Commit: 30691549fd
Pull-request: https://github.com/SerenityOS/serenity/pull/8306
Reviewed-by: https://github.com/MaxWipfli
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/trflynn89 ✅
13 changed files with 205 additions and 52 deletions
|
@ -136,8 +136,8 @@ TEST_CASE(order_int_values)
|
|||
TEST_CASE(tuple)
|
||||
{
|
||||
SQL::TupleDescriptor descriptor;
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::AST::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::AST::Order::Descending });
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::Order::Descending });
|
||||
SQL::Tuple tuple(descriptor);
|
||||
|
||||
tuple["col1"] = "Test";
|
||||
|
@ -149,8 +149,8 @@ TEST_CASE(tuple)
|
|||
TEST_CASE(serialize_tuple)
|
||||
{
|
||||
SQL::TupleDescriptor descriptor;
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::AST::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::AST::Order::Descending });
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::Order::Descending });
|
||||
SQL::Tuple tuple(descriptor);
|
||||
|
||||
tuple["col1"] = "Test";
|
||||
|
@ -170,8 +170,8 @@ TEST_CASE(serialize_tuple)
|
|||
TEST_CASE(copy_tuple)
|
||||
{
|
||||
SQL::TupleDescriptor descriptor;
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::AST::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::AST::Order::Descending });
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::Order::Descending });
|
||||
SQL::Tuple tuple(descriptor);
|
||||
|
||||
tuple["col1"] = "Test";
|
||||
|
@ -188,8 +188,8 @@ TEST_CASE(copy_tuple)
|
|||
TEST_CASE(compare_tuples)
|
||||
{
|
||||
SQL::TupleDescriptor descriptor;
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::AST::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::AST::Order::Descending });
|
||||
descriptor.append({ "col1", SQL::SQLType::Text, SQL::Order::Ascending });
|
||||
descriptor.append({ "col2", SQL::SQLType::Integer, SQL::Order::Descending });
|
||||
|
||||
SQL::Tuple tuple1(descriptor);
|
||||
tuple1["col1"] = "Test";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue