summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-05 21:53:34 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-05 22:00:57 +0200
commitbeae2d5caa489f93abe95be603ff741fc524007a (patch)
tree55cb3a1ce308b3f377c70cdb8ebd0e1fd397a110
parente8b508516aa8f337162b96a899af95426a3c035c (diff)
downloadserenity-beae2d5caa489f93abe95be603ff741fc524007a.zip
LibSQL: Fix incorrect return types
Right now RefPtr<T> is way more lenient than it should be. That might change in the future though.
-rw-r--r--Userland/Libraries/LibSQL/Parser.cpp6
-rw-r--r--Userland/Libraries/LibSQL/Parser.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibSQL/Parser.cpp b/Userland/Libraries/LibSQL/Parser.cpp
index eb9fdd9215..cbb990e66d 100644
--- a/Userland/Libraries/LibSQL/Parser.cpp
+++ b/Userland/Libraries/LibSQL/Parser.cpp
@@ -104,7 +104,7 @@ NonnullRefPtr<CreateTable> Parser::parse_create_table_statement()
return create_ast_node<CreateTable>(move(schema_name), move(table_name), move(column_definitions), is_temporary, is_error_if_table_exists);
}
-NonnullRefPtr<CreateTable> Parser::parse_alter_table_statement()
+NonnullRefPtr<AlterTable> Parser::parse_alter_table_statement()
{
// https://sqlite.org/lang_altertable.html
consume(TokenType::Alter);
@@ -159,7 +159,7 @@ NonnullRefPtr<DropTable> Parser::parse_drop_table_statement()
return create_ast_node<DropTable>(move(schema_name), move(table_name), is_error_if_table_does_not_exist);
}
-NonnullRefPtr<Delete> Parser::parse_insert_statement(RefPtr<CommonTableExpressionList> common_table_expression_list)
+NonnullRefPtr<Insert> Parser::parse_insert_statement(RefPtr<CommonTableExpressionList> common_table_expression_list)
{
// https://sqlite.org/lang_insert.html
consume(TokenType::Insert);
@@ -209,7 +209,7 @@ NonnullRefPtr<Delete> Parser::parse_insert_statement(RefPtr<CommonTableExpressio
return create_ast_node<Insert>(move(common_table_expression_list), conflict_resolution, move(schema_name), move(table_name), move(alias), move(column_names));
}
-NonnullRefPtr<Delete> Parser::parse_update_statement(RefPtr<CommonTableExpressionList> common_table_expression_list)
+NonnullRefPtr<Update> Parser::parse_update_statement(RefPtr<CommonTableExpressionList> common_table_expression_list)
{
// https://sqlite.org/lang_update.html
consume(TokenType::Update);
diff --git a/Userland/Libraries/LibSQL/Parser.h b/Userland/Libraries/LibSQL/Parser.h
index e3a832986c..4d1c888e37 100644
--- a/Userland/Libraries/LibSQL/Parser.h
+++ b/Userland/Libraries/LibSQL/Parser.h
@@ -53,10 +53,10 @@ private:
NonnullRefPtr<Statement> parse_statement();
NonnullRefPtr<Statement> parse_statement_with_expression_list(RefPtr<CommonTableExpressionList>);
NonnullRefPtr<CreateTable> parse_create_table_statement();
- NonnullRefPtr<CreateTable> parse_alter_table_statement();
+ NonnullRefPtr<AlterTable> parse_alter_table_statement();
NonnullRefPtr<DropTable> parse_drop_table_statement();
- NonnullRefPtr<Delete> parse_insert_statement(RefPtr<CommonTableExpressionList>);
- NonnullRefPtr<Delete> parse_update_statement(RefPtr<CommonTableExpressionList>);
+ NonnullRefPtr<Insert> parse_insert_statement(RefPtr<CommonTableExpressionList>);
+ NonnullRefPtr<Update> parse_update_statement(RefPtr<CommonTableExpressionList>);
NonnullRefPtr<Delete> parse_delete_statement(RefPtr<CommonTableExpressionList>);
NonnullRefPtr<Select> parse_select_statement(RefPtr<CommonTableExpressionList>);
NonnullRefPtr<CommonTableExpressionList> parse_common_table_expression_list();