1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

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, ...), ...
This commit is contained in:
Mahmoud Mandour 2021-09-17 22:21:59 +02:00 committed by Andreas Kling
parent 64e231bd38
commit f390478127
2 changed files with 18 additions and 4 deletions

View file

@ -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