6.7.13SHOW STORAGE TYPE
Syntax
SHOW STORAGE TYPE [file_name] dataset_name [, [file_name] dataset_name]* [BY NAME]
[post_processing_option]
[output_redirecting_option]
Description
Show (i.e. get) the storage type (layout) of an HDF5 dataset named dataset_name. Multiple datasets’ storage types can be obtained at once by separating their names with a comma (,). If dataset_name was not found or its storage type could not be obtained (due to unknown/unexpected reasons), no subsequent datasets are checked, and an error is raised.
Parameter(s)
file_name – optional string that specifies the name of the HDF5 file storing the dataset whose storage type (layout) is to be obtained. If file_name is specified, the file is opened on the fly, the storage type of the dataset is obtained, and the file is subsequently closed. If not specified, the file currently in use is used instead.
dataset_name – mandatory string that specifies the name of the HDF5 dataset whose storage type (layout) is 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
If the keyword BY NAME is not specified, it returns the storage type (layout) of an HDF5 dataset as an HDFQL_INT, which can be HDFQL_CONTIGUOUS, HDFQL_COMPACT, or HDFQL_CHUNKED depending on whether the storage is contiguous, compact, or chunked, respectively. Otherwise, if the keyword BY NAME is specified, it returns the storage type (layout) of a dataset as an HDFQL_VARCHAR, which can be “CONTIGUOUS”, “COMPACT”, or “CHUNKED”.
Example(s)
# create an HDF5 dataset named "my_dataset0" of data type unsigned int
CREATE DATASET my_dataset0 AS UNSIGNED INT
# show (i.e. get) storage type (layout) of dataset "my_dataset0" (should return 1 (i.e. HDFQL_CONTIGUOUS))
SHOW STORAGE TYPE my_dataset0
# create an HDF5 dataset named "my_dataset1" of data type int of two dimensions (size 5x7)
CREATE CONTIGUOUS DATASET my_dataset1 AS INT(5, 7)
# show (i.e. get) storage type (layout) of dataset "my_dataset1" (should return 1 (i.e. HDFQL_CONTIGUOUS))
SHOW STORAGE TYPE my_dataset1
# create an HDF5 dataset named "my_dataset2" of data type double of one dimension (size 8)
CREATE COMPACT DATASET my_dataset2 AS DOUBLE(8)
# show (i.e. get) storage type (layout) of dataset "my_dataset2" (should return 2 (i.e. HDFQL_COMPACT))
SHOW STORAGE TYPE my_dataset2
# create an HDF5 dataset named "my_dataset3" of data type float of three dimensions (size 3x5x20)
CREATE CHUNKED DATASET my_dataset3 AS FLOAT(3, 5, 20)
# show (i.e. get) storage type (layout) of dataset "my_dataset3" (should return 4 (i.e. HDFQL_CHUNKED))
SHOW STORAGE TYPE my_dataset3