Setting data
Now let's set some data in to the database!
Adding
First, let's start off with something simple! You have a database called customers
with the columns name, mail, ordersArray
. Now you want to add a customer. You can do that with the table.add
function. Here are two examples.
Updating
Now, the customer ordered product number three. Then you want to add that to the array. You can do that with the table.update
function.
Ensure
If you want to add a row if something in it doesn't exists, you can do that with the table.ensure
function. Here is a example.
Deleting
Oke, finaly: deleting data! You can delete data with the table.delete
function and a filter. Here a example.
Last updated