I am analysing designing an abstraction layer over a select few NoSQL and SQL databases.
Specifically:
- Redis, Neo4j, MongoDB, CouchDB
- PostgreSQL
Being inexperienced; it is hard to know a nice way of abstracting search. For conciseness in my explanation, think of Table
as being table, object, entity or key; and name
as being name or type.
Maybe res = Table.name.search()
Or on multiple Table
:
`res = AbstractDB().AbstractSearch(
)`
Then: res.paginate(limit=25, offset=5)
Or if you want all: res.all()
And additionally borrow/alias from a relevant subset of PEP249, e.g.: fetchone
and fetchmany
Will open-source this once it's of sufficient functionality. Any suggestion