(ctx context.Context, sc *selectContext, sql string, args []interface{})
| 904 | } |
| 905 | |
| 906 | func (tx *Transaction) executeSelect(ctx context.Context, sc *selectContext, sql string, args []interface{}) (list []*schema.Resource, total uint64, err error) { |
| 907 | tx.logQuery(sql, args...) |
| 908 | rows, err := tx.transaction.QueryxContext(ctx, sql, args...) |
| 909 | if err != nil { |
| 910 | return |
| 911 | } |
| 912 | defer rows.Close() |
| 913 | |
| 914 | list, err = tx.decodeRows(sc.schema, rows, list, sc.fields != nil, sc.join) |
| 915 | if err != nil { |
| 916 | return nil, 0, err |
| 917 | } |
| 918 | total, err = tx.CountContext(ctx, sc.schema, sc.filter) |
| 919 | return |
| 920 | } |
| 921 | |
| 922 | func (tx *Transaction) List(s *schema.Schema, filter transaction.Filter, options *transaction.ViewOptions, pg *pagination.Paginator) (list []*schema.Resource, total uint64, err error) { |
| 923 | return tx.ListContext(context.Background(), s, filter, options, pg) |
no test coverage detected