-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Our backends and our clients are all doing more-or-less the same stuff ... we should abstract those behaviors to a trait or traits.
Initial thoughts (could change, all async):
SearchClient:searchis only required method,item,items, etc all default to usingsearchCollectionSearchClient: same thing but for collectionsTransactionClient:add/create/upsertitems and collections (do we need to separate into aCollectionTransactionClient?)ArrowSearchClient:search_to_arrowiterates over record batches, and provides a default impl ofsearchthat does a conversion (like the DuckDB client does now)
We'll want to update several places to use these traits:
- https://github.com/stac-utils/rustac/tree/main/crates/server/src/backend
- https://github.com/stac-utils/rustac/blob/main/crates/api/src/client.rs
- https://github.com/stac-utils/rustac/blob/main/crates/duckdb/src/client.rs
The traits should live in stac-api.