data

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package data provides data processing capabilities for Nxlang including CSV and Excel file handling

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseCSVFunc

func CloseCSVFunc(args ...types.Object) types.Object

CloseCSVFunc closes a CSV reader or writer

func CreateCSVReaderFunc

func CreateCSVReaderFunc(args ...types.Object) types.Object

CreateCSVReaderFunc creates a new CSV reader

func CreateCSVWriterFunc

func CreateCSVWriterFunc(args ...types.Object) types.Object

CreateCSVWriterFunc creates a new CSV writer

func GetCSVHeadersFunc

func GetCSVHeadersFunc(args ...types.Object) types.Object

GetCSVHeadersFunc gets headers from CSV reader

func OpenCSVFunc

func OpenCSVFunc(args ...types.Object) types.Object

OpenCSVFunc opens a CSV file for reading

func ParseCSVFunc

func ParseCSVFunc(args ...types.Object) types.Object

ParseCSVFunc parses a CSV string

func ReadCSVAllFunc

func ReadCSVAllFunc(args ...types.Object) types.Object

ReadCSVAllFunc reads all rows from CSV reader

func ReadCSVFunc

func ReadCSVFunc(args ...types.Object) types.Object

ReadCSVFunc reads all data from a CSV file

func ReadCSVRowFunc

func ReadCSVRowFunc(args ...types.Object) types.Object

ReadCSVRowFunc reads next row from CSV reader

func ToCSVFunc

func ToCSVFunc(args ...types.Object) types.Object

ToCSVFunc converts data to CSV string

func WriteCSVFunc

func WriteCSVFunc(args ...types.Object) types.Object

WriteCSVFunc writes data to a CSV file

func WriteCSVRowFunc

func WriteCSVRowFunc(args ...types.Object) types.Object

WriteCSVRowFunc writes a row to CSV writer

Types

type CSVReader

type CSVReader struct {
	// contains filtered or unexported fields
}

CSVReader represents a CSV file reader

func (*CSVReader) Close

func (r *CSVReader) Close()

Close closes the CSV reader

func (*CSVReader) Equals

func (r *CSVReader) Equals(other types.Object) bool

Equals implements types.Object interface

func (*CSVReader) GetHeaders

func (r *CSVReader) GetHeaders() types.Object

GetHeaders returns the CSV headers

func (*CSVReader) ReadAll

func (r *CSVReader) ReadAll() types.Object

ReadAll reads all rows from the CSV file

func (*CSVReader) ReadRow

func (r *CSVReader) ReadRow() types.Object

ReadRow reads the next row from the CSV file

func (*CSVReader) ToStr

func (r *CSVReader) ToStr() string

ToStr implements types.Object interface

func (*CSVReader) TypeCode

func (r *CSVReader) TypeCode() uint8

TypeCode implements types.Object interface

func (*CSVReader) TypeName

func (r *CSVReader) TypeName() string

TypeName implements types.Object interface

type CSVWriter

type CSVWriter struct {
	// contains filtered or unexported fields
}

CSVWriter represents a CSV file writer

func (*CSVWriter) Close

func (w *CSVWriter) Close()

Close closes the CSV writer

func (*CSVWriter) Equals

func (w *CSVWriter) Equals(other types.Object) bool

Equals implements types.Object interface

func (*CSVWriter) ToStr

func (w *CSVWriter) ToStr() string

ToStr implements types.Object interface

func (*CSVWriter) TypeCode

func (w *CSVWriter) TypeCode() uint8

TypeCode implements types.Object interface

func (*CSVWriter) TypeName

func (w *CSVWriter) TypeName() string

TypeName implements types.Object interface

func (*CSVWriter) WriteHeaders

func (w *CSVWriter) WriteHeaders(headers types.Object) types.Object

WriteHeaders writes headers to the CSV file

func (*CSVWriter) WriteRow

func (w *CSVWriter) WriteRow(row types.Object) types.Object

WriteRow writes a row to the CSV file

func (*CSVWriter) WriteRows

func (w *CSVWriter) WriteRows(rows types.Object) types.Object

WriteRows writes multiple rows to the CSV file

type DataTable

type DataTable struct {
	// contains filtered or unexported fields
}

DataTable represents a table of data (for Excel-like operations)

func NewDataTable

func NewDataTable(headers ...string) *DataTable

NewDataTable creates a new data table

func (*DataTable) AddRow

func (t *DataTable) AddRow(row *collections.Array)

AddRow adds a row to the data table

func (*DataTable) Equals

func (t *DataTable) Equals(other types.Object) bool

Equals implements types.Object interface

func (*DataTable) GetHeaders

func (t *DataTable) GetHeaders() *collections.Array

GetHeaders returns the headers

func (*DataTable) GetRow

func (t *DataTable) GetRow(index int) types.Object

GetRow returns a row by index

func (*DataTable) GetRowCount

func (t *DataTable) GetRowCount() int

GetRowCount returns the number of rows

func (*DataTable) ToStr

func (t *DataTable) ToStr() string

ToStr implements types.Object interface

func (*DataTable) TypeCode

func (t *DataTable) TypeCode() uint8

TypeCode implements types.Object interface

func (*DataTable) TypeName

func (t *DataTable) TypeName() string

TypeName implements types.Object interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL