diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-10-27 09:05:16 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-11-30 11:43:13 +0100 |
commit | 8f3c22718e64093649c184108db929dd74a91b49 (patch) | |
tree | ae00a9ac0b0b9929847c92db6366ec53ea9b8398 | |
parent | 3821f35e4e49e0310fc06df9d58ef136c576b6fe (diff) | |
download | serenity-8f3c22718e64093649c184108db929dd74a91b49.zip |
LibSQL: Support BOOLEAN column types in the CREATE TABLE command
The database already supports BOOLEAN, this just hooks up the executor
as well.
-rw-r--r-- | Userland/Libraries/LibSQL/AST/CreateTable.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibSQL/AST/CreateTable.cpp b/Userland/Libraries/LibSQL/AST/CreateTable.cpp index 4f44a4e463..a427e59f25 100644 --- a/Userland/Libraries/LibSQL/AST/CreateTable.cpp +++ b/Userland/Libraries/LibSQL/AST/CreateTable.cpp @@ -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() }; |