1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 13:55:06 +00:00

LibSQL: Partially implement the UPDATE command

This implements enough to update rows filtered by a WHERE clause.
This commit is contained in:
Timothy Flynn 2022-12-05 07:55:21 -05:00 committed by Andreas Kling
parent 1574f2c3f6
commit 53f8d62ea4
7 changed files with 203 additions and 12 deletions

View file

@ -100,6 +100,21 @@ StringView Value::type_name() const
}
}
bool Value::is_type_compatible_with(SQLType other_type) const
{
switch (type()) {
case SQLType::Null:
return false;
case SQLType::Integer:
case SQLType::Float:
return other_type == SQLType::Integer || other_type == SQLType::Float;
default:
break;
}
return type() == other_type;
}
bool Value::is_null() const
{
return !m_value.has_value();