List resources in the db
(ctx context.Context, s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, pg *pagination.Paginator)
| 925 | |
| 926 | //List resources in the db |
| 927 | func (tx *Transaction) ListContext(ctx context.Context, s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, pg *pagination.Paginator) (list []*schema.Resource, total uint64, err error) { |
| 928 | defer tx.measureTime(time.Now(), s.ID, "list") |
| 929 | |
| 930 | sc := listContextHelper(s, filter, options, pg) |
| 931 | |
| 932 | sql, args, err := buildSelect(sc) |
| 933 | if err != nil { |
| 934 | return nil, 0, err |
| 935 | } |
| 936 | |
| 937 | return tx.executeSelect(ctx, sc, sql, args) |
| 938 | } |
| 939 | |
| 940 | func listContextHelper(s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, pg *pagination.Paginator) *selectContext { |
| 941 | sc := &selectContext{ |
no test coverage detected