Skip to content

Commit 197b808

Browse files
committed
opt code
1 parent 9e0170d commit 197b808

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

js/content_script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ setInterval(() => {
212212
console.log(data);
213213
// }
214214
});
215-
}, 5000);
215+
}, 2000);
216216
}
217217
if(nowHost === 'www.baidu.com'){
218218
setTimeout(() => {

src/utils/go/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ func (*${dbNameStr}Model) TableName() string {
101101

102102
// 解析sql表明等基础信息
103103
function sqlStrToGoTemplate(str) {
104-
// CREATE TABLE `(.*)`\s\(([\d\D]*)\)\sENGINE=(.*)\sAUTO_INCREMENT=(\d+)\s(\w+)\sCHARSET=(\w+)\s(COLLATE=\w+)*
105-
const regex = /CREATE TABLE `(.*)`\s\(([\d\D]*)\)\sENGINE=(.*)\s(AUTO_INCREMENT=(.*)\s)*(\w+)\sCHARSET=(\w+)\s(COLLATE=\w+)*/gm;
104+
// CREATE TABLE `(.*)`\s\(\s((.*\s)*)\)\s(.*)COMMENT='(.*)'
105+
const regex = /CREATE TABLE `(.*)`\s\(\s((.*\s)*)\)\s(.*)COMMENT='(.*)'/gm;
106106
// `(.*)`\s(\w+[\((\d+)\)]*[\sunsigned\s]*)([NOT\s[NULL\s]*]*)(DEFAULT\s([\'](.*?)[\']|NULL)\s)*(AUTO_INCREMENT\s)*(COMMENT\s[\'](.*)[\'])*
107107
// const columnRegex = /`(.*)`\s(\w+[\((\d+)\)]*[\sunsigned\s]*)([NOT\s[NULL\s]*]*)(DEFAULT\s([\'](.*?)[\']|NULL)\s)*(AUTO_INCREMENT\s)*(COMMENT\s[\'](.*)[\'])*/gm;
108108
let m;

0 commit comments

Comments
 (0)