Skip to content

Commit c00345d

Browse files
authored
170 supporting set statement (#177)
* yml: assemble wget to one sh * rule: set statement forward to L2. * hsql: update version 2ebcb05 * yml: update ver. * hsql: update ver.
1 parent 7e0d1ce commit c00345d

File tree

17 files changed

+52
-10
lines changed

17 files changed

+52
-10
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: update hsql
2929
run: |
30-
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-cb91252/hsql.plus-cb91252.tar.gz -O hsql.tar.gz
30+
sh ${{github.workspace}}/script/download.sh
3131
tar -zxvf hsql.tar.gz
3232
cd hsql
3333
cp -rf include/ ${{github.workspace}}/src/libs/hsql/

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
env:
77
CC: gcc-4.9
88
CXX: g++-4.9
9-
ver: dtc-v2.0.1-rc2
9+
ver: dtc-v2.0.1-rc3
1010

1111
jobs:
1212
build:
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: update hsql
3131
run: |
32-
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-cb91252/hsql.plus-cb91252.tar.gz -O hsql.tar.gz
32+
sh ${{github.workspace}}/script/download.sh
3333
tar -zxvf hsql.tar.gz
3434
cd hsql
3535
cp -rf include/ ${{github.workspace}}/src/libs/hsql/

.github/workflows/ubuntu-18.04&gcc-4.9.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: update hsql
2929
run: |
30-
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-cb91252/hsql.plus-cb91252.tar.gz -O hsql.tar.gz
30+
sh ${{github.workspace}}/script/download.sh
3131
tar -zxvf hsql.tar.gz
3232
cd hsql
3333
cp -rf include/ ${{github.workspace}}/src/libs/hsql/

.github/workflows/ubuntu-20.04&gcc-4.9.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: update hsql
2929
run: |
30-
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-cb91252/hsql.plus-cb91252.tar.gz -O hsql.tar.gz
30+
sh ${{github.workspace}}/script/download.sh
3131
tar -zxvf hsql.tar.gz
3232
cd hsql
3333
cp -rf include/ ${{github.workspace}}/src/libs/hsql/

.github/workflows/ubuntu-latest&gcc-4.9.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: update hsql
2929
run: |
30-
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-cb91252/hsql.plus-cb91252.tar.gz -O hsql.tar.gz
30+
sh ${{github.workspace}}/script/download.sh
3131
tar -zxvf hsql.tar.gz
3232
cd hsql
3333
cp -rf include/ ${{github.workspace}}/src/libs/hsql/

script/download.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-daefd23/hsql.plus-daefd23.tar.gz -O hsql.tar.gz

script/hsql-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
wget https://github.com/DTC8/sql-parser/releases/download/hsql.plus-cb91252/hsql.plus-cb91252.tar.gz -O hsql.tar.gz
1+
sh download.sh
22
tar -zxvf hsql.tar.gz
33
cp -rf hsql/include/ ../src/libs/hsql/
44
cp -f hsql/libs/libsqlparser.so ../src/libs/hsql/libs/libsqlparser.so

src/libs/hsql/include/parser/bison_parser.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ union HSQL_STYPE
283283
hsql::SQLStatement* statement;
284284
hsql::TransactionStatement* transaction_stmt;
285285
hsql::UpdateStatement* update_stmt;
286+
hsql::SetStatement* set_stmt;
286287

287288
hsql::Alias* alias_t;
288289
hsql::AlterAction* alter_action_t;
@@ -323,7 +324,7 @@ union HSQL_STYPE
323324
hsql::RowLockMode lock_mode_t;
324325
hsql::RowLockWaitPolicy lock_wait_policy_t;
325326

326-
#line 327 "bison_parser.h"
327+
#line 328 "bison_parser.h"
327328

328329
};
329330
typedef union HSQL_STYPE HSQL_STYPE;

src/libs/hsql/include/sql/DeleteStatement.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define SQLPARSER_DELETE_STATEMENT_H
33

44
#include "SQLStatement.h"
5+
#include "SelectStatement.h"
56

67
// Note: Implementations of constructors and destructors can be found in statements.cpp.
78
namespace hsql {
@@ -16,6 +17,7 @@ struct DeleteStatement : SQLStatement {
1617
char* schema;
1718
char* tableName;
1819
Expr* expr;
20+
LimitDescription* limit;
1921
};
2022

2123
} // namespace hsql

src/libs/hsql/include/sql/Expr.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ enum ExprType {
3030
kExprArray,
3131
kExprArrayIndex,
3232
kExprExtract,
33-
kExprCast
33+
kExprCast,
34+
kExprEqual
3435
};
3536

3637
// Operator types. These are important for expressions of type kExprOperator.
@@ -99,6 +100,7 @@ struct Expr {
99100
Expr* expr2;
100101
std::vector<Expr*>* exprList;
101102
SelectStatement* select;
103+
DataType data_type;
102104
char* name;
103105
char* table;
104106
char* alias;

0 commit comments

Comments
 (0)