Usage

EXAMPLE AND USAGE

Example

String data = process("SELECT|DATA|SELECT * FROM city", "");

Sample output for above Query:

{"DATA":[{"Population":1780000,"ID":1,"CountryCode":"AFG","District":"Kabol","Name":"Kabul"},{"Population":237500,"ID":2,"CountryCode":"AFG","District":"Qandahar","Name":"Qandahar"}]}

NO ROOT KEY OUTPUT

Example without Root Json Key

String data = process("SELECT|NO_ROOTKEY|SELECT * FROM city", "");

NO_ROOTKEY- Remove root key TAG

Sample output for above Query:

[{"Population":1780000,"ID":1,"CountryCode":"AFG","District":"Kabol","Name":"Kabul"},{"Population":237500,"ID":2,"CountryCode":"AFG","District":"Qandahar","Name":"Qandahar"}]

QUERY WITH ARGUMENTS

JCONX_QUERY

SELECT_WPARAMS|DATA|SELECT * FROM city where Population=:Population

DATA

{"Population":"1780000"}

SAMPLE OUTPUT:

{"DATA":[{"Population":1780000,"ID":1,"CountryCode":"AFG","District":"Kabol","Name":"Kabul"}]}

DML OPERATIONS

JCONX_QUERY

DML_GENID|DATA|INSERT INTO CITY (Name,CountryCode,District,Population) values(:Name,:CountryCode,:District,:Population)

DATA

{"Population":289900,"CountryCode":"IND","District":"Chennai","Name":"Chennai"}"

SAMPLE OUTPUT:

4480
*4480 is id for that inserted row.