Skip to main content

DB Entity

Prerequisites

To use a Database Entity, you first need to create a persistable data type. You can make a data type persistable by marking the data type object as persistent. This allows its attributes to be used within a Database Entity step in a function.

How to add Database Entity in function?

Within a Flow model, you can add a DBEntity step to interact with a persistable data type.

Select the previously created persistable Data Type model as the DB Entity Model.

Below that, choose the query you want to execute.

Based on this selection, the required inputs for the query will change. You can configure these inputs in the IN VARIABLES MAPPING section.

dbEntity

How to use Database Entity in function?

  • The datatype model created from the node and the relevant DB operation are selected. image-2025-8-2_16-24-27

  • The insert query takes an object as input and returns the inserted _id as output. image-2025-8-2_16-24-52

  • The delete query takes the unique _id as input. It has no output. The node executes and performs the delete operation. image-2025-8-2_16-25-15

  • The update query takes the entire object to be updated as input. The object must contain the _id. It has no output. The node executes and performs the update operation. image-2025-8-2_16-25-40

  • If no input is defined while creating the select query, there is no input at runtime. It returns the result of the select query (a single or multiple result based on the multiple result parameter).

image-2025-8-2_16-27-43