You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/model/sql/gen
方航 fabea4c448
fix bug: crash when generate model with goctl. (#1777)
* fix bug: crash when generate model with goctl.

situation: column name with line.

CREATE TABLE test (
id int NOT NULL AUTO_INCREMENT,
zh-cn text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '中文简体',
PRIMARY KEY (id) USING BTREE,
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

* group imports

group imports

* Use

go-zero/tools/goctl/util/string.go
 func SafeString(in string) string {
instead of ReplaceAll

Co-authored-by: 方航 <fanghang@tange.ai>
3 years ago
..
delete.go fix: model unique keys generated differently in each re-generation (#1771) 3 years ago
field.go fix bug: crash when generate model with goctl. (#1777) 3 years ago
findone.go Fix #1765 (#1767) 3 years ago
findonebyfield.go fix: model unique keys generated differently in each re-generation (#1771) 3 years ago
gen.go fix: model generation bug on with cache (#1743) 3 years ago
gen_test.go fix: model generation bug on with cache (#1743) 3 years ago
imports.go feat: let model customizable (#1738) 3 years ago
insert.go fix bug: crash when generate model with goctl. (#1777) 3 years ago
keys.go Fix #1765 (#1767) 3 years ago
keys_test.go refactor: rename from tal-tech to zeromicro for goctl (#1481) 3 years ago
new.go refactor: rename from tal-tech to zeromicro for goctl (#1481) 3 years ago
tablename.go feat: let model customizable (#1738) 3 years ago
tag.go refactor: rename from tal-tech to zeromicro for goctl (#1481) 3 years ago
template.go feat: let model customizable (#1738) 3 years ago
template_test.go refactor: rename from tal-tech to zeromicro for goctl (#1481) 3 years ago
types.go feat(goctl): supports model code 'DO NOT EDIT' (#1728) 3 years ago
update.go fix bug: crash when generate model with goctl. (#1777) 3 years ago
vars.go refactor: rename from tal-tech to zeromicro for goctl (#1481) 3 years ago