File tree 3 files changed +830
-823
lines changed
3 files changed +830
-823
lines changed Original file line number Diff line number Diff line change 6
6
"testing"
7
7
)
8
8
9
- func TestParseAlterTableAddColumn (t * testing.T ) {
9
+ func TestParseAlterTable (t * testing.T ) {
10
10
querys := []string {
11
11
`
12
12
alter table db1.table1 add (id number)
@@ -57,7 +57,10 @@ alter table db1.table1 add (id varchar2(255) default "test")
57
57
alter table db1.table1 add (id number default 123)
58
58
` ,
59
59
`
60
- alter table db1.table1 modify (id number default 123)
60
+ alter table db1.table1 modify (id varchar2(255))
61
+ ` ,
62
+ `
63
+ alter table db1.table1 modify (id varchar2(255) default "123")
61
64
` ,
62
65
`
63
66
alter table db1.table1 drop column id
@@ -82,7 +85,10 @@ alter table db1.table1 rename column id to new_id
82
85
func TestParseCreateTableStmt (t * testing.T ) {
83
86
querys := []string {
84
87
`
85
- crate table db1.table1 (id number, name varchar2(255))
88
+ create table db1.table1 (id number(10));
89
+ ` ,
90
+ `
91
+ create table db1.table1 (id number(10), name varchar2(255));
86
92
` ,
87
93
}
88
94
for _ , query := range querys {
You can’t perform that action at this time.
0 commit comments