Skip to main content
?

select

Summary​

Issues a select query to a configured DB connection

Description​

Fields​

Database Connection​

The database connection.

Database Table​

The table name.

Columns to return​

String or array of string column names to return. Undefined, empty string or empty array will return all columns.

Join another table​

Join object with table, condition, and type keys

{
"table": "table1",
"condition": "id=table1.id",
"type": "INNER JOIN"
}

Columns to match​

Condition field allows dynamic configuration of query conditions based on dynamic data provided.

Column field defines which columns to do the operation on. Data field contains all the dynamic data, often passed in from various API requests, that includes data to be operated on as well as data to be checked for conditions. Condition field defines which columns to check for equality or other defined comparisons.

When a list of binary columns names is provided as below, query will match rows that have columns with value provided in the data field. If no data of the provided column name exist in the data field, the match will not be tried even if column name is given.

[
"column1",
"column2"
]

When a list of objects is provided as below, operator will be used to compare the column values. Query will match rows that have columns with value provided in the data field successfully compare against the operator. If no data of the provided column name exist, the match will not be tried even if column name is given.

[
{
"operator": "=",
"column": "column1"
}
]

Optionally, an or condition can be configured using an object with 'or' key and an array of conditions as its value.

Condition String​

Condition string added after dynamic conditions

Dynamic Data​

An object with key/value pairs for indicating column data

Order By Column​

Array of column names or objects with column and desc keys where desc is a boolean.

Limit​

Number of rows to return. Undefined or 0 will return all

Offset​

Offset to return from. Undefined or 0 will start from beginning

JSON columns​

Array of string column names that will go through JSON encoding/decoding.

Return error message​

This value is used as the result in the event of an error.