Recently open sourced gosql, a golang style Grammatical golang orm library.
Elegant syntax, supports batch insertion, easily nested conditions, handles various complex query SQL, such as: and and or combination
Full syntax support: for update lock, is null, exists subquery, etc. Basically all sql syntax
The style is as follows:
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"), )
Copy after login
Features
- Golang-style SQL builder go language style sql generation
- Unlimited nesting query Unlimited nesting of query conditions
- Reading and Writing Separation
- Delay connection creation Delayed connection creation
- ORM mapping to sturct ORM mapping structure Body
- Transactions Support
- Versatile Multifunctional
- Clean Code Simple code
- Bulk Insert Support batch insertion
Warehouse address:
https://github.com/rushteam/gosql