1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

LibSQL: Remove Core::EventReceiver parent from SQL::Relation

This relationship was only used to provide a name, factory methods, and
parent-child relationships for the relations.
This commit is contained in:
Timothy Flynn 2023-08-07 11:58:03 -04:00 committed by Tim Flynn
parent 5ad78cab8d
commit 3ea4c56d04
6 changed files with 76 additions and 51 deletions

View file

@ -20,7 +20,7 @@
static NonnullRefPtr<SQL::SchemaDef> setup_schema(SQL::Database& db)
{
auto schema = SQL::SchemaDef::construct("TestSchema");
auto schema = MUST(SQL::SchemaDef::create("TestSchema"));
MUST(db.add_schema(schema));
return schema;
}
@ -29,7 +29,7 @@ static NonnullRefPtr<SQL::SchemaDef> setup_schema(SQL::Database& db)
static NonnullRefPtr<SQL::TableDef> setup_table(SQL::Database& db)
{
auto schema = setup_schema(db);
auto table = SQL::TableDef::construct(schema, "TestTable");
auto table = MUST(SQL::TableDef::create(schema, "TestTable"));
table->append_column("TextColumn", SQL::SQLType::Text);
table->append_column("IntColumn", SQL::SQLType::Integer);
EXPECT_EQ(table->num_columns(), 2u);