You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `2022-11-27` ~~Preparing 2.5.x - reading from spreadsheets (Excel/XLS, LibreOffice/ODS, etc.)~~ Still in progress.
@@ -333,7 +338,25 @@ In case you use this in your project, then beware:
333
338
4. Consider donating to [HSQLDB "SupportWare"](http://hsqldb.org/web/supportware.html).
334
339
335
340
336
-
*Easter Egg: The original text I sent to JBoss mailing list when introducing the tool in 2011 :)*
341
+
342
+
## What didn't fit elsewhere..
343
+
344
+
#### Custom SQL functions
345
+
346
+
CsvCruncher adds a couple of SQL functions to HSQLDB.
347
+
348
+
*`jsonSubtree(path, json)` - Returns a json subtree (as JSON) at a given slash-separated path (`foo/bar`). Arrays not supported, but could be added.
349
+
350
+
*`jsonLeaf(path, json)` - Like above, but expects the node to be a scalar, and returns the raw value rather than JSON serialization of it.
351
+
352
+
*`jsonLeaves(pathToArray STRING, leavesSubpath STRING, json STRING, nullOnNonArray BOOLEAN)` - returns the leaves form an array, extracted from the given subpath (of each item in that array). Returns it serialized to JSON - due to limitations of HSQLDB. Expects the leaves to be scalar.
353
+
354
+
*~~`jsonSubtrees(pathToArray, subpath, json)`~~ - Not implemented. It would do the same as `jsonLeaves()`, except it would put the sub-nodes (rather than only scalars) to an array of subtrees. Let me know if you need it. (The reason why `jsonSubtrees()` is missing is that originally, `jsonLeaves()` was supposed to return a SQL type`ARRAY`, but that is not supported by HSQLDB.)
355
+
356
+
357
+
#### Memories
358
+
359
+
The original text I sent to JBoss mailing list when introducing the tool in 2011 :)*
0 commit comments