MySQL HeatWave User Guide
The app_task_list routine returns a
paginated list of asynchronous tasks associated with an
application user.
This topic contains the following sections:
mysql> SELECT mysql_tasks.app_task_list(
IN 'app_user_id' VARCHAR(255),
IN 'task_type' VARCHAR(80),
IN offset IN UNSIGNED,
IN limit INT UNSIGNED);
Following are app_task_list parameters:
app_user_id (VARCHAR(255)): specifies
the application-managed user ID to use for filtering the
tasks.
task_type (VARCHAR(80)): specifies
the task type to use for filtering the tasks. If the
value is NULL, tasks of all types are
listed.
offset (INT UNSIGNED): specifies the
initial number of tasks to skip. The offset value is
used for pagination. If the value is
NULL, the offset defaults to
0, and the result is displayed
starting from the first row.
limit (INT UNSIGNED): specifies the
maximum number of task records to include. If the value
is NULL, the limit defaults to
20, and up to 20 rows are displayed.
mysql> SELECT JSON_PRETTY(mysql_tasks.app_task_list('app_user_01','demo task type',0,1));
The output is similar to the following:
| [
{
"id": "a516b352-574c-11f0-9604-020017205654",
"data": {
"sleep": 5,
"mysqlMetadata": {
"autoGc": true,
"events": [
"`demo_db`.`a516a336-574c-11f0-9604-020017205654`",
"`demo_db`.`a516a3f8-574c-11f0-9604-020017205654`"
]
},
"refresh_period": 1
},
"name": "demo task name",
"task_type": "demo task type",
"connection_id": 1650
}
] |
This example lists one application task of the specified task type.