This is about how to configure WSO2 DSS to support Cassandra user defined data types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TYPE universaltrackerdb.milestone ( milestone_id text, milestone_name text) | |
CREATE TABLE userks.tellme ( | |
transaction_id int PRIMARY KEY, | |
milestone_details frozen<milestone>, | |
); | |
INSERT INTO universaltrackerdb.tellme(transaction_id, milestone_details) VALUES(1, {milestone_id : ‘Done’, milestone_name : ‘Completed’}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<query id="insertTellMe" returnUpdatedRowCount="true" useConfig="UTDataSource"> | |
<expression>INSERT INTO universaltrackerdb.tellme(transaction_id, milestone_details) VALUES(?, {milestone_id : ?, milestone_name : ?});</expression> | |
<result element="UpdatedRowCount" rowName="" useColumnNumbers="true"> | |
<element column="1" name="Value" xsdType="integer"/> | |
</result> | |
<param name="transaction_id" sqlType="INTEGER"/> | |
<param name="milestone_id" sqlType="STRING" structType="milestone"/> | |
<param name="milestone_name" sqlType="STRING"/> | |
</query> | |
<operation name="insertTellMe"> | |
<call-query href="insertTellMe"> | |
<with-param name="transaction_id" query-param="transaction_id"/> | |
<with-param name="milestone_id" query-param="milestone_id"/> | |
<with-param name="milestone_name" query-param="milestone_name"/> | |
</call-query> | |
</operation> | |
<resource method="POST" path="insertTellMe"> | |
<call-query href="insertTellMe"> | |
<with-param name="transaction_id" query-param="transaction_id"/> | |
<with-param name="milestone_id" query-param="milestone_id"/> | |
<with-param name="milestone_name" query-param="milestone_name"/> | |
</call-query> | |
</resource> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="http://ws.wso2.org/dataservice"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<dat:insertTellMe> | |
<dat:transaction_id>2</dat:transaction_id> | |
<dat:milestone_id>Done</dat:milestone_id> | |
<dat:milestone_name>Completed</dat:milestone_name> | |
</dat:insertTellMe> | |
</soapenv:Body> | |
</soapenv:Envelope> |
Comments