taobig
c92400ead2
fix 当表有唯一键时,update()的形参和实参不一致 ( #2010 )
2 years ago
虫子樱桃
76086fc717
fix:typo in readme.md ( #2061 )
...
Co-authored-by: 虫子樱桃 <czyt@w.cn>
2 years ago
anqiansong
93b3f5030f
chore: Add command desc & color commands ( #2013 )
...
* Add link & Color sub-commands
* Color sub-commands for unix-like OS
* Remove useless code
* Remove redundant dependency
2 years ago
anqiansong
b44e8f5c75
fix #1977 ( #2034 )
2 years ago
anqiansong
c27e00b45c
feat: Replace mongo package with monc & mon ( #2002 )
...
* Replace mongo package with monc & mon
* Add terminal whitespace
* format code
3 years ago
anqiansong
8be47b9c99
Fix pg subcommand level error ( #1979 )
3 years ago
Kevin Wan
289a325757
chore: refine docker for better compatible with package main ( #1944 )
...
* chore: refine docker for better compatible with package main
* chore: default to current dir on goctl docker command
3 years ago
anqiansong
58787746db
fix: Useless delete cache logic in update ( #1923 )
...
* Fix bug: useless delete cache logic in update
* Format code
3 years ago
anqiansong
f486685e99
Fix code generation ( #1897 )
3 years ago
anqiansong
5383e29ce6
feat: Replace cli to cobra ( #1855 )
...
* Replace cli
* Replace cli
* Replace cli
* Format code
* Add compare case
* Add compare case
* Add compare case
* Support go style flag
* Support go style flag
* Add test case
3 years ago
anqiansong
cc09ab2aba
feat: Support model code generation for multi tables ( #1836 )
...
* Support model code generation for multi tables
* Format code
* Format code
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan
5bcee4cf7c
fix #1806 ( #1833 )
...
* fix #1806
* chore: refine error text
3 years ago
anqiansong
16c61c6657
chore: Embed unit test data ( #1812 )
...
* Embed unit test data
* Add testdata
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Fyn
036d803fbb
docs(goctl): goctl 1.3.4 migration note ( #1780 )
...
* docs(goctl): goctl 1.3.4 migration note
* adds a simple lang check
* adds migration notes
* chore: remove i18n
* chore: remove todo
3 years ago
方航
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
Kevin Wan
415c4c91fc
fix: model unique keys generated differently in each re-generation ( #1771 )
3 years ago
anqiansong
8dd764679c
Fix #1765 ( #1767 )
...
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan
faad6e27e3
feat: use go:embed to embed templates ( #1756 )
3 years ago
Kevin Wan
dfd58c213c
fix: model generation bug on with cache ( #1743 )
...
* fix: model generation bug on with cache
* chore: refine template
* chore: fix test failure
3 years ago
Kevin Wan
6dccfa29fd
feat: let model customizable ( #1738 )
3 years ago
Fyn
f4471846ff
feat(goctl): supports model code 'DO NOT EDIT' ( #1728 )
...
Resolves : #1710
3 years ago
Mikael
d8054d8def
fix -cache=true insert no clean cache ( #1672 )
...
* fix -cache=true insert no clean cache
* fix -cache=true insert no clean cache
3 years ago
Fyn
17e0afeac0
fix(goctl): model method FindOneCtx should be FindOne ( #1656 )
3 years ago
xybingbing
09e6d94f9e
FindOneBy 漏 Context ( #1642 )
3 years ago
anqiansong
68a81fea8a
Fix #1609 ( #1617 )
3 years ago
Kevin Wan
f15a4f9188
chore: update go-zero to v1.3.1 in goctl ( #1599 )
3 years ago
Kevin Wan
e31128650e
Revert " 🐞 fix(gen): pg gen of insert ( #1591 )" ( #1598 )
...
This reverts commit cc4c4928e0
.
3 years ago
toutou_o
cc4c4928e0
🐞 fix(gen): pg gen of insert ( #1591 )
...
Co-authored-by: kurimi1 <d0n41df@gmail.com>
3 years ago
Kevin Wan
e0454138e0
update goctl to go 1.16 for io/fs usage ( #1571 )
...
* update goctl to go 1.16 for io/fs usage
* feat: support pg serial type for auto_increment (#1563 )
* add correct example for pg's url
* 🐞 fix: merge
* 🐞 fix: pg default port
* ✨ feat: support serial type
Co-authored-by: kurimi1 <d0n41df@gmail.com>
* chore: format code
Co-authored-by: toutou_o <33993460+kurimi1@users.noreply.github.com>
Co-authored-by: kurimi1 <d0n41df@gmail.com>
3 years ago
toutou_o
3b07ed1b97
feat: support pg serial type for auto_increment ( #1563 )
...
* add correct example for pg's url
* 🐞 fix: merge
* 🐞 fix: pg default port
* ✨ feat: support serial type
Co-authored-by: kurimi1 <d0n41df@gmail.com>
3 years ago
Kevin Wan
aa29036cb3
feat: support ctx in sql model generation ( #1551 )
3 years ago
Kevin Wan
a40254156f
refactor: refactor yaml unmarshaler ( #1517 )
3 years ago
Kevin Wan
50174960e4
chore: update command comment ( #1501 )
3 years ago
Kevin Wan
ec299085f5
docs: update tal-tech to zeromico in docs ( #1498 )
3 years ago
Kevin Wan
4b7a680ac5
refactor: rename from tal-tech to zeromicro for goctl ( #1481 )
3 years ago
anqiansong
e57fa8ff53
Fix/issue#1447 ( #1458 )
...
* Add data for template to render
* fix #1447
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
anqiansong
9b592b3dee
Feature rpc protoc ( #1251 )
...
* code generation by protoc
* generate pb by protoc direct
* support: grpc code generation by protoc directly
* format code
* check --go_out & --go-grpc_out
* fix typo
* Update version
* fix typo
* optimize: remove deprecated unit test
* format code
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
spectatorMrZ
240132e7c7
Fix pg model generation without tag ( #1407 )
...
1. fix pg model struct haven't tag
2. add pg command test from datasource
3 years ago
Kevin Wan
a91c3907a8
feat: rename module from tal-tech to zeromicro ( #1413 )
3 years ago
Kevin Wan
e267d94ee1
chore: update go-zero to v1.2.5 ( #1410 )
3 years ago
anqiansong
89ce5e492b
refactor file|path ( #1409 )
...
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
Kevin Wan
d6ff30a570
chore: fix golint issues ( #1396 )
3 years ago
anqiansong
b8ea16a88e
feat: Add --remote ( #1387 )
...
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
anqiansong
49bab23c54
fix #1376 ( #1380 )
...
* fix #1376
* fix #1376
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
行者
f5f2097d14
Updated MySQL生成表结构体遇到关键字db部分保持原字段名定义 ( #1369 )
3 years ago
Kevin Wan
1becaeb7be
chore: refactor ( #1331 )
3 years ago
yangkequn
171afaadb9
Update types.go ( #1314 )
3 years ago
anqiansong
b0573af9a9
Update template ( #1243 )
3 years ago
anqiansong
69a4d213a3
Fix issue 1205 ( #1211 )
...
* fix #1205
* move builder into stores
* remove xrom
* Remove unused code
* Remove unused code
* refactor builderx to builder
Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
anqiansong
9c48e9ceab
Feature add template version ( #1152 )
3 years ago