Store
The store interface allows efficient storing and querying of ChainScript data.
Once links have been added to the store, other links will depend on them and reference their hash. Thus, it's important that links cannot be deleted otherwise it would invalidate a lot of other links. Updates aren't possible either for the same reason.
This is reflected in the interface exposed, that focuses only on addition and structured querying over ChainScript data.
See the Golang documentation here.
Available store implementations
We offer several implementations using different kinds of database. You can directly use them as a library or use one of our docker images.
Postgres Store
This implementation uses PostgreSQL as the underlying database.
This is the most robust implementation we currently offer. This is what we recommend if you plan on building production-ready applications that leverage ChainScript.
File Store
This implementation uses files for storing the data. You should only use it when doing some prototyping that needs data persistence.
Dummy Store
This implementation keeps the data in RAM. You should only use it when doing some prototyping.
Couch Store
This implementation uses CouchDB.
If you're interested in using it, you should probably contribute to help make it production-ready.
Rethink Store
This implementation uses RethinkDB.
If you're interested in using it, you should probably contribute to help make it production-ready.
ElasticSearch Store
This implementation uses ElasticSearch.
If you're interested in using it, you should probably contribute to help make it production-ready.