Formatting and more tests
This commit is contained in:
parent
cf28f8fdaf
commit
0d0ba53546
File diff suppressed because it is too large
Load Diff
|
@ -236,7 +236,8 @@ union HSQL_STYPE
|
|||
hsql::PrepareStatement* prep_stmt;
|
||||
hsql::ExecuteStatement* exec_stmt;
|
||||
hsql::ShowStatement* show_stmt;
|
||||
|
||||
|
||||
hsql::TableName table_name;
|
||||
hsql::TableRef* table;
|
||||
hsql::Expr* expr;
|
||||
hsql::OrderDescription* order;
|
||||
|
@ -255,7 +256,7 @@ union HSQL_STYPE
|
|||
std::vector<hsql::Expr*>* expr_vec;
|
||||
std::vector<hsql::OrderDescription*>* order_vec;
|
||||
|
||||
#line 259 "bison_parser.h" /* yacc.c:1909 */
|
||||
#line 260 "bison_parser.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union HSQL_STYPE HSQL_STYPE;
|
||||
|
|
|
@ -186,7 +186,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha
|
|||
%type <update_stmt> update_statement
|
||||
%type <drop_stmt> drop_statement
|
||||
%type <show_stmt> show_statement
|
||||
%type <table_name> table_name
|
||||
%type <table_name> table_name
|
||||
%type <sval> opt_alias alias file_path prepare_target_query
|
||||
%type <bval> opt_not_exists opt_exists opt_distinct
|
||||
%type <uval> import_file_type opt_join_type column_type
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# SELECT statement
|
||||
SELECT * FROM orders;
|
||||
SELECT a FROM foo WHERE a > 12 OR b > 3 AND NOT c LIMIT 10
|
||||
SELECT a FROM some_schema.foo WHERE a > 12 OR b > 3 AND NOT c LIMIT 10
|
||||
SELECT col1 AS myname, col2, 'test' FROM "table", foo AS t WHERE age > 12 AND zipcode = 12345 GROUP BY col1;
|
||||
SELECT * from "table" JOIN table2 ON a = b WHERE (b OR NOT a) AND a = 12.5
|
||||
(SELECT a FROM foo WHERE a > 12 OR b > 3 AND c NOT LIKE 's%' LIMIT 10);
|
||||
|
@ -29,6 +30,7 @@ CREATE TABLE "table" FROM TBL FILE 'students.tbl'; SELECT * FROM "table";
|
|||
INSERT INTO test_table VALUES (1, 2, 'test');
|
||||
INSERT INTO test_table (id, value, name) VALUES (1, 2, 'test');
|
||||
INSERT INTO test_table SELECT * FROM students;
|
||||
INSERT INTO some_schema.test_table SELECT * FROM another_schema.students;
|
||||
# DELETE
|
||||
DELETE FROM students WHERE grade > 3.0
|
||||
DELETE FROM students
|
||||
|
@ -37,6 +39,7 @@ TRUNCATE students
|
|||
UPDATE students SET grade = 1.3 WHERE name = 'Max Mustermann';
|
||||
UPDATE students SET grade = 1.3, name='Felix Fürstenberg' WHERE name = 'Max Mustermann';
|
||||
UPDATE students SET grade = 1.0;
|
||||
UPDATE some_schema.students SET grade = 1.0;
|
||||
# DROP
|
||||
DROP TABLE students;
|
||||
DROP TABLE IF EXISTS students;
|
||||
|
|
Loading…
Reference in New Issue