Open linzhengen opened 4 years ago
arg := map[string]interface{}{ "published": true, "authors": []{8, 19, 32, 44}, } query, args, err := sqlx.Named("SELECT * FROM articles WHERE published=:published AND author_id IN (:authors)", arg) query, args, err := sqlx.In(query, args...)
参考URL http://jmoiron.github.io/sqlx/#namedParams
参考URL http://jmoiron.github.io/sqlx/#namedParams