ilibs / gosql

🐥The very simple ORM library for Golang
MIT License
295 stars 39 forks source link

can where method support In query? #22

Closed Leihb closed 4 years ago

Leihb commented 4 years ago

I love this library so much, it's simple yet powerful. It could even be better if it support "in query" in where method.

for example:

users := make([]*User, 0)
gosql.Model(&user).Where("id in (?)", []int{1, 2, 3}).All()
fifsky commented 4 years ago

@Leihb Yes, This is Support

See https://github.com/ilibs/gosql/blob/master/model_test.go#L267

Leihb commented 4 years ago

@fifsky thank you, that is great.