ddn.data.hdf5.table

HDF5 Table Wrapper (High-Level API)

This module provides a D wrapper for HDF5 table operations using the High-Level Table API (H5TB).

License

BSD-3-Clause

Types 2

structTableInfo

Information about an HDF5 table.

Fields
hsize_t numFieldsNumber of fields (columns) in the table
hsize_t numRecordsNumber of records (rows) in the table
structTable

High-level wrapper for HDF5 table operations.

This struct provides convenient methods for creating and manipulating HDF5 tables using the High-Level API. Tables are stored as datasets with compound datatypes.

Example:

struct Particle {
    double x, y, z;
    int id;
}

// Create a table
Table.create!(Particle)(file.handle(), "particles", "Particle data");

// Append records
Particle[] data = [...];
Table.append!(Particle)(file.handle(), "particles", data);

Methods
void create(hid_t locId, string tableName, string tableTitle, hsize_t numFields, hsize_t numRecords, size_t recordSize, const(char *)[] fieldNames, const size_t[] fieldOffsets, const hid_t[] fieldTypes, hsize_t chunkSize, void * fillData, int compress, const void * data)Creates a new table.
void create(T)(hid_t locId, string tableName, string tableTitle, hsize_t chunkSize = 10, int compress = 0) if (is(T == struct))Creates a new table from a D struct type.
void append(hid_t locId, string tableName, hsize_t numRecords, size_t recordSize, const size_t[] fieldOffsets, const size_t[] fieldSizes, const void * data)Appends records to an existing table.
void append(T)(hid_t locId, string tableName, const T[] data) if (is(T == struct))Appends records to an existing table using a D struct type.
void read(hid_t locId, string tableName, size_t recordSize, const size_t[] fieldOffsets, const size_t[] fieldSizes, void * data)Reads the entire table.
void read(T)(hid_t locId, string tableName, T[] data) if (is(T == struct))Reads the entire table into a D struct array.
void readRecords(hid_t locId, string tableName, hsize_t start, hsize_t numRecords, size_t recordSize, const size_t[] fieldOffsets, const size_t[] fieldSizes, void * data)Reads a range of records from the table.
void readRecords(T)(hid_t locId, string tableName, hsize_t start, T[] data) if (is(T == struct))Reads a range of records from the table into a D struct array.
TableInfo getInfo(hid_t locId, string tableName)Gets information about a table.
void writeRecords(hid_t locId, string tableName, hsize_t start, hsize_t numRecords, size_t recordSize, const size_t[] fieldOffsets, const size_t[] fieldSizes, const void * data)Writes records to a specific location in the table.
void writeRecords(T)(hid_t locId, string tableName, hsize_t start, const T[] data) if (is(T == struct))Writes records to a specific location in the table using a D struct array.

Functions 1

private fnhid_t getHDF5Type(T)()Gets the HDF5 native type for a D type.