6.7.9SHOW MEMBER
Syntax
SHOW MEMBER [DATASET | ATTRIBUTE] [file_name] object_name
[post_processing_option]
[output_redirecting_option]
Description
Show (i.e. get) the members of an HDF5 dataset or attribute named object_name. If object_name is neither of data type HDFQL_ENUMERATION nor HDFQL_COMPOUND, an error is raised. In case a dataset and an attribute with identical names (object_name) are stored in the same location (i.e. group) and neither the keyword DATASET nor ATTRIBUTE is specified, the members returned belong to the dataset. To explicitly get the members of object_name according to its type, the keyword DATASET or ATTRIBUTE must be specified.
Parameter(s)
file_name – optional string that specifies the name of the HDF5 file storing the dataset or attribute whose members are to be obtained. If file_name is specified, the file is opened on the fly, the members of the dataset or attribute are obtained, and the file is subsequently closed. If not specified, the file currently in use is used instead.
object_name – mandatory string that specifies the name of the HDF5 dataset or attribute whose members are to be obtained.
post_processing_option – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section PROCESSING for additional information).
output_redirecting_option – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection INTO for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter CURSOR for additional information).
Return
The members of an HDF5 dataset or attribute as an HDFQL_INT, which can be HDFQL_TINYINT, HDFQL_UNSIGNED_TINYINT, HDFQL_SMALLINT, HDFQL_UNSIGNED_SMALLINT, HDFQL_INT, HDFQL_UNSIGNED_INT, HDFQL_BIGINT, HDFQL_UNSIGNED_BIGINT, HDFQL_FLOAT, HDFQL_DOUBLE, HDFQL_CHAR, HDFQL_VARTINYINT, HDFQL_UNSIGNED_VARTINYINT, HDFQL_VARSMALLINT, HDFQL_UNSIGNED_VARSMALLINT, HDFQL_VARINT, HDFQL_UNSIGNED_VARINT, HDFQL_VARBIGINT, HDFQL_UNSIGNED_VARBIGINT, HDFQL_VARFLOAT, HDFQL_VARDOUBLE, HDFQL_VARCHAR, HDFQL_OPAQUE, HDFQL_BITFIELD, HDFQL_ENUMERATION, HDFQL_COMPOUND, HDFQL_REFERENCE, or HDFQL_UNDEFINED (please refer to Table 6.3 for additional information about data types).
Example(s)
# create an HDF5 dataset named "my_dataset0" of data type enumeration composed of three members named "Paris" (with value 0), "Rome" (with value 1), and "Oslo" (with value 2)
CREATE DATASET my_dataset0 AS ENUMERATION(Paris, Rome, Oslo)
# show (i.e. get) members of dataset "my_dataset0" (should return "Paris", 0, "Rome", 1, "Oslo", 2)
SHOW MEMBER my_dataset0
# create an HDF5 dataset named "my_dataset1" of data type enumeration composed of three members named "red" (with value 0), "green" (with value 5), and "blue" (with value 6)
CREATE DATASET my_dataset1 AS ENUMERATION(red, green AS 5, blue)
# show (i.e. get) members of dataset "my_dataset1" (should return "red", 0, "green", 5, "blue", 6)
SHOW MEMBER my_dataset1
# create an HDF5 attribute named "my_attribute0" of data type enumeration composed of two members named "car" (with value 1000) and "plane" (with value 2000)
CREATE ATTRIBUTE my_attribute0 AS ENUMERATION(car AS 1000, plane AS 2000)
# show (i.e. get) members of attribute "my_attribute0" (should return "car", 1000, "plane", 2000)
SHOW MEMBER my_attribute0
# create an HDF5 dataset named "my_dataset2" of data type compound composed of three members named "person" (of data type variable-length char), "age" (of data type unsigned int), and "weight" (of data type float)
CREATE DATASET my_dataset2 AS COMPOUND(person AS VARCHAR, age AS UNSIGNED INT, weight AS FLOAT)
# show (i.e. get) members of dataset "my_dataset2" (should return "name", "age", "weight")
SHOW MEMBER my_dataset2
# create an HDF5 attribute named "my_attribute1" of data type compound composed of four members named "id" (of data type long long), "description" (of data type variable-length char), "position" (of data type compound composed of two members named "x" (of data type short), and "y" (of data type short)), and "temperature" (of data type enumeration composed of three members named "cold" (with value 0), "warm" (with value 1), and "hot" (with value 10))
CREATE ATTRIBUTE my_attribute1 AS COMPOUND(id AS BIGINT, description AS VARCHAR, position AS COMPOUND(x AS SMALLINT, y AS SMALLINT), temperature AS ENUMERATION(cold, warm, hot AS 10))
# show (i.e. get) members of attribute "my_attribute1" (should return "id", "description", "position", "position.x", "position.y", "temperature")
SHOW MEMBER my_attribute1