全语法支持: for update锁,is null, exists 子查询等基本上所有sql语法
user := &UserModel{} err := db.Fetch(user, gosql.Columns("id","name"), gosql.Where("id", 1), gosql.Where("[like]name", "j%") gosql.OrWhere(func(s *Clause) { s.Where("[>=]score", "90") s.Where("[<=]age", "100") }), GroupBy("type"), OrderBy("score DESC"), )
https://github.com/rushteam/gosql
以上就是分享一款golang style语法的golang orm库的详细内容,更多请关注其它相关文章!