SHOW-RESOURCES
Last Updated:2021-04-13
SHOW RESOURCES
Description
This statement is used to show the resources that the user has privilege to use. For ordinary users, only resources that the ordinary users with privilege to use will be displayed. While for admin users, all resources will be displayed.
SHOW RESOURCES
[
WHERE
[NAME [ = "your_resource_name" | LIKE "name_matcher"]]
[RESOURCETYPE = ["ODBC"]]
]
[ORDER BY ...]
[LIMIT limit][OFFSET offset];
-
WHERE
It supports filtering resources by where condition. It can use
NAME
for exact matching of equivalent value or use Like for fuzzy matching.RESOURCETYPE
can be used to match resource types. -
ORDER BY LIMIT
It supports ordering and paging result sets by any column.
Description of return results:
mysql> show resources;
+-------------------+--------------+-----------+--------------+
| Name | ResourceType | Item | Value |
+-------------------+--------------+-----------+--------------+
| my_reousrce | odbc_catalog | password | |
| my_reousrce | odbc_catalog | database | test |
| my_reousrce | odbc_catalog | driver | MySQL |
| my_reousrce | odbc_catalog | port | 9030 |
| my_reousrce | odbc_catalog | odbc_type | mysql |
| my_reousrce | odbc_catalog | host | 127.0.0.1 |
| my_reousrce | odbc_catalog | type | odbc_catalog |
| my_reousrce | odbc_catalog | user | admin |
+-------------------+--------------+-----------+--------------+
The properties of a resource will be displayed in multiple lines, one property in each line.
Name
:resource name.ResourceType
:resource type.Item
:property key.Value
:property value.
Note: the password will not be displayed.
Example
-
Show resources created.
SHOW RESOURCES;
-
Filter and order resources according to conditions.
SHOW RESOURCES WHHERE name = "my_reousrce" ORDER BY Name DESC LIMIT 0, 10;
Keywords
SHOW, RESOURCES