-
if session.statement.LimitN > 0 {
orderSQL += fmt.Sprintf(" LIMIT %d", session.statement.LimitN)
}
这里 select * from xxx limit 0 原本是查询0个。但是通过xorm去limit相当于没有限制。
-
here is the code that return it
```golang
var off = offer.Offer{
CustomID: 20190809,
Addon: "a",
Contact: conta,
Date: time.Now(),
RealDate: time.Now(),
Planin…
-
对github.com/lunny/godbc进行了测试,发现对datetime,datetime2兼容的不是很好(进行插入操作会丢失纳秒值),这主要还是因为godbc不兼容datetime,datetime2;
于是我又拿了github.com/denisenkom/go-mssqldb这个mssql库(本身很好的支持了date, datetime, datetime2, datetimeof…
-
Hi !
In our apps, we have scalability problems, we actually used PostgreSQL Databases.
Cockroach DB seems a technology that can solve our problems :
- distributed SQL
- support data locality (mu…
-
MySQL:
![default](https://user-images.githubusercontent.com/6816901/51586633-f913a080-1f18-11e9-9c10-b004bf0b9e83.png)
MariaDB:
![default](https://user-images.githubusercontent.com/6816901/515866…
-
https://github.com/enocom/gopher-reading-list (Gopher学习资源总结, 👍 💯💯)
https://segmentfault.com/u/qyuhen(go性能优化10讲)
--------
https://wuyin.io/2018/03/07/50-shades-of-golang-traps-gotchas-mistake…
-
复现
type A struct {
Id int64 `xorm:"pk autoincr"`
Test uint64
}
生成表以后
DBTool.DBEngine().Exec("REPLACE INTO a (`test`) VALUES"+
"(?)", uint64(18446744073709551615))
执行会报错
Erro…
-
I am using this library to generate queries for Oracle (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production) and it generates table and column names with square brackets aroun…
-
### 关于框架的建议
1. 项目扩展问题
- 不要采用你觉得你提供的组件很合适,而是抽离出基本框架。参考gorm和xorm。提供插件支持。
> 框架应该可以类似gorm一样提供结接口,可以用于实现接口增加插件。比如 web框架。我可以用gin 可以用echo等配置文件。配置文件。如果是单体应用可能采用yaml加载的方式,如果是docker-compose 可能是环境变量也可…
-
I am getting this error:
panic: open templates: no such file or directory