Closed lpellegr closed 8 years ago
The squidb-jackson
addon is a) somewhat experimental, and b) not a very configurable module, which are the main reasons it's not well documented and why we don't have pre-built artifacts for it -- it's honestly just not super useful in its current form. The basic idea is that it lets you declare columns of Maps or Lists, which will be serialized to JSON strings when using the model getters and setters. However, at the moment it's pretty limited in its capabilities, as it only works on Maps/Lists of primitive types and it hardcodes an object mapper configuration.
If you really want to use the addon as it stands today, you can build it from source and activate the code generation aspects pretty easily, as seen in the example on this wiki page. TestModelSpec in our test package has examples of how to declare List/Map columns, and the testListProperty() test case shows how to use it.
I will also add that as part of our effort on SquiDB 3.0, we've already completely rewritten the squidb-jackson
addon as a more generic squidb-json
project to address all the shortcomings of the current version. The new version works on arbitrary types (not just Lists/Maps) and is library-agnostic, so you can use jackson/gson/whatever, configured however you like as the serialization engine. It also includes built-in wrappers for using the SQL functions found in the json1 extension on newer versions of SQLite. When 3.0 is stable, we will absolutely be making pre-built artifacts for the new version of the addon and documenting it thoroughly, since it will be much more useful in its rewritten form.
@sbosley Thank you for the clarification.
@sbosley Since there is a squidb-json
Can we close this now?
@jaredsburrows @lpellegr we'll close this issue as soon as we've published a stable version of the artifacts and documented how to use the new extension in the wiki. Probably a week or two away, but it's close!
It would be really helpful to have pre-built artifacts for squidb-addons with instructions on how to use them. I mean, especially for
squidb-jackson-*
since others are already available:https://yahoo.bintray.com/maven/com/yahoo/squidb/