Design wise, I think the proper approach is for your library to be schema-agnostic.
If what you're building is a library, schema shouldn't be defined in there.
Alternatives for me are:
- Your library delegates db actions using multimethods implemented in your application.
- Your library receives database and field mapping on some initialization function.
The second approach just maps schema fields to known library keywords such as :email and :friendui.
First approach is even datomic agnostic.