What is the difference between the DataStore and the DataStoreORM? #738
Replies: 2 comments 1 reply
-
The difference is in the API that these 2 plugins interfaces provide.
In Veramo, these plugin interfaces are both defined and implemented by the Ideas and feedback on this subject are welcome. |
Beta Was this translation helpful? Give feedback.
-
Ok, I understand what you mean. Personally I would create a DataStore
interface with the full (select/insert/update/delete single and
select/insert/update/delete mulitlple) interface and have and provide ORM
implementation. In that way you can have multiple implementations
(ORM/key-value store/document store/etc) but not the confusion of having to
configure multiple DataStores.
Op ma 8 nov. 2021 om 10:45 schreef Mircea Nistor ***@***.***>:
… The difference is in the API that these 2 plugins interfaces provide.
- DataStore provides a bare-bones API for storing credentials,
presentations and messages based on their ID. It is intentionally
minimalistic so that any key-value storage can be used to implement it.
- DataStoreORM provides a richer API that can handle more complex
queries. The downside is that it is bound to some concepts introduced by
typeorm <https://github.com/typeorm/typeorm>. Therefore, any
implementation will likely need to also depend on typeorm, effectively
limiting the types of databases that can be used to SQL-like databases and
queries.
In Veramo, these plugin interfaces are both defined and implemented by the
@veramo/data-store package and, at the time of this writing, both use
typeorm as the storage abstraction.
The idea of defining 2 plugin interfaces was that at some point we would
be able to add some storage API that does not depend on typeorm, at which
point the DataStore interface would become more expressive, eliminating
the limitations of the SQL-like ORM.
Ideas and feedback on this subject are welcome.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#738 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKLAQCOJKMFMB4WW65MIBTUK6LZXANCNFSM5HPXWZJA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
What is the exact difference between the DataStore and the DataStoreORM? Are both stores using the same date? Is DateStoreORM just an ORM wrapper around the same store?
Why is the DataStore not capable of returning multiple VerifiableCredentials? Is only has the method dataStoreGetVerifiableCredential (no plural)
Beta Was this translation helpful? Give feedback.
All reactions