Skip to content

Commit

Permalink
添加了index加速搜索
Browse files Browse the repository at this point in the history
移除了没用的 if not exists
  • Loading branch information
LemonHX committed Sep 9, 2022
1 parent 669c6f8 commit 5251928
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 30 deletions.
27 changes: 14 additions & 13 deletions chaizi/ids.csv
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ zi,chaizi
么,⿱丿厶
义,⿶乂丶
乊,⿱丿丷
之,⿱丶
乌,⿱丿⿹
之,⿱丶㇇乀
乌,⿱丿⿹𠃌㇉
乍,⿱𠂉⿰丨二
乎,⿱丿⿻亅䒑
乏,⿱丿之
Expand Down Expand Up @@ -1350,7 +1350,7 @@ zi,chaizi
华,⿱化十
协,⿰十办
卐,一丨一
卑,⿱⿻
卑,⿱⿻𰀪日十
卒,⿱𠅃十
卓,⿱⺊早
協,⿰十劦
Expand Down Expand Up @@ -1947,7 +1947,7 @@ zi,chaizi
喣,⿱呴灬
喤,⿰口皇
喥,⿰口度
喦,⿱口⿻
喦,⿱品山
喧,⿰口宣
喨,⿰口亮
喩,⿰口俞
Expand Down Expand Up @@ -2992,7 +2992,7 @@ zi,chaizi
妸,⿰女可
妹,⿰女未
妺,⿰女末
妻,⿱⿻
妻,十⺕女
妼,⿰女必
妽,⿰女申
妾,⿱立女
Expand Down Expand Up @@ -6382,7 +6382,7 @@ zi,chaizi
曶,⿱勿日
曷,⿱日匃
書,⿱聿日
曹,⿱⿻
曹,艹日日
曺,⿱𤰔日
曻,⿱日舛
曼,⿳日罒又
Expand Down Expand Up @@ -7616,9 +7616,9 @@ zi,chaizi
毈,⿰卵段
毉,⿱殹巫
毊,⿱殸喬
毋,丿⿻
毋,丿⿻𠃌𠃊⿻⿴一
毌,⿻𫩏一
母,⿻⿴
母,⿻⿴𠃌𠃊⺀一
毎,⿱𠂉毋
每,⿱𠂉母
毐,⿱士毋
Expand Down Expand Up @@ -10551,7 +10551,7 @@ zi,chaizi
眿,⿰目永
着,⿸羊目
睁,⿰目争
睂,⿸⿶
睂,⿱⿶𠃎仌⿰丿目
睃,⿰目夋
睄,⿰目肖
睅,⿰目旱
Expand Down Expand Up @@ -12684,7 +12684,7 @@ zi,chaizi
羔,⿱𦍌灬
羕,⿱𦍌永
羖,⿰羊殳
羗,⿱䒑⿷
羗,⿱𦍌⿺儿厶
羘,⿰月羊
羙,⿱𦍌火
羚,⿰羊令
Expand Down Expand Up @@ -16544,7 +16544,7 @@ zi,chaizi
躨,⿰𧾷夔
躩,⿰𧾷矍
躪,⿰𧾷藺
身,⿱丿⿹⿴⿻
身,⿹𨈑丿
躬,⿰身弓
躭,⿰身冘
躮,⿰身分
Expand Down Expand Up @@ -20596,7 +20596,7 @@ zi,chaizi
鹼,⿰鹵僉
鹽,⿱⿰臣⿱𠂉鹵皿
鹾,⿰卤差
鹿,⿸广⿱⿻
鹿,⿸广⿱⿻〢コ比
麀,⿸鹿匕
麁,⿱𠂊鹿
麂,⿸鹿几
Expand Down Expand Up @@ -20678,7 +20678,7 @@ zi,chaizi
黎,⿱𥝢𱥯
黏,⿰黍占
黐,⿰黍离
黑,⿱
黑,⿱里灬
黒,⿱里灬
黓,⿰黑弋
黔,⿰黑今
Expand Down Expand Up @@ -97088,3 +97088,4 @@ zi,chaizi
𠃌,𠃌
𠃍,𠃍
𠃑,𠃑
免,⿱⺈⿷⿻⿸丿乚口
42 changes: 26 additions & 16 deletions tables.sql
Original file line number Diff line number Diff line change
@@ -1,79 +1,89 @@
CREATE TABLE IF NOT EXISTS PINYIN (
CREATE TABLE PINYIN (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
SHENGMU TEXT,
YUNMU TEXT NOT NULL,
DIAO INT NOT NULL
);
CREATE INDEX PINYIN_INDEX_ZI ON PINYIN(ZI);

CREATE TABLE IF NOT EXISTS JYUTPING (
CREATE TABLE JYUTPING (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
SHENGMU TEXT,
YUNMU TEXT NOT NULL,
YUNWEI TEXT,
DIAO INT NOT NULL
);
CREATE INDEX JYUTPING_INDEX_ZI ON JYUTPING(ZI);

CREATE TABLE IF NOT EXISTS CHAIZI(
CREATE TABLE CHAIZI(
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
CHAI TEXT NOT NULL,
XU INT NOT NULL
);
CREATE INDEX CHAIZI_INDEX_ZI_XU ON CHAIZI(ZI,XU);

CREATE TABLE IF NOT EXISTS BIHUA (
CREATE TABLE BIHUA (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT UNIQUE NOT NULL,
BIHUA INT NOT NULL
);
CREATE INDEX BIHUA_INDEX_ZI_BIHUA ON BIHUA(ZI,BIHUA);

CREATE TABLE IF NOT EXISTS ZIPIN (
CREATE TABLE ZIPIN (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
PINLV TEXT NOT NULL
);
CREATE INDEX ZIPIN_INDEX_ZI_PINLV ON ZIPIN(ZI,PINLV);

CREATE TABLE IF NOT EXISTS BIANTI (
CREATE TABLE BIANTI (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
LEIXING TEXT NOT NULL,
BIANTI TEXT NOT NULL
);
CREATE INDEX BIANTI_INDEX_ZI_LEIXING ON BIANTI(ZI,LEIXING);

CREATE TABLE IF NOT EXISTS DEFINITION (
CREATE TABLE DEFINITION (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
DEFINITION TEXT NOT NULL
);
CREATE INDEX DEFINITION_INDEX_ZI ON DEFINITION(ZI);

CREATE TABLE IF NOT EXISTS KANGXI (
CREATE TABLE KANGXI (
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
JUAN TEXT NOT NULL,
BU TEXT NOT NULL,
YE TEXT NOT NULL,
YI TEXT NOT NULL
);
CREATE INDEX KANGXI_INDEX_ZI ON KANGXI(ZI);

CREATE TABLE IF NOT EXISTS CIYU (
CREATE TABLE CIYU (
ID INTEGER PRIMARY KEY NOT NULL,
CI TEXT NOT NULL,
PINYIN TEXT,
YI TEXT,
YUAN TEXT,
LI TEXT
);
CREATE INDEX CIYU_INDEX_CI ON CIYU(CI);

CREATE TABLE IF NOT EXISTS XIEHOUYU (
ID INTEGER PRIMARY KEY NOT NULL,
XIEHOUYU TEXT NOT NULL,
JIESHI TEXT NOT NULL
);

CREATE TABLE IF NOT EXISTS SHUZI(
CREATE TABLE SHUZI(
ID INTEGER PRIMARY KEY NOT NULL,
ZI TEXT NOT NULL,
LEIXING TEXT NOT NULL,
SHU INT
);
CREATE INDEX SHUZI_INDEX_ZI ON SHUZI(ZI);

CREATE TABLE XIEHOUYU (
ID INTEGER PRIMARY KEY NOT NULL,
XIEHOUYU TEXT NOT NULL,
JIESHI TEXT NOT NULL
);
2 changes: 1 addition & 1 deletion unihan/readings.csv
Original file line number Diff line number Diff line change
Expand Up @@ -37732,7 +37732,7 @@
嗯,Definition,final particle
嗯,HanyuPinlu,ń(48) ň(48) ǹ(48) ńg(48) ňg(48) ǹg(48)
嗯,HanyuPinyin,"10668.030:ńg,ń,ňg,ň,ǹg,ǹ"
嗯,Mandarin,ń
嗯,Mandarin,èn
嗯,TGHZ2013,264.050:ńg 264.060:ňg 264.070:ǹg
嗯,XHC1983,0811.010:ń 0811.020:ň 0811.030:ǹ 0826.010:ńg 0826.020:ňg 0826.030:ǹg
嗰,Cantonese,go2
Expand Down

0 comments on commit 5251928

Please sign in to comment.