Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
WasmParquetReader Class Reference

JavaScript-facing Parquet reader. More...

Public Member Functions

 WasmParquetReader ()=default
 Default-construct in an unopened state.
 
bool open (const std::string &path)
 Open a plaintext Parquet file from MEMFS.
 
int64_t numRows () const
 Return total row count across all row groups, or 0 if not open.
 
int64_t numRowGroups () const
 Return the number of row groups in the file, or 0 if not open.
 
Schema schema () const
 Return the file's schema, or an empty Schema if not open.
 
std::string createdBy () const
 Return the "created by" metadata string, or "" if not open.
 
em::val readColumnAsStrings (size_t rg, size_t col)
 Read any column as a JS Array of strings (type-erased).
 
Typed column readers

Read all values from a single column within a row group, returning a JS Array.

Parameters
rgZero-based row group index.
colZero-based column index.
Returns
JS Array of typed values, or an empty array on error.
em::val readColumnBool (size_t rg, size_t col)
 Read a boolean column as a JS Array of booleans.
 
em::val readColumnInt32 (size_t rg, size_t col)
 Read an int32 column as a JS Array of numbers.
 
em::val readColumnInt64 (size_t rg, size_t col)
 Read an int64 column as a JS Array of doubles (JS has no native int64).
 
em::val readColumnFloat (size_t rg, size_t col)
 Read a float column as a JS Array of numbers.
 
em::val readColumnDouble (size_t rg, size_t col)
 Read a double column as a JS Array of numbers.
 
em::val readColumnString (size_t rg, size_t col)
 Read a string (BYTE_ARRAY) column as a JS Array of strings.
 

Detailed Description

JavaScript-facing Parquet reader.

Wraps the core ParquetReader with per-type readColumn* methods that return JS arrays via em::val. Supports optional encrypted file opening when built with SIGNET_ENABLE_COMMERCIAL.

Definition at line 409 of file signet_wasm.cpp.

Constructor & Destructor Documentation

◆ WasmParquetReader()

WasmParquetReader::WasmParquetReader ( )
default

Default-construct in an unopened state.

Member Function Documentation

◆ createdBy()

std::string WasmParquetReader::createdBy ( ) const
inline

Return the "created by" metadata string, or "" if not open.

Definition at line 508 of file signet_wasm.cpp.

◆ numRowGroups()

int64_t WasmParquetReader::numRowGroups ( ) const
inline

Return the number of row groups in the file, or 0 if not open.

Definition at line 497 of file signet_wasm.cpp.

◆ numRows()

int64_t WasmParquetReader::numRows ( ) const
inline

Return total row count across all row groups, or 0 if not open.

Definition at line 492 of file signet_wasm.cpp.

◆ open()

bool WasmParquetReader::open ( const std::string &  path)
inline

Open a plaintext Parquet file from MEMFS.

Parameters
pathMEMFS path to an existing Parquet file.
Returns
true on success, false if the file is missing or corrupt.

Definition at line 418 of file signet_wasm.cpp.

◆ readColumnAsStrings()

em::val WasmParquetReader::readColumnAsStrings ( size_t  rg,
size_t  col 
)
inline

Read any column as a JS Array of strings (type-erased).

Useful for display/preview where the caller does not know the column's physical type at compile time.

Parameters
rgZero-based row group index.
colZero-based column index.
Returns
JS Array of stringified values, or an empty array on error.

Definition at line 595 of file signet_wasm.cpp.

◆ readColumnBool()

em::val WasmParquetReader::readColumnBool ( size_t  rg,
size_t  col 
)
inline

Read a boolean column as a JS Array of booleans.

Definition at line 521 of file signet_wasm.cpp.

◆ readColumnDouble()

em::val WasmParquetReader::readColumnDouble ( size_t  rg,
size_t  col 
)
inline

Read a double column as a JS Array of numbers.

Definition at line 565 of file signet_wasm.cpp.

◆ readColumnFloat()

em::val WasmParquetReader::readColumnFloat ( size_t  rg,
size_t  col 
)
inline

Read a float column as a JS Array of numbers.

Definition at line 554 of file signet_wasm.cpp.

◆ readColumnInt32()

em::val WasmParquetReader::readColumnInt32 ( size_t  rg,
size_t  col 
)
inline

Read an int32 column as a JS Array of numbers.

Definition at line 532 of file signet_wasm.cpp.

◆ readColumnInt64()

em::val WasmParquetReader::readColumnInt64 ( size_t  rg,
size_t  col 
)
inline

Read an int64 column as a JS Array of doubles (JS has no native int64).

Definition at line 543 of file signet_wasm.cpp.

◆ readColumnString()

em::val WasmParquetReader::readColumnString ( size_t  rg,
size_t  col 
)
inline

Read a string (BYTE_ARRAY) column as a JS Array of strings.

Definition at line 576 of file signet_wasm.cpp.

◆ schema()

Schema WasmParquetReader::schema ( ) const
inline

Return the file's schema, or an empty Schema if not open.

Definition at line 502 of file signet_wasm.cpp.


The documentation for this class was generated from the following file: