加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ParseTree 25.41 KB
一键复制 编辑 原始数据 按行查看 历史
liwei 提交于 2019-04-01 19:16 . Update ParseTree
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393
{
"ID":4000,
"NAME":"COLUMN TYPE",
"COMMENT":"COLUMN TYPE",
"OR":true,
"C":[
{ "OPT":true,
"C":[
{"K":"_S_:BIT","F":"bitType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"bitTypeSize"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:TINYINT","F":"tinyIntType"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{"OPT":true,"K":"_S_:BOOLEAN","F":"BoolType"},
{"OPT":true,"K":"_S_:BOOL","F":"BoolType"},
{
"OPT":true,
"C":[
{"K":"_S_:SMALLINT","F":"smallIntType"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:MEDIUMINT","F":"mediumIntType"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:INTEGER","F":"intType"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:INT","F":"intType"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:BIGINT","F":"bigIntType"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:DECIMAL","F":"decimalType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"floatSize"},
{"OPT":true,"C":[
{"K":"_C_:,"},
{"K":"_NUM_","F":"floatDigitsSize"}
]},
{"K":"_C_:)"}
]},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:FLOAT","F":"floatType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"floatSize"},
{"OPT":true,"C":[
{"K":"_C_:,"},
{"K":"_NUM_","F":"floatDigitsSize"}
]},
{"K":"_C_:)"}
]},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:DOUBLE","F":"doubleType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"floatSize"},
{"OPT":true,"C":[
{"K":"_C_:,"},
{"K":"_NUM_","F":"floatDigitsSize"}
]},
{"K":"_C_:)"}
]},
{"OPT":true,"K":"_S_:UNSIGNED","F":"numertypeIsUnsigned"},
{"OPT":true,"K":"_S_:ZEROFILL"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:DATETIME","F":"datetimeType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"datetimeTypePrec"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,"K":"_S_:DATE","F":"dateType"},
{"OPT":true,
"C":[
{"K":"_S_:TIMESTAMP","F":"timestampType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"timestampTypePrec"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:TIME","F":"timeType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"timeTypePrec"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:YEAR","F":"yearType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"yearTypePrec"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,
"C":[
{"OPT":true,"K":"_S_:NATIONAL"},
{"OR":true,"C":[
{"K":"_S_:CHAR","F":"charType"},
{"K":"_S_:VARCHAR","F":"varcharType"}
]},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"stringTypeSize"},
{"K":"_C_:)"}
]},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:BINARY","F":"binaryType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"stringTypeSize"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:VARBINARY","F":"varbinaryType"},
{"OPT":true,"C":[
{"K":"_C_:("},
{"K":"_NUM_","F":"stringTypeSize"},
{"K":"_C_:)"}
]}
]},
{"OPT":true,"K":"_S_:TINYBLOB","F":"tinyBlobType"},
{"OPT":true,"K":"_S_:BLOB","F":"blobType"},
{"OPT":true,"K":"_S_:MEDIUMBLOB","F":"mediumBlobType"},
{"OPT":true,"K":"_S_:LONGBLOB","F":"longBlobtype"},
{"OPT":true,
"C":[
{"K":"_S_:TINYTEXT","F":"tinyTextType"},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:MEDIUMTEXT","F":"mediumTextType"},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:TEXT","F":"textType"},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:LONGTEXT","F":"longTexttype"},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:ENUM","F":"enumType"},
{"K":"_C_:("},
{"LOOP":true,"C":[
{"K":"_A_","F":"enumOrSetValueList"},
{"OPT":true,"K":"_C_:,"}
]},
{"K":"_C_:)"},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,
"C":[
{"K":"_S_:SET","F":"setType"},
{"K":"_C_:("},
{"LOOP":true,"C":[
{"K":"_A_","F":"enumOrSetValueList"},
{"OPT":true,"K":"_C_:,"}
]},
{"K":"_C_:)"},
{"OPT":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_AS_","F":"stringTypeCharSet"}
]},
{"OPT":true,"C":[
{"K":"_S_:COLLATE"},
{"K":"_AS_"}
]}
]},
{"OPT":true,"K":"_S_:GEOMETRY","F":"geometryType"},
{"OPT":true,"K":"_S_:POINT","F":"geometryType"},
{"OPT":true,"K":"_S_:LINESTRING","F":"geometryType"},
{"OPT":true,"K":"_S_:JSON","F":"jsonType"}
]
}
{
"ID":20000,
"NAME":"DEFAULT VALUE",
"OPT":true,
"C":[
{"K":"_S_:DEFAULT"},
{"OR":true,
"C":[
{"C":[
{"K":"_NUM_"},
{"OPT":true,"C":[
{"K":"_C_:."},
{"K":"_NUM_"}
]}
]},
{"K":"_A_"},
{"OR":true,"LOOP":true,"C":[
{"C":[
{"K":"_S_:CURRENT_TIMESTAMP"},
{"OPT":true,"K":"_B_","COMMENT":"`gmt_create` timestamp(6) not null default current_timestamp(6)"}
]},
{"C":[
{"K":"_S_:ON"},
{"K":"_S_:UPDATE"},
{"K":"_S_:CURRENT_TIMESTAMP"},
{"OPT":true,"K":"_B_","COMMENT":"`gmt_create` timestamp(6) not null default current_timestamp(6)"}
]}
]},
{"C":[
{"K":"_AS_"},
{"K":"_B_"}
]},
{"OR":true,"C":[
{"K":"_S_:TRUE"},
{"K":"_S_:FALSE"}
]},
{"K":"_S_:NULL"},
{"K":"_N_"}
]}
]
}
{
"ID":0,
"NAME":"COLUMN INFO",
"LOOP":true,
"COMMENT":"COLUMN INFO",
"C":[
{"K":"_N_","COMMENT":"column name","F":"newColumn"},
{"INCLUDE":4000,"COMMENT":"column type"},
{
"OPT":true,
"OR":true,
"C":[
{"K":"_S_:NOT NULL"},
{"K":"_S_:NULL"}
]},
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:GENERATED ALWAYS"},
{"K":"_S_:AS","F":"generatedColumn"},
{"K":"_B_"},
{"OPT":true,"C":[
{"K":"_S_:VIRTUAL"},
{"K":"_S_:STORED"}
]}
]},
{"INCLUDE":20000},
{"OPT":true,"K":"_S_:AUTO_INCREMENT"},
{"OPT":true,
"C":[
{"K":"_S_:UNIQUE","F":"columnIsUK"},
{"OPT":true,"K":"_S_:KEY"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:PRIMARY","F":"columnIsPK"},
{"OPT":true,"K":"_S_:KEY"}
]},
{"OPT":true,"K":"_S_:KEY","F":"columnIsKey"},
{
"OPT":true,
"C":[
{"K":"_S_:COMMENT"},
{"K":"_A_"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:COLUMN_FORMAT"},
{"K":"_AS_"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:STORAGE"},
{"K":"_AS_"}
]},
{
"OPT":true,
"C":[
{"K":"_S_:REFERENCES"},
{"K":"_N_"},
{"K":"_B_"},
{
"OPT":true,
"C":[
{"K":"_S_:MATCH"},
{
"OR":true,
"C":[
{"K":"_S_:FULL"},
{"K":"_S_:PARTIAL"},
{"K":"_S_:SIMPLE"}
]}
]},
{
"OPT":true,
"C":[
{"K":"_S_:ON"},
{
"OR":true,
"C":[
{"K":"_S_:DELETE"},
{"K":"_S_:UPDATE"}
]},
{
"OR":true,
"C":[
{"K":"_S_:RESTRICT"},
{"K":"_S_:CASCADE"},
{"K":"_S_:SET NULL"},
{"K":"_S_:NO ACTION"},
{"K":"_S_:SET DEFAULT"}
]}
]}
]}
]
}
{
"ID":1001,
"name":"index_option",
"OPT":true,
"OR":true,
"LOOP":true,
"C":[
{"OPT":true,
"C":[
{"K":"_S_:KEY_BLOCK_SIZE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]
},
{"OPT":true,
"C":[
{"K":"_S_:USING"},
{"K":"_AS_"}
]
},
{"OPT":true,
"C":[
{"K":"_S_:WITH PARSER"},
{"K":"_AS_"}
]
},
{"OPT":true,
"C":[
{"K":"_S_:COMMENT"},
{"K":"_A_"}
]
},
{"OPT":true,"OR":true,
"C":[
{"K":"_S_:VISIBLE"},
{"K":"_S_:INVISIBLE"}
]
}
]
}
{
"ID":2001,
"COMMENT":"CONSTRAINT",
"LOOP":true,
"C":[
{
"OPT":true,
"C":[
{"K":"_S_:CONSTRAINT"},
{"OPT":true,"K":"_AS_","F":"constraintName"}
]
},
{
"OR":true,
"C":[
{
"C":[
{"K":"_S_:PRIMARY KEY","F":"primaryKeys"},
{"OPT":true,
"C":[
{"K":"_S_:USING"},
{"K":"_AS_"}
]},
{"K":"_C_:("},
{"LOOP":true,"C":[
{"K":"_N_","F":"keyColumn"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"OR":true,"C":[
{"K":"_S_:ASC"},
{"K":"_S_:DESC"}
]},
{"OPT":true,"K":"_C_:,"}
]},
{"K":"_C_:)"},
{"INCLUDE":1001}
]
},
{
"C":[
{"K":"_S_:UNIQUE","F":"uniqueKeys"},
{
"OR":true,
"C":[
{"K":"_S_:KEY"},
{"K":"_S_:INDEX"}
]
},
{"OPT":true,"K":"_N_","F":"uniqueKeyName"},
{"OPT":true,
"C":[
{"K":"_S_:USING"},
{"K":"_AS_"}
]},
{"K":"_C_:("},
{"LOOP":true,"C":[
{"K":"_N_","F":"keyColumn"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"OR":true,"C":[
{"K":"_S_:ASC"},
{"K":"_S_:DESC"}
]},
{"OPT":true,"K":"_C_:,"}
]},
{"K":"_C_:)"},
{"INCLUDE":1001}
]}
]
}
]
}
{
"ID":6000,
"NAME":"create_definition",
"LOOP":true,
"OPT":true,
"C":[
{ "OR":true,
"C":[
{"INCLUDE":0},
{"INCLUDE":2001},
{"OPT":true,
"C":[
{"OR":true,
"C":[
{"K":"_S_:KEY"},
{"K":"_S_:INDEX"}
]
},
{"OPT":true,"K":"_N_"},
{"OPT":true,
"C":[
{"K":"_S_:USING"},
{"K":"_AS_"}
]},
{"K":"_B_"},
{"INCLUDE":1001}
]
},
{"OPT":true,
"C":[
{"OR":true,
"C":[
{"K":"_S_:FULLTEXT"},
{"K":"_S_:SPATIAL"}
]
},
{"OR":true,"OPT":true,
"C":[
{"K":"_S_:KEY"},
{"K":"_S_:INDEX"}
]
},
{"OPT":true,"K":"_N_"},
{"K":"_B_"},
{"INCLUDE":1001}
]
}
]},
{"OPT":true,"K":"_C_:,"}
]
}
{
"ID":7000,
"LOOP":true,
"NAME":"table_options",
"OPT":true,
"OR":true,
"C":[
{"OPT":true,"C":[
{"K":"_S_:AUTO_INCREMENT"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:AVG_ROW_LENGTH"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:DEFAULT"},
{"OR":true,"C":[
{"C":[
{"OR":true,"C":[
{"K":"_S_:CHARACTER SET"},
{"K":"_S_:CHARSET"},
]},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_","F":"tableCharset"}
]},
{"C":[
{"K":"_S_:COLLATE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]}
]}
]},
{"OPT":true,"C":[
{"K":"_S_:CHECKSUM"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:COMMENT"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]},
{"OPT":true,"C":[
{"K":"_S_:COMPRESSION"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]},
{"OPT":true,"C":[
{"K":"_S_:CONNECTION"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]},
{"OPT":true,"C":[
{"OR":true,"C":[
{"K":"_S_:DATA"},
{"K":"_S_:INDEX"}
]},
{"K":"_S_:DIRECTORY"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]},
{"OPT":true,"C":[
{"K":"_S_:DELAY_KEY_WRITE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:ENCRYPTION"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:ENGINE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:INSERT_METHOD"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:KEY_BLOCK_SIZE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:MAX_ROWS"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:MIN_ROWS"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:PACK_KEYS"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:PASSWORD"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:ROW_FORMAT"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]},
{"OPT":true,"C":[
{"K":"_S_:STATS_AUTO_RECALC"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:STATS_PERSISTENT"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:STATS_SAMPLE_PAGES"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]},
{"OPT":true,"C":[
{"K":"_S_:TABLESPACE"},
{"K":"_AS_"},
{"OPT":true,"C":[
{"K":"_S_:STORAGE"},
{"K":"_AS_"}
]},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:UNION"},
{"OPT":true,"K":"_C_:="},
{"K":"_B_"}
]},
]
}
{
"ID":8000,
"NAME":"partition_options",
"OPT":true,
"OR":true,
"C":[
{"K":"_S_:PARTITION BY"},
{"OR":true,"C":[
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:LINEAR"},
{"OR":true,"C":[
{"C":[
{"K":"_S_:HASH"},
{"K":"_B_"}
]},
{"C":[
{"K":"_S_:KEY"},
{"OPT":true,"C":[
{"K":"_S_:ALGORITHM"},
{"K":"_C_:="},
{"K":"_AS_"}
]},
{"K":"_B_"}
]}
]}
]},
{"C":[
{"OR":true,"C":[
{"K":"_S_:RANGE"},
{"K":"_S_:LIST"}
]},
{"OR":true,"C":[
{"K":"_B_"},
{"C":[
{"K":"_S_:COLUMNS"},
{"K":"_B_"}
]}
]}
]}
]},
{"OPT":true,"C":[
{"K":"_S_:PARTITIONS"},
{"K":"_AS_"}
]},
{"OPT":true,"C":[
{"K":"_S_:SUBPARTITION BY"},
{"OR":true,"C":[
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:LINEAR"},
{"OR":true,"C":[
{"C":[
{"K":"_S_:HASH"},
{"K":"_B_"}
]},
{"C":[
{"K":"_S_:KEY"},
{"OPT":true,"C":[
{"K":"_S_:ALGORITHM"},
{"K":"_C_:="},
{"K":"_AS_"}
]},
{"K":"_B_"}
]}
]}
]}
]},
{"OPT":true,"C":[
{"K":"_S_:SUBPARTITIONS"},
{"K":"_AS_"}
]}
]},
{"K":"_B_"}
]
}
{
"ID":3000,
"END":true,
"HEAD":true,
"COMMENT":"CREATE TABLE",
"C":[
{"K":"_S_:CREATE"},
{"OPT":true,"K":"_S_:TEMPORARY"},
{"OR":true,
"C" : [
{"K":"_S_:TABLE","F":"newTable"},
{"K":"_S_:SEQUENCE","COMMENT":"in rds,CREATE SEQUENCE is just like CREATE TABLE","F":"newTable"}
]},
{"OPT":true,"K":"_S_:IF NOT EXISTS"},
{
"OR":true,
"C":[
{"OR":true,
"C":[
{
"COMMENT":"create table dbName.tableName",
"C":[
{"K":"_N_","F":"NewTableDBName"},
{"K":"_C_:."},
{"K":"_N_","F":"NewTableName"}
]},
{"K":"_N_","COMMENT":"create table tableName","F":"NewTableName"}
]}
]},
{
"OR":true,
"C":[
{
"C":[
{"K":"_S_:LIKE","F":"createTableLike"},
{
"OR":true,
"C":[
{
"C":[
{"K":"_N_","F":"NewTableLikedDBName"},
{"K":"_C_:."},
{"K":"_N_","F":"NewTableLikedTableName"}
]},
{"K":"_N_","F":"NewTableLikedTableName"}
]}
]},
{
"C":[
{"K":"_C_:("},
{"INCLUDE":6000},
{"K":"_C_:)"},
{"INCLUDE":7000}
]}
]},
{"OPT":true,"K":"_S_:;"}
]
}
{
"ID":10000,
"OPT":true,
"COMMENT":"alter table add column",
"C":[
{"K":"_S_:ADD"},
{"K":"_S_:COLUMN"},
{"INCLUDE":0},
{"OPT":true,"OR":true,"C":
[
{"K":"_S_:FIRST","F":"AlterNewColumnAtFirst"},
{"C":[
{"K":"_S_:AFTER"},
{"K":"_N_","F":"AlterNewColumnAfter"}
]}
]}
]
}
{
"ID":10010,
"OPT":true,
"COMMENT":"alter table add columns",
"C":[
{"K":"_S_:ADD"},
{"K":"_S_:COLUMN"},
{"K":"_C_:("},
{"INCLUDE":0},
{"K":"_C_:)"}
]
}
{
"ID":10020,
"OPT":true,
"COMMENT":"alter table MODIFY column",
"C":[
{"K":"_S_:MODIFY"},
{"OPT":true,"K":"_S_:COLUMN"},
{"INCLUDE":0},
{"OPT":true,"OR":true,"C":
[
{"K":"_S_:FIRST","F":"AlterNewColumnAtFirst"},
{"C":[
{"K":"_S_:AFTER"},
{"K":"_N_","F":"AlterNewColumnAfter"}
]}
]}
]
}
{
"ID":10030,
"OPT":true,
"COMMENT":"alter table add CONSTRAINT",
"C":[
{"K":"_S_:ADD"},
{"INCLUDE":2001}
]
}
{
"ID":10040,
"OPT":true,
"COMMENT":"alter table add key",
"C":[
{"K":"_S_:ADD"},
{"OR":true,
"C":[
{"K":"_S_:KEY"},
{"K":"_S_:INDEX"}
]},
{"LOOP":true,"C":[
{"OPT":true,"K":"_N_"},
{"OPT":true,
"C":[
{"K":"_S_:USING"},
{"K":"_AS_"}
]},
{"K":"_B_"},
{"INCLUDE":1001}
]}
]
}
{
"ID":10050,
"OPT":true,
"COMMENT":"alter table drop index",
"C":[
{"K":"_S_:DROP"},
{"OR":true,
"C":[
{"K":"_S_:KEY"},
{"K":"_S_:INDEX"}
]},
{"K":"_N_","F":"dropIndex"}
]
}
{
"ID":10060,
"OPT":true,
"COMMENT":"alter table change column",
"F":"alterChangeColumn",
"C":[
{"K":"_S_:CHANGE"},
{"OPT":true,"K":"_S_:COLUMN"},
{"K":"_N_","F":"alterChangeColumnName"},
{"INCLUDE":0},
{"OPT":true,"OR":true,"C":
[
{"K":"_S_:FIRST","F":"AlterNewColumnAtFirst"},
{"C":[
{"K":"_S_:AFTER"},
{"K":"_N_","F":"AlterNewColumnAfter"}
]}
]}
]
}
{
"ID":10070,
"OPT":true,
"COMMENT":"alter table drop column",
"C":[
{"K":"_S_:DROP"},
{"OPT":true,"K":"_S_:COLUMN"},
{"K":"_N_","F":"dropColumn"}
]
}
{
"ID":10080,
"OPT":true,
"COMMENT":"alter table drop primary key",
"C":[
{"K":"_S_:DROP"},
{"K":"_S_:PRIMARY"},
{"K":"_S_:KEY","F":"dropPrimaryKey"}
]
}
{
"ID":10090,
"OPT":true,
"COMMENT":"alter table drop foreign key",
"C":[
{"K":"_S_:DROP"},
{"K":"_S_:FOREIGN "},
{"K":"_S_:KEY"},
{"K":"_N_","F":"dropForeignKey"}
]
}
{
"ID":9000,
"NAME":"alter table",
"OPT":true,
"HEAD":true,
"C":[
{"K":"_S_:ALTER"},
{"K":"_S_:TABLE","F":"alterTable"},
{
"OR":true,
"C":[
{"OR":true,
"C":[
{
"COMMENT":"alter table dbName.tableName",
"C":[
{"K":"_N_","F":"alterTableDbName"},
{"K":"_C_:."},
{"K":"_N_","F":"alterTableTableName"}
]},
{"K":"_N_","COMMENT":"alter table tableName","F":"alterTableTableName"}
]}
]},
{
"LOOP":true,
"C":[
{"OR":true,"C":[
{"INCLUDE":10000},
{"INCLUDE":10010},
{"INCLUDE":10020},
{"INCLUDE":10030},
{"INCLUDE":10040},
{"INCLUDE":10050},
{"INCLUDE":10060},
{"INCLUDE":10070},
{"INCLUDE":10080},
{"INCLUDE":10090},
{"C":[
{"K":"_S_:COMMENT"},
{"OPT":true,"K":"_C_:="},
{"K":"_A_"}
]}
]},
{"OPT":true,"K":"_C_:,"}
]
},
{"OPT":true,"K":"_S_:;"}
]
}
{
"ID":12000,
"NAME":"create index",
"OPT":true,
"HEAD":true,
"C":[
{"K":"_S_:CREATE"},
{"OPT":true,"C":[
{"K":"_S_:ONINE"},
{"K":"_S_:OFFLINE"}
]},
{"OPT":true,"OR":true,"C":[
{"K":"_S_:UNIQUE","F":"createUK"},
{"K":"_S_:FULLTEXT"},
{"K":"_S_:SPATIAL"}
]},
{"K":"_S_:INDEX"},
{"K":"_N_","F":"createUKName"},
{"OPT":true,
"C":[
{"K":"_S_:USING"},
{"K":"_AS_"}
]
},
{"K":"_S_:ON"},
{"OR":true,
"C":[
{
"COMMENT":"dbName.tableName",
"C":[
{"K":"_N_","F":"createUKONDatabaseName"},
{"K":"_C_:."},
{"K":"_N_","F":"createUKONTableName"}
]},
{"K":"_N_","COMMENT":"tableName","F":"createUKONTableName"}
]},
{"K":"_C_:("},
{"LOOP":true,
"C":[
{"K":"_N_","F":"createUkByColumn"},
{"OPT":true,"K":"_B_"},
{"OPT":true,"C":[
{"K":"_S_:ASC"},
{"K":"_S_:DESC"}
]},
{"OPT":true,"K":"_C_:,"}
]},
{"K":"_C_:)"},
{"INCLUDE":1001},
{"OR":true,"OPT":true,"C":[
{"C":[
{"K":"_S_:ALGORITHM"},
{"OPT":true,"K":"_C_:="},
{"OR":true,"C":[
{"K":"_S_:DEFAULT"},
{"K":"_S_:INPLACE"},
{"K":"_S_:COPY"}
]}
]},
{"C":[
{"K":"_S_:LOCK"},
{"OPT":true,"K":"_C_:="},
{"OR":true,"C":[
{"K":"_S_:DEFAULT"},
{"K":"_S_:NONE"},
{"K":"_S_:EXCLUSIVE"},
{"K":"_S_:SHARED"}
]}
]}
]}
]
}
{
"ID":13000,
"NAME":"drop index",
"OPT":true,
"HEAD":true,
"C":[
{"K":"_S_:DROP"},
{"K":"_S_:INDEX"},
{"OPT":true,"C":[
{"K":"_S_:ONINE"},
{"K":"_S_:OFFLINE"}
]},
{"K":"_N_","F":"dropIndexName"},
{"K":"_S_:ON"},
{"OR":true,"C":[
{"COMMENT":"dbName.tableName",
"C":[
{"K":"_N_","F":"dropIndexOnDataBaseName"},
{"K":"_C_:."},
{"K":"_N_","F":"dropIndexOnTableName"}
]},
{"K":"_N_","COMMENT":"tableName","F":"dropIndexOnTableName"}
]},
{"OR":true,"OPT":true,"C":[
{"C":[
{"K":"_S_:ALGORITHM"},
{"OPT":true,"K":"_C_:="},
{"OR":true,"C":[
{"K":"_S_:DEFAULT"},
{"K":"_S_:INPLACE"},
{"K":"_S_:COPY"}
]}
]},
{"C":[
{"K":"_S_:LOCK"},
{"OPT":true,"K":"_C_:="},
{"OR":true,"C":[
{"K":"_S_:DEFAULT"},
{"K":"_S_:NONE"},
{"K":"_S_:EXCLUSIVE"},
{"K":"_S_:SHARED"}
]}
]}
]}
]
}
{
"ID":14000,
"NAME":"DROP TABLE",
"OPT":true,
"HEAD":true,
"C":[
{"K":"_S_:DROP"},
{"OPT":true,"K":"_S_:TEMPORARY"},
{"K":"_S_:TABLE","F":"dropTable"},
{"OPT":true,"K":"_S_:IF EXISTS"},
{"LOOP":true,"C":[
{"OR":true,"C":[
{"COMMENT":"dbName.tableName",
"C":[
{"K":"_N_","F":"dropTableDatabaseName"},
{"K":"_C_:.","F":"dropTableTableName"},
{"K":"_N_"}
]},
{"K":"_N_","COMMENT":"tableName","F":"dropTableTableName"}
]},
{"OPT":true,"K":"_C_:,"}
]},
{"OPT":true,"OR":true,"C":[
{"K":"_S_:RESTRICT"},
{"K":"_S_:CASCADE"}
]}
]
}
{
"ID":15000,
"NAME":"RENAME TABLE",
"OPT":true,
"HEAD":true,
"C":[
{"K":"_S_:RENAME"},
{"K":"_S_:TABLE"},
{"LOOP":true,"C":[
{"OR":true,"C":[
{"COMMENT":"dbName.tableName",
"C":[
{"K":"_N_","F":"renameTableDatabaseName"},
{"K":"_C_:."},
{"K":"_N_","F":"renameTableTableName"}
]},
{"K":"_N_","COMMENT":"tableName","F":"renameTableTableName"}
]},
{"K":"_S_:TO","F":"renameNewTable"},
{"OR":true,"C":[
{"COMMENT":"dbName.tableName",
"C":[
{"K":"_N_","F":"renameTableToDatabaseName"},
{"K":"_C_:."},
{"K":"_N_","F":"renameTableToTableName"}
]},
{"K":"_N_","COMMENT":"tableName","F":"renameTableToTableName"}
]},
{"OPT":true,"K":"_C_:,"}
]}
]
}
{
"ID":30000,
"name":"create database",
"HEAD":true,
"C":[
{"K":"_S_:CREATE"},
{"OR":true,"C":[
{"K":"_S_:DATABASE"},
{"K":"_S_:SCHEMA"}
]},
{"OPT":true,"K":"_S_:IF NOT EXISTS"},
{"K":"_N_","F":"createDatabase"},
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:DEFAULT"},
{"K":"_S_:CHARACTER"},
{"K":"_S_:SET"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_","F":"databaseCharset"}
]},
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:DEFAULT"},
{"K":"_S_:COLLATE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]}
]
}
{
"ID":31000,
"name":"drop database",
"HEAD":true,
"C":[
{"K":"_S_:DROP"},
{"OR":true,"C":[
{"K":"_S_:DATABASE"},
{"K":"_S_:SCHEMA"}
]},
{"OPT":true,"K":"_S_:IF EXISTS"},
{"K":"_N_","F":"dropDatabase"}
]
}
{
"ID":32000,
"name":"alter database",
"HEAD":true,
"C":[
{"K":"_S_:ALTER"},
{"OR":true,"C":[
{"K":"_S_:DATABASE"},
{"K":"_S_:SCHEMA"}
]},
{"K":"_N_","F":"alterDatabase"},
{"OPT":true,"C":[
{"C":[
{"K":"_S_:UPGRADE DATA DIRECTORY"},
{"K":"_AS_"}
]},
{"C":[
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:DEFAULT"},
{"K":"_S_:CHARACTER"},
{"K":"_S_:SET"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_","F":"databaseCharset"}
]},
{"OPT":true,"C":[
{"OPT":true,"K":"_S_:DEFAULT"},
{"K":"_S_:COLLATE"},
{"OPT":true,"K":"_C_:="},
{"K":"_AS_"}
]}
]}
]}
]
}
{
"ID":23000,
"name":"use database",
"HEAD":true,
"C":[
{"K":"_S_:USE"},
{"K":"_N_","F":"useDatabase"}
]
}
{
"ID":240001,
"name":"select column",
"OR":true,
"C":[
{"K":"_S_:*"},
{"C":[
{"K":"_S_:count"},
{"K":"_S_:("},
{"K":"_AS_"},
{"K":"_S_:)"}
]},
{"C":[
{"K":"_S_:sum"},
{"K":"_S_:("},
{"K":"_AS_"},
{"K":"_S_:)"}
]},
{"K":"_AS_"}
]
}
{
"ID":24000,
"name":"select"
"HEAD":true,
"C":[
{"K":"_S_:SELECT"},
{"OPT":true,"C":[
{"K":"_S_:STREAM"},
{"OPT":true,"C":[
{"K":"_S_:START"},
{"K":"_S_:FROM"},
{"OR":true,"C":[
{"C":[
{"KEY":"_S_:TIMESTAMP"},
{"K":"_NUM_"}
]},
{"C":[
{"KEY":"_S_:OFFSET"},
{"K":"_NUM_"}
]},
{"C":[
{"KEY":"_S_:ID"},
{"K":"_NUM_"}
]}
]}
]},
{"OPT":true,"C":[
{"K":"_S_:WINDOW"},
{"K":"_S_:SIZE"},
{"K":"_NUM_"}
]}
]}
{"OPT":true,"K":"_S_:DISTINCT"},
{"C":[
{"LOOP":true,"C":[
{"INCLUDE":2001},
{"KEY":"_S_:,"}
]}
{"INCLUDE":2001}
]},
{"K":"_S_:FROM"},
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化