forked from TrueCloudLab/frostfs-node
[#1559] metabase: Remove public functions
Reduce public interface of this package. Later each result will contain an additional status, so it makes more sense to use the same functions and result processing everywhere. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
30c7925b3c
commit
f58234aa2f
31 changed files with 234 additions and 247 deletions
|
@ -58,20 +58,6 @@ func (r SelectRes) AddressList() []oid.Address {
|
|||
return r.addrList
|
||||
}
|
||||
|
||||
// Select selects the objects from DB with filtering.
|
||||
func Select(db *DB, cnr cid.ID, fs object.SearchFilters) ([]oid.Address, error) {
|
||||
var selectPrm SelectPrm
|
||||
selectPrm.WithFilters(fs)
|
||||
selectPrm.WithContainerID(cnr)
|
||||
|
||||
r, err := db.Select(selectPrm)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return r.AddressList(), nil
|
||||
}
|
||||
|
||||
// Select returns list of addresses of objects that match search filters.
|
||||
func (db *DB) Select(prm SelectPrm) (res SelectRes, err error) {
|
||||
if blindlyProcess(prm.filters) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue