teable
teable copied to clipboard
Update or create a row
I am working with tables that contain primary keys and I need to update them every day or insert a new one if it doesn't exist. It would be really helpful if you add an api function UpdateOrCreate or something like this. In SQL there is something like INSERT INTO table (id, user, date, points) VALUES (1, 1, '2017-03-03', 25), (2, 1, '2017-03-04', 25), (3, 2, '2017-03-03', 100), (4, 2, '2017-03-04', 150) ON DUPLICATE KEY UPDATE points = VALUES(points) Thanks in advance.