mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibSQL: Support BOOLEAN column types in the CREATE TABLE command
The database already supports BOOLEAN, this just hooks up the executor as well.
This commit is contained in:
parent
3821f35e4e
commit
8f3c22718e
Notes:
sideshowbarker
2024-07-17 05:02:42 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/8f3c22718e Pull-request: https://github.com/SerenityOS/serenity/pull/16239 Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,8 @@ ResultOr<ResultSet> CreateTable::execute(ExecutionContext& context) const
|
|||
type = SQLType::Integer;
|
||||
else if (column.type_name()->name().is_one_of("FLOAT"sv, "NUMBER"sv))
|
||||
type = SQLType::Float;
|
||||
else if (column.type_name()->name().is_one_of("BOOL"sv, "BOOLEAN"sv))
|
||||
type = SQLType::Boolean;
|
||||
else
|
||||
return Result { SQLCommand::Create, SQLErrorCode::InvalidType, column.type_name()->name() };
|
||||
|
||||
|
|
Loading…
Reference in a new issue