Page 1 of 1
Array and JSON data type
Posted: Wed 24 Jun 2015 17:59
by Theprasit
Does UniDAC support postgresql Array and JSON data type?
If not what about PgDAC?
Regards,
Theprasit
Re: Array and JSON data type
Posted: Fri 26 Jun 2015 08:04
by azyk
UniDAC and PgDAC support the JSON data type and array in PostgreSQL. In UniDAC/PgDAC, for direct access to JSON fields, the TBlobField field type is used, for array fields - the TMemoField field type. Selection, data modification, creation and using indexes for fields with such types are supported on the server side.
For example, the code for data insert to the BLOB_FIELD field with the JSON type from the File.bin file will look like the following:
Code: Select all
TBlobField(UniQuery.FieldByName('BLOB_FIELD')).LoadFromFile('File.bin');
And the code for reading data from the BLOB_FIELD field to the File.bin file - as follows:
Code: Select all
TBlobField(UniQuery.FieldByName('BLOB_FIELD')).SaveToFile('File.bin');
Re: Array and JSON data type
Posted: Fri 26 Jun 2015 11:29
by Theprasit
Just do a testing on both Array and JSON. I can query a test table by passing SQL with Array and JSON syntax successfully. This is awesome and UniDAC is great.
Thank you and Regards,
Theprasit
Re: Array and JSON data type
Posted: Wed 01 Jul 2015 08:49
by azyk
We are glad to see that the suggested solution suits you. Thank you for your feedback. If any further questions come up, please contact us.