// Query creates the query for the Post.
Query creates the query for the Post.
// Query creates the query for the Post .
func (p *_Posts) Query(db database.DB, models ...*Post) *postsQueryBuilder {
	var queryModels []mapping.Model
	if len(models) > 0 {
		queryModels = make([]mapping.Model, len(models))
		for i, model := range models {
			queryModels[i] = model
		}
	}
	builder := db.Query(p.Model, queryModels...)
	return &postsQueryBuilder{builder: builder}
}
func ( p * _Posts ) Query ( db database . DB , models ... * Post ) * postsQueryBuilder { var queryModels [ ] mapping . Model if len ( models ) > 0 { queryModels = make ( [ ] mapping . Model , len ( models ) ) for i , model := range models { queryModels [ i ] = model } } builder := db . Query ( p . Model , queryModels ... ) return & postsQueryBuilder { builder : builder } }
Query creates the query for the Post.
Query creates the query for the Post .