summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSQL/SQLResult.h
diff options
context:
space:
mode:
authorMahmoud Mandour <ma.mandourr@gmail.com>2021-09-17 22:21:59 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-04 15:51:48 +0200
commitf390478127a201ed27be79a3329bcb70b135895a (patch)
tree69654ea2f0b9d8e256780a8dc36d0d3cc1f6e7dc /Userland/Libraries/LibSQL/SQLResult.h
parent64e231bd389e0ac3afe72bf8189c703cabee8546 (diff)
downloadserenity-f390478127a201ed27be79a3329bcb70b135895a.zip
LibSQL: Parse INSERT statement without column names
This adds the ability to parse SQL INSERT statements in the following form: INSERT INTO schema.tablename VALUES (column1, column2, ...), (column1, column2, ...), ...
Diffstat (limited to 'Userland/Libraries/LibSQL/SQLResult.h')
-rw-r--r--Userland/Libraries/LibSQL/SQLResult.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSQL/SQLResult.h b/Userland/Libraries/LibSQL/SQLResult.h
index ccfa0c4486..a22d15e998 100644
--- a/Userland/Libraries/LibSQL/SQLResult.h
+++ b/Userland/Libraries/LibSQL/SQLResult.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
+ * Copyright (c) 2021, Mahmoud Mandour <ma.mandourr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -52,7 +53,8 @@ constexpr char const* command_tag(SQLCommand command)
S(ColumnDoesNotExist, "Column '{}' does not exist") \
S(TableExists, "Table '{}' already exist") \
S(InvalidType, "Invalid type '{}'") \
- S(InvalidDatabaseName, "Invalid database name '{}'")
+ S(InvalidDatabaseName, "Invalid database name '{}'") \
+ S(InvalidNumberOfValues, "Number of values does not match number of columns")
enum class SQLErrorCode {
#undef __ENUMERATE_SQL_ERROR