gendry icon indicating copy to clipboard operation
gendry copied to clipboard

a golang library for sql builder

Results 17 gendry issues
Sort by recently updated
recently updated
newest added

errmsg[Error 5007: prepare handle error] dnslookup[0] reuse[0] sql[/* {"log_id":"3230830605","xdb_comment":"1"} */ SELECT * FROM file_meta WHERE (isdelete=? AND server_filename=? AND user_id=?) LIMIT ?,?] sql_args[[0,"relay_expect",122050,0,100]]

https://github.com/didi/gendry/blob/master/scanner/scanner.go#L94 如果scan不到数据,并且入参是slice,为什么返回错误码返回nil而不是返回ErrEmptyResult呢

![image](https://github.com/didi/gendry/assets/42087738/accb0bf1-4353-42d0-b434-62a110c76911) ![image](https://github.com/didi/gendry/assets/42087738/e26f6c05-403a-4170-a706-3aaf1c7819c1) ![image](https://github.com/didi/gendry/assets/42087738/af4ff116-67f5-4b7a-8cb4-0c6fe4ce6f72) 在 scan 时 将 JobDetail 传入时,解析不出来,传入 JobDetail.Job 时可以解析

map with key `foo>` instead of `foo >` got `field="foo>"` `operator="="`, then where condition is `foo>=`. ```golang builder.BuildSelect(map[string]interface{}{ "foo>": "bar" }) ``` got ```sql SELECT * FROM tb WHERE (foo>=?)"...

`scanner.Map`方法通过反射获取key name,开销较大,这里通过缓存结构体的key name解析结果来提升性能。 具体表现如下,通过使用缓存可以将`scanner.Map`接口的吞吐提升1-2倍。 ``` $ go test -run=BenchmarkMap -bench=BenchmarkMap -cpu=1,2,4,8 -benchtime=20000000x -benchmem goos: darwin goarch: amd64 pkg: github.com/didi/gendry/scanner cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz BenchmarkMapWithCache 20000000 265.4 ns/op...

例如: select * from user1 limit 1 UNION ALL select * from user2 limit 1 UNION ALL select * from user3 limit 1;

"[scanner]: empty result" 没扫描出结果怎么也报错?没查出数据不是算正常么