Page 1 of 1

Inserting an array of objects using the rest api in tiggzi database

Posted: Thu Mar 28, 2013 5:40 pm
by Ankit

Is there a clause in Rest API's generated against a tiggzi database which can insert an array of objects into the database


Inserting an array of objects using the rest api in tiggzi database

Posted: Thu Mar 28, 2013 7:38 pm
by Kateryna Grynko

Hello,

Arrays in database can contain simple values only: strings, numbers or boolean values (http://docs.tiggzi.com/documentation/...). If you need to save array of objects you can use JavaScript to convert each object to JSON string. Then it can be stored in Database column.

When receive data from collection, you would need to convert JSON strings to JavaScript objects.


Inserting an array of objects using the rest api in tiggzi database

Posted: Thu Mar 28, 2013 8:30 pm
by Jon

Hi Katya,

Thanks for your reply. Our ultimate goal is to speed up the REST API calls to the Tiggzi DB and pass an array with each call rather than just a single object.

Do I understand you correctly we could accomplish this goal with the right JavaScript / JSON conversion?

As context, we're using a simple JS library to implement local storage already.

Sincerely,
Jon


Inserting an array of objects using the rest api in tiggzi database

Posted: Thu Mar 28, 2013 9:10 pm
by Kateryna Grynko

No. You can place an array in any collection column.
But you can't add several rows to database collection with one request.


Inserting an array of objects using the rest api in tiggzi database

Posted: Fri Mar 29, 2013 1:12 am
by Ankit

Hi Katya,

Thanks for your reply, could we expect a feature which allows us to write custom scripts and expose custom set of api's over the tiggzi database in the future.


Inserting an array of objects using the rest api in tiggzi database

Posted: Fri Mar 29, 2013 1:26 am
by Illya Stepanov

Thanks for your reply we will think about it