(schemeID string, sc *selectContext)
| 122 | } |
| 123 | |
| 124 | func (tx *CachedTransaction) getCached(schemeID string, sc *selectContext) (list []*schema.Resource, total uint64, wasCached bool, wasLocked bool, err error) { |
| 125 | key, err := tx.createKey(schemeID, sc) |
| 126 | if err != nil { |
| 127 | return nil, 0, false, false, err |
| 128 | } |
| 129 | |
| 130 | res, present := tx.QueryCache[key] |
| 131 | if present { |
| 132 | return res.list, res.total, true, res.isLocked, nil |
| 133 | } else { |
| 134 | return nil, 0, false, false, nil |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | func (tx *CachedTransaction) saveCache(schemeID string, sc *selectContext, list []*schema.Resource, total uint64, wasLocked bool, errList error) error { |
| 139 | if errList != nil { |
no test coverage detected