You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beaverdam originally handled only MongoDB as a database backend, so MongoDbDatabase.query() was designed to correspond nicely to the pymongo's .find() function. Since then, TinyDB has also been added as a possible database backend, but because its .search() function has a different structure, TinyDbJson.query() has slightly different input.
At the moment, this results in some slightly un-beautiful code where MongoDbDatabase.query() accepts either a dict, strings, or a list of strings as query_output, and TinyDbJson.query() only accepts a string or list of strings.
In practice, this isn't currently a concern, because we aren't using any of the more advanced output functions.
In future, to handle more complex queries, a unified set of inputs to MetadataSource.query() should be chosen, and then these inputs should be appropriately parsed in the subclass functions MongoDbDatabase.query() and TinyDbJson.query() (and whichever other backends will be used).
The text was updated successfully, but these errors were encountered:
Beaverdam originally handled only MongoDB as a database backend, so
MongoDbDatabase.query()
was designed to correspond nicely to thepymongo
's.find()
function. Since then, TinyDB has also been added as a possible database backend, but because its.search()
function has a different structure,TinyDbJson.query()
has slightly different input.At the moment, this results in some slightly un-beautiful code where
MongoDbDatabase.query()
accepts either a dict, strings, or a list of strings asquery_output
, andTinyDbJson.query()
only accepts a string or list of strings.In practice, this isn't currently a concern, because we aren't using any of the more advanced output functions.
In future, to handle more complex queries, a unified set of inputs to
MetadataSource.query()
should be chosen, and then these inputs should be appropriately parsed in the subclass functionsMongoDbDatabase.query()
andTinyDbJson.query()
(and whichever other backends will be used).The text was updated successfully, but these errors were encountered: