[
https://issues.apache.org/jira/browse/DERBY-6825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Hillegas updated DERBY-6825:
---------------------------------
Attachment: derby-6825-05-aa-toClobFunction.diff
Attaching derby-6825-05-aa-toClobFunction.diff. This patch adds a arrayToClob()
function to the simpleJson optional tool. The arrayToClob() function converts a
JSONArray into a Clob. Tests passed cleanly for me on this patch.
Touches the following files:
-----------------------
M java/optional/org/apache/derby/optional/api/SimpleJsonUtils.java
M java/optional/org/apache/derby/optional/json/SimpleJsonTool.java
Makes the simpleJson tool create a method with this signature:
{noformat}
create function arrayToClob( jsonDocument JSONArray ) returns clob
language java parameter style java no sql
external name 'org.apache.derby.optional.api.SimpleJsonUtils.arrayToClob'
{noformat}
-----------------------
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/SimpleJsonTest.java
Regression test for the new function.
> Add basic JSON support to Derby.
> --------------------------------
>
> Key: DERBY-6825
> URL: https://issues.apache.org/jira/browse/DERBY-6825
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.12.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Fix For: 10.12.0.0
>
> Attachments: SimpleJsonVTI.java, derby-6825-01-aa-optionalTool.diff,
> derby-6825-01-ab-optionalTool.diff, derby-6825-02-aa-vti.diff,
> derby-6825-03-aa-datatypeTests.diff, derby-6825-04-aa-grantPrivileges.diff,
> derby-6825-05-aa-toClobFunction.diff
>
>
> Other database are adding support for the popular JSON data interchange
> format defined by https://www.ietf.org/rfc/rfc4627.txt. We could add a VTI to
> Derby which would unpack a JSON document into a set of rows. We could also
> add a reverse transformation, which turns a query result into a JSON document.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)