Пример #1
0
func (b *Basics) Get(a iface.Filter) ([]interface{}, *QueryInfo, error) {
	list, err := a.Find()
	if err != nil {
		return nil, nil, err
	}
	count, err := a.Count()
	if err != nil {
		return nil, nil, err
	}
	return list, &QueryInfo{
		count, a.Modifiers().Skip(),
		a.Modifiers().Limit(),
		a.Modifiers().Sort(),
	}, nil
}