Mervin.Wong
93d524b797
fix: the new RawFieldNames considers the tag with options. ( #1663 )
...
Co-authored-by: JinfaWang <wangjinfa@iie.ac.cn>
2022-03-20 16:59:19 +08:00
mlr3000
32c88b6352
feat: support oracle :N dynamic parameters ( #1552 )
...
* chore:use struct pointer
* feat: support oracle :N dynamic parameters
* Update utils.go
* Update utils.go
* Update utils.go
pg argIndex will not always go up
* Update utils_test.go
* Keep the original
* Update utils_test.go
2022-03-12 18:49:07 +08:00
Kevin Wan
b939ce75ba
chore: refactor code ( #1613 )
2022-03-04 17:55:13 +08:00
Javen
60760b52ab
model中db标签增加'-'符号以支持数据库查询时忽略对应字段. ( #1612 )
2022-03-04 17:00:46 +08:00
Kevin Wan
900bc96420
test: add more tests ( #1604 )
2022-03-02 21:19:04 +08:00
Kevin Wan
607bae27fa
feat: support ctx in sqlx/sqlc, listed in ROADMAP ( #1535 )
...
* feat: support ctx in sqlx/sqlc
* chore: update roadmap
* fix: context.Canceled should be acceptable
* use %w to wrap errors
* chore: remove unused vars
2022-02-16 19:31:43 +08:00
Kevin Wan
9e113909b3
ignore context.Canceled for redis breaker ( #1545 )
2022-02-15 21:31:30 +08:00
Kevin Wan
2732d3cdae
chore: refactor cache ( #1532 )
2022-02-13 18:04:31 +08:00
chenquan
e8c307e4dc
feat: support ctx in Cache
( #1518 )
...
* feature: support ctx in `Cache`
Signed-off-by: chenquan <chenquan.dev@foxmail.com>
* fix: `errors.Is` instead of `=`
Signed-off-by: chenquan <chenquan.dev@foxmail.com>
2022-02-13 17:28:14 +08:00
Kevin Wan
a40254156f
refactor: refactor yaml unmarshaler ( #1517 )
2022-02-09 17:22:52 +08:00
Kevin Wan
822ee2e1c5
feat: update go-redis to v8, support ctx in redis methods ( #1507 )
...
* feat: update go-redis to v8, support ctx in redis methods
* fix compile errors
* chore: remove unused const
* chore: add tracing log on redis
2022-02-09 11:06:06 +08:00
Kevin Wan
0fdd8f54eb
ci: add test for win ( #1503 )
...
* ci: add test for win
* ci: update check names
* ci: use go build instead of go test to verify win test
* fix: windows test failure
* chore: disable logs in tests
2022-02-05 00:06:23 +08:00
shenbaise9527
13db7a1931
feat: 支持redis的LTrim方法 ( #1443 )
2022-01-16 10:27:34 +08:00
Kevin Wan
eb4b86137a
fix: golint issue ( #1423 )
2022-01-08 16:06:56 +08:00
Kevin Wan
a91c3907a8
feat: rename module from tal-tech to zeromicro ( #1413 )
2022-01-04 15:51:32 +08:00
Kevin Wan
8745ed9c61
chore: add 1s for tolerance in redislock ( #1367 )
2021-12-25 19:44:27 +08:00
种豆得豆
836726e710
fix redis try-lock bug ( #1366 )
...
#issue_id: 1338
Co-authored-by: zhangwei <>
2021-12-25 19:20:53 +08:00
Kevin Wan
d1c2a31af7
chore: add tests & refactor ( #1346 )
...
* chore: add tests & refactor
* chore: refactor
2021-12-18 23:11:38 +08:00
MarkJoyMa
3e6c217408
Feature: support adding custom cache to mongoc and sqlc ( #1313 )
...
* merge
* Feature: support adding custom cache to mongoc and sqlc
2021-12-18 22:45:07 +08:00
Kevin Wan
b299f350be
chore: add comments ( #1345 )
2021-12-18 22:39:14 +08:00
Kevin Wan
776e6e647d
feat: tidy mod, add go.mod for goctl ( #1328 )
2021-12-15 19:44:49 +08:00
Kevin Wan
4ccdf4ec72
chore: format code ( #1327 )
2021-12-15 13:43:05 +08:00
CrazyZard
a7bd993c0c
commit missing method for redis ( #1325 )
...
* commit `decr ` `decrby` `lindex` missing method for redis
* fix(store_test):TestRedis_DecrBy
* add unit tests for redis commands. And put the functions in alphabetical order
* put the functions in alphabetical order
* add `lindex` unit test
* sort func
2021-12-15 13:15:39 +08:00
Kevin Wan
4f5c30e083
chore: remove unused const ( #1224 )
2021-11-10 21:45:42 +08:00
an
3a510a9138
chore: redislock use stringx.randn replace randomStr func ( #1220 )
2021-11-10 21:14:21 +08:00
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>
2021-11-07 22:44:37 +08:00
Kevin Wan
e8efcef108
update dependencies. ( #1210 )
...
* chore: update dependencies
* chore: update dependencies
* chore: update dependencies
* chore: update dependencies
* chore: fix test failure
2021-11-07 16:38:20 +08:00
yedf2
6aba5f74fc
feat: add NewSessionFromTx to interact with other orm ( #1202 )
...
Co-authored-by: yedongfu <dongfuye@163.com>
2021-11-03 20:56:02 +08:00
Kevin Wan
785d100be9
feat: slow threshold customizable in sqlx ( #1188 )
2021-11-01 08:37:44 +08:00
Kevin Wan
f13e6f1149
feat: slow threshold customizable in redis ( #1187 )
2021-11-01 08:20:35 +08:00
Kevin Wan
8be0f77d96
feat: slow threshold customizable in mongo ( #1186 )
2021-11-01 07:12:53 +08:00
Kevin Wan
429f85a9de
feat: slow threshold customizable in redis ( #1185 )
...
* feat: slow threshold customizable in redis
* chore: improve config robustness
2021-10-31 22:14:20 +08:00
Kevin Wan
e43357164c
chore: replace redis.NewRedis with redis.New ( #1103 )
2021-09-29 23:01:10 +08:00
Kevin Wan
cd21c9fa74
chore: mark redis.NewRedis as Deprecated, use redis.New instead. ( #1100 )
...
* chore: mark redis.NewRedis as Deprecated
* chore: mark redis.NewRedis as Deprecated
2021-09-29 22:07:05 +08:00
Kevin Wan
8403ed16ae
ci: add Lint check on commits ( #1086 )
...
* ci: add Lint check on commits
* ci: fix Lint script error
* test: fix go vet errors
* test: fix go vet errors, remove gofumpt to check go vet
* test: fix go vet errors, try gofumpt
* test: fix go vet errors, try gofumpt, round 1
* test: fix go vet errors, try gofumpt, round 2
* ci: fix Lint errors
2021-09-23 19:57:05 +08:00
Kevin Wan
24fd34413f
fix golint issues ( #1027 )
2021-09-12 16:15:42 +08:00
Kevin Wan
0b6bc69afa
reorg imports, format code ( #1024 )
2021-09-11 21:28:47 +08:00
Kevin Wan
5cc9eb0de4
rename sharedcalls to singleflight ( #1017 )
2021-09-09 18:06:27 +08:00
Kevin Wan
f070d447ef
refactor for better error reporting on sql error ( #1016 )
...
* refactor for better error reporting on sql error
* fix errors
* add docs
2021-09-09 15:43:33 +08:00
Kevin Wan
f6d9e19ecb
expose sql.DB to let orm operate on it ( #1015 )
...
* expose sql.DB to let orm operate on it
* add missing RawDB methods
* add NewSqlConnFromDB for cooperate with dtm
2021-09-09 11:40:28 +08:00
Kevin Wan
bf3ce16823
fix #820 ( #934 )
2021-08-19 22:48:21 +08:00
lucaq
e77747cff8
redis.go,type StringCmd = red.StringCmd ( #790 )
...
* Add Sinter,Sinterstore; Modify TestRedis_Set
* type StringCmd
* redis.go,type StringCmd = red.StringCmd
Co-authored-by: lucq <lucq@toopsoon.com>
2021-08-16 09:52:16 +08:00
Kevin Wan
5b22823018
fix bug that empty query in transaction ( #801 )
2021-06-29 23:18:32 +08:00
lucaq
c9a2a60e28
Add Sinter,Sinterstore & Modify TestRedis_Set ( #779 )
...
* Add Sinter,Sinterstore; Modify TestRedis_Set
* Update redis_test.go
fix test failure
Co-authored-by: lucq <lucq@toopsoon.com>
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2021-06-23 10:46:16 +08:00
Kevin Wan
aaa3623404
optimize nested conditional ( #709 )
2021-05-22 23:18:38 +08:00
Kevin Wan
aaa39e17a3
print entire sql statements in logx if necessary ( #704 )
2021-05-20 16:14:44 +08:00
Bo-Yi Wu
73906f996d
chore(format): change by gofumpt tool ( #697 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-05-18 14:43:09 +08:00
Kevin Wan
9adc7d4cb9
fix comment function names ( #649 )
2021-04-23 11:56:41 +08:00
Bo-Yi Wu
afd9ff889e
chore: update code format. ( #628 )
2021-04-15 19:49:17 +08:00
Kevin Wan
ee630b8b57
add code coverage ( #615 )
...
* add code coverage
* simplify redis code
2021-04-09 22:40:43 +08:00