github.com/datatogether/sql_datastore
sql_datastore is an experimental implementation of the ipfs datastore interface for sql databases. It's very much a work in progress, born out of a somewhat special use case of needing to be able to store data in a number of different places, with the datastore interface as a lowest-common-denominator. The goal is not a fully-expressive sql database operated through the datastore interface, this is not possible, or even desired. Instead, this package focuses on doing the kinds of things one would want to do with a key-value datastore, requiring implementers to provide a standard set of queries and parameters to glue everything together. Whenever the datastore interface is not expressive enough, one can always fall back to standard SQL work. sql_datastore reconciles the key-value orientation of the datastore interface with the tables/relational orientation of SQL databases through the concept of a "Model". Model is a bit of an unfortunate name, as it implies this package is an ORM, which isn't a design goal. Annnnnnnnyway, the important patterns of this approach are: This implementation leads to a great deal of required boilerplate code to implement. In the future this package could be expanded to become syntax-aware, accepting a table name & schema definition for registered models. From here the sql_datastore package could construct default queries that could be overridden using the current SQLQuery & SQLParams methods. Before that happens, it's worth noting that the datastore interface may undergo changes in the near future.
proxy.golang.org
v0.0.0-20171104160958-e90e848e5f78
over 8 years ago
1
2
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/datatogether/sql_datastore
spec |
| License | AGPL-3.0 |
| Namespace | github.com/datatogether |
| First Release | over 8 years ago |
| Last Synced | 1 day ago |
Repository
| Stars | 4 on GitHub |
| Forks | 1 on GitHub |