mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	LibSQL: Parse CREATE TABLE statements with a nested SELECT statement
This commit is contained in:
		
							parent
							
								
									99b38aa3fa
								
							
						
					
					
						commit
						cb943a2179
					
				
					 3 changed files with 33 additions and 1 deletions
				
			
		|  | @ -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()); }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn