mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibSQL: Parse CREATE TABLE statements with a nested SELECT statement
This commit is contained in:
committed by
Andreas Kling
parent
99b38aa3fa
commit
cb943a2179
@@ -81,7 +81,10 @@ NonnullRefPtr<CreateTable> Parser::parse_create_table_statement()
|
||||
String table_name;
|
||||
parse_schema_and_table_name(schema_name, table_name);
|
||||
|
||||
// FIXME: Parse "AS select-stmt".
|
||||
if (consume_if(TokenType::As)) {
|
||||
auto select_statement = parse_select_statement({});
|
||||
return create_ast_node<CreateTable>(move(schema_name), move(table_name), move(select_statement), is_temporary, is_error_if_table_exists);
|
||||
}
|
||||
|
||||
NonnullRefPtrVector<ColumnDefinition> column_definitions;
|
||||
parse_comma_separated_list(true, [&]() { column_definitions.append(parse_column_definition()); });
|
||||
|
||||
Reference in New Issue
Block a user