In an application developed with Kuika, you can increase the functionality of your application by creating custom actions. You can use the “Custom Actions” panel in the “UI Design” module or the “Actions” section in the “Datasources” module to create these actions.
Open the Custom Actions panel and select “SQL Action”.
3.1. Add Select Query: It is used to select records in the table and list them according to certain criteria. For example, a query such as “SELECT * FROM table_name” is created.
3.2. Add Select By Id Query: It is used to select a single record in the table according to a specific ID. For example, “SELECT * FROM table_name WHERE id = certain_id”.
3.3. Add Save Query: It is used to add a new record to the database or update an existing record. First, the existence of the existing record is checked with the “Update” query, then the new data is updated or inserted. If there is no record, the “Insert Into” command is activated and a new record is created in the data table.
3.4. Add Delete Query: It is used to delete a specific record in the database. For example, “DELETE FROM table_name WHERE condition expression”.
3.5. Add Search By Keyword Query: It is used to search the data in the table by a specific keyword. For example, “SELECT * FROM table_name WHERE column_name LIKE ‘%keyword%’”.
3.6. Add Search With Pagination Query: Used to search records by keyword and split the results into pages. Pagination is done with LIMIT and OFFSET parameters. For example, “SELECT * FROM table_name WHERE column_name LIKE ‘%key_keyword%’ LIMIT page_size OFFSET start”
4. Building SQL Queries with AI Assistant
You can get help from an AI Assistant when writing SQL queries. Click on the "Generate with AI" button and select the data table from the Select Box. Enter a command that describes the query you want to generate. For example, "I need a query to delete items". The AI will generate the query and you can copy and paste it into SQL Editor.
5. Adding Queries to SQL Editor
You can easily add AI generated queries by copying them to the SQL Editor area.
6. Query Result Parameter Panel
You can view the parameters of SQL queries in the Parameter Panel with the on/off button on the top right. The panel is dynamically updated according to the parameters of your action.
7. Testing SQL Queries
You can test SQL queries with the "TEST" button.
After completing all operations, you can finish the custom action creation process by clicking the “CREATE” (8) button.