Closed cboettig closed 4 years ago
:+1:
This is done in #9. Rather than define object classes though, I've merely allowed local registries to defined by local paths and remote registries by urls. So you can pass a collection of an arbitrary number/mix of registries to query()
and other functions just as registry = c("/path/to/local1", /path/to/local/2")
etc (though I'm not sure why you'd maintain two local registries on the same machine). The only remote registry that actually has methods associated with it is https://hash-archive.org
, but presumably it would be straight forward to extend this. in any event, I think this provides the cleaner semantics.
I'm on the fence as to whether this should really be part of the package API in the first place.
Our Registry interface,
register()
andquery()
, support the ability to work across multiple registries at once, i.e.with
remote
being hash-archive.org andlocal
being the local database. Technically one could have multiple local registries, and perhaps other remote registries as well. But then it's not clear what the syntax should be for this.One might imagine that you call a generic constructor function
registry("hash-archive")
orregistry(dir = "/some/local/path")
and then pass those as a list (like a list of connections in the DBI interface) to these functions.