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

JavaScript-facing Parquet writer. More...

Public Member Functions

 WasmParquetWriter ()=default
 Default-construct in an unopened state.
 
bool open (const std::string &path, const Schema &schema, const WasmWriterOptions &opts)
 Open a new Parquet file for writing on MEMFS.
 
bool flushRowGroup ()
 Flush the current row group to disk and begin a new one.
 
bool close ()
 Finalize the Parquet file (writes footer metadata and closes the file).
 
int64_t rowsWritten () const
 Return the total number of rows written so far (across all row groups).
 
bool isOpen () const
 Check whether the writer is currently open and accepting data.
 
Typed column writers

Write a JS array of values into the specified column.

Parameters
colZero-based column index.
arrJS Array of values matching the column's physical type.
Returns
true on success, false if the writer is closed or col is out of range.
bool writeColumnBool (size_t col, const em::val &arr)
 Write a boolean column from a JS array.
 
bool writeColumnInt32 (size_t col, const em::val &arr)
 Write an int32 column from a JS array.
 
bool writeColumnInt64 (size_t col, const em::val &arr)
 Write an int64 column from a JS array.
 
bool writeColumnFloat (size_t col, const em::val &arr)
 Write a float column from a JS array.
 
bool writeColumnDouble (size_t col, const em::val &arr)
 Write a double column from a JS array.
 
bool writeColumnString (size_t col, const em::val &arr)
 Write a string (BYTE_ARRAY) column from a JS array.
 

Detailed Description

JavaScript-facing Parquet writer.

Wraps the core ParquetWriter with per-type writeColumn* methods that accept JS arrays via em::val, marshalling values into C++ vectors before forwarding to the underlying typed write_column<T>().

Definition at line 290 of file signet_wasm.cpp.

Constructor & Destructor Documentation

◆ WasmParquetWriter()

WasmParquetWriter::WasmParquetWriter ( )
default

Default-construct in an unopened state.

Member Function Documentation

◆ close()

bool WasmParquetWriter::close ( )
inline

Finalize the Parquet file (writes footer metadata and closes the file).

Returns
true on success.

Definition at line 384 of file signet_wasm.cpp.

◆ flushRowGroup()

bool WasmParquetWriter::flushRowGroup ( )
inline

Flush the current row group to disk and begin a new one.

Returns
true on success.

Definition at line 377 of file signet_wasm.cpp.

◆ isOpen()

bool WasmParquetWriter::isOpen ( ) const
inline

Check whether the writer is currently open and accepting data.

Definition at line 395 of file signet_wasm.cpp.

◆ open()

bool WasmParquetWriter::open ( const std::string &  path,
const Schema schema,
const WasmWriterOptions opts 
)
inline

Open a new Parquet file for writing on MEMFS.

Parameters
pathMEMFS destination path.
schemaColumn schema built via WasmSchemaBuilder.
optsWriter options (row group size, etc.).
Returns
true on success, false if the file could not be created.

Definition at line 301 of file signet_wasm.cpp.

◆ rowsWritten()

int64_t WasmParquetWriter::rowsWritten ( ) const
inline

Return the total number of rows written so far (across all row groups).

Definition at line 390 of file signet_wasm.cpp.

◆ writeColumnBool()

bool WasmParquetWriter::writeColumnBool ( size_t  col,
const em::val &  arr 
)
inline

Write a boolean column from a JS array.

Definition at line 317 of file signet_wasm.cpp.

◆ writeColumnDouble()

bool WasmParquetWriter::writeColumnDouble ( size_t  col,
const em::val &  arr 
)
inline

Write a double column from a JS array.

Definition at line 356 of file signet_wasm.cpp.

◆ writeColumnFloat()

bool WasmParquetWriter::writeColumnFloat ( size_t  col,
const em::val &  arr 
)
inline

Write a float column from a JS array.

Definition at line 347 of file signet_wasm.cpp.

◆ writeColumnInt32()

bool WasmParquetWriter::writeColumnInt32 ( size_t  col,
const em::val &  arr 
)
inline

Write an int32 column from a JS array.

Definition at line 329 of file signet_wasm.cpp.

◆ writeColumnInt64()

bool WasmParquetWriter::writeColumnInt64 ( size_t  col,
const em::val &  arr 
)
inline

Write an int64 column from a JS array.

Definition at line 338 of file signet_wasm.cpp.

◆ writeColumnString()

bool WasmParquetWriter::writeColumnString ( size_t  col,
const em::val &  arr 
)
inline

Write a string (BYTE_ARRAY) column from a JS array.

Definition at line 365 of file signet_wasm.cpp.


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