Insert records

Maybe you are developing an application where, let's say "adding a user to a Users dataset" is a requirement. You can easily implement this requirement in your Javascript application using the Jexia Javascript SDK. Probably the most useful module from the SDK is the Data Operation Module (DataOperationsModule class). You can use the DataOperations class to select a dataset and insert records to it. The example below will show how to initialize the SDK using this module. Follow the dataModule variable to see how this mechanism works.


let users = dataModule.dataset("users");
users.insert([ {name: "A new user", email:""},
               {name: "Another user", email:""}
]).execute().then( (records) => {
  // you will be able to access the newly inserted records here
  // complete with their generated IDs
}).catch( (error) => {
  // you can see the error info here, if something goes wrong

Advanced users:

In order to obtain deeper insights, please visit our API reference