mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:05:06 +00:00
LibSQL: Remove infallible type conversions from SQL::Value
Force the callers to either know that the type is convertible, or to handle the conversion failure.
This commit is contained in:
parent
af3980384b
commit
7d41b46a7d
8 changed files with 22 additions and 64 deletions
|
@ -183,9 +183,10 @@ void TableDef::append_column(String name, SQLType sql_type)
|
|||
|
||||
void TableDef::append_column(Key const& column)
|
||||
{
|
||||
append_column(
|
||||
(String)column["column_name"],
|
||||
(SQLType)((int)column["column_type"]));
|
||||
auto column_type = column["column_type"].to_int();
|
||||
VERIFY(column_type.has_value());
|
||||
|
||||
append_column(column["column_name"].to_string(), static_cast<SQLType>(*column_type));
|
||||
}
|
||||
|
||||
Key TableDef::make_key(SchemaDef const& schema_def)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue