From 8f3c22718e64093649c184108db929dd74a91b49 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 27 Oct 2022 09:05:16 -0400 Subject: [PATCH] LibSQL: Support BOOLEAN column types in the CREATE TABLE command The database already supports BOOLEAN, this just hooks up the executor as well. --- Userland/Libraries/LibSQL/AST/CreateTable.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 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() };