Auto generation of CRUD function

In Studio on a blank screen, there is a powerful feature to autogenerate CRUD functionality with an existing database. Users can build subcategories and perform various functionalities in the connected database, such as viewing, inserting, deleting, and updating the data.

NOTE: It is available only for SQL database connectors.

The auto-generate CRUD feature extends its utility to create a table on the builder screen also with applied actions on it; to perform the CRUD operations. This makes the whole procedure much easy and faster.

Autogenerate CRUD

This option will generate an editable table control where you can view, add, update and delete rows from the selected SQL DB. You can choose individual operations that you want to allow and accordingly we will generate the table grid control with the right data and queries.

  1. Click on the Autogenerate CRUD option. It will open up a side window, with a Select Connector dropdown. Select the database you want to perform the CRUD operation.

  2. After selecting database it will ask to select the table.

  3. Next, you will have various operations listed right below to choose from. You can select one more operation at a time. By default, the View operation will be chosen and it can’t be unselected.

View operation

With the View operation selected, you will have to next select the columns which all users will be able to view in the table grid control.

You can check the Select All option from the top row to select all the columns and make it available to view in the table grid control.

For the view operation we also have a column of Detailed-View, if you select it, it would display the whole row of data as a detailed view. Also, the detailed view option in the table grid gets toggled on.

Insert operation

Now, let’s look into the Insert operation. Once you select the insert option, the whole column of the insert will be available to choose from. You can check Select All to make every column available to insert from the user in the database or you can check only those columns which you want to insert from the user side.

Update operation

When you select the Update operation, an additional dropdown is provided to select a unique identifier from the database table. This identifier is used to make reference as the primary key in the table to make successful updates.

Select a column that you want to make a unique identifier for the update operation. Once you select the update option, the whole column of the update will be available to choose from. You can check Select All to make every column available to update data from the user in the database or you can check only those columns which you want to make changes from the user side.

Delete operation

At last, we have the Delete operation. On selection of the delete operation, similar to the update operation an additional dropdown will be provided to select a unique identifier from the database table. This identifier is used to make reference as the primary key in the table to make successful deletes.

Select a column that you want to make a unique identifier for the delete operation.

  1. After selecting the operations and columns, click on Generate CRUD.

Added connector subcategories

You can check that the database connector now has all the operational subcategories added to it.

Table grid control added

A table grid control will be added to the screen.

Bind data

The subcategory of the connector to fetch data gets bind to the table grid control.

Properties

Various properties get added in the table grid control, such as add row, editable column, delete toggle button, and more.

Actions

You will notice that the actions for delete_click and save_changes have been configured to the table grid control.

In the above image, the delete action has been configured with the delete subcategory of the connector.

In the above image, the save action has been configured with the update and insert new data subcategories of the connector, with proper support of on-screen actions like iterate task, JS code, and more.