Skip to content

Modifying Resources

Even though SlashDB is REST centric, the Data Discovery GUI allows performing simple modifications of single resources (of course modifying multiple resources is also possible, but only via the REST API).

Editing Resource Using GUI

For instance, by going to:

https://demo.slashdb.com/db/Chinook/Invoice/InvoiceId/1.html

you can click the Edit button and adjust the selected resource.

Use the NULL button attached to each field to toggle NULL values. At any given time, if you change your mind, you can click the Close button to safely revert all the changes. When the you click the Save button (or press Enter key, while editing), your changes will be saved.

When a change in the Primary Key (PK) occurs, after a successful save, you will be prompted about a redirect to the resources new address. The redirect will happen automatically.

During a save, error might occur - so watch out for them. For example when trying to modify the AlbumId to a value that is already taken i.e. 2.

As can be seen above, SQLite returned an "UNIQUE constraint" error for Album.AlbumId.

Deleting Resource Using GUI

For instance, by going to:

https://demo.slashdb.com/db/Chinook/PlaylistTrack/PlaylistId/1/TrackId/3402.html

you can click the Delete. A confirmation prompt will show.

Upon successful delete, the resource identified by the URL no longer exists. You will be asked if you want to be redirected to the table to which the resource belonged to i.e. https://demo.slashdb.com/db/Chinook/PlaylistTrack.html?limit=29.

Clicking No will just close the prompt.

As with editing and error might occur during the delete process.

For:

https://demo.slashdb.com/db/Chinook/Invoice/InvoiceId/1.html

delete, will result in code 409:


This is normal and indicates violation of database referential integrity, which prevented deleting a record referenced by other records.