HDFql Reference Manual v2.6.0

6.1.22VARCHAR

The HDFql VARCHAR data type stores values between 0 and 255 and occupies size * 1 byte in memory (where size is the length of the string). It represents the data type of an HDF5 (variable-length) H5T_C_S1 dataset/attribute or of a result set that stores variable-length elements of this type (which can be retrieved using the HDFQL_CURSOR_GET_CHAR function when working with cursors). The VARCHAR data type is useful for storing variable-length strings. Depending on the programming language supported by HDFql, the VARCHAR data type is represented by:

  • In C, the “unsigned char *” data type.
  • In C++, the “unsigned char *” data type.
  • In Java, the “String” class.
  • In Python, the “Ssize” NumPy data type.
  • In C#, the “String” data type (or corresponding alias “string”).
  • In Fortran, the “CHARACTER(LEN = *)” data type.
  • In R, the “character” data type.
  • In MATLAB, the cell data type containing character vectors (e.g. “{‘France’, ‘Portugal’, ‘Switzerland’}”).