All Bundles

Table

Container for semi-structured data

Operations

New

Constructor

New(name:String, column_names:String[])
Parameters
NameTypeDescription
nameStringtable name
column_namesString[]column names

Average

Gets the column average

method : public : Average(name:String) ~ Float
Parameters
NameTypeDescription
nameStringcolumn name

Return
TypeDescription
Floatcolumn average

Count

Count of rows

method : public : Count() ~ Int
Return
TypeDescription
Intnumber of rows

Delete

Delete row1 by primary key

method : public : native : Delete(pk:Int) ~ Bool
Parameters
NameTypeDescription
pkIntprimary key

Return
TypeDescription
Booltrue of successful, false otherwise

Filter

Filters table based upon conditional criteria

method : public : native : Filter(cond:Conditional) ~ Vector<Row>
Parameters
NameTypeDescription
condConditionalconditional filter

Return
TypeDescription
Vector<Row>filtered rows

FromCsv

Loads a table from a CSV file

function : public : FromCsv(table_name:String, path:String) ~ Table
Parameters
NameTypeDescription
table_nameStringtable name
pathStringto CSV

Return
TypeDescription
Tablenew table

FromFilesystem

Loads a table from a directory file system. Columns are: path_name, create_date, owner, is_dir and is_readonly.

function : public : FromFilesystem(table_name:String, path:String) ~ Table
Parameters
NameTypeDescription
table_nameStringtable name
pathStringto directory

Return
TypeDescription
Tablenew table

Get

Get row1 by primary key

method : public : native : Get(pk:Int) ~ Row
Parameters
NameTypeDescription
pkIntprimary key

Return
TypeDescription
Rowrow1

GetAll

Get all row1

method : public : native : GetAll() ~ Vector<Row>
Return
TypeDescription
Vector<Row>all row1

GetColumnNames

Gets all column names

method : public : GetColumnNames() ~ String[]
Return
TypeDescription
String[]column names

GetError

Gets the last query error

method : public : GetError() ~ String
Return
TypeDescription
Stringlast query error

GetIndex

Get column index by name

method : public : native : GetIndex(name:String) ~ Int
Parameters
NameTypeDescription
nameStringcolumn name

Return
TypeDescription
Intcolumn name

GetName

Gets the table name

method : public : GetName() ~ String
Return
TypeDescription
Stringtable name

Insert

Inserts a new row1 into the table. After the row1 has been added it's values will need to be set.

method : public : native : Insert() ~ Row
Return
TypeDescription
Rownewly inserted row1

Query

Query table using SQL-like syntax. Support for 'select', 'from', 'where', 'distinct', 'order by' and logical operators.

method : public : Query(statement:String) ~ Table
Parameters
NameTypeDescription
statementStringquery statement

Return
TypeDescription
Tableresult table

Size

Count of rows

method : public : Size() ~ Int
Return
TypeDescription
Intnumber of rows

Sum

Gets the column sum

method : public : Sum(name:String) ~ Float
Parameters
NameTypeDescription
nameStringcolumn name

Return
TypeDescription
Floatcolumn sum

ToString

String representation of table

method : public : ToString() ~ String
Return
TypeDescription
Stringall row1 as a string

Unique

Gets unique rows by column name

method : public : Unique(name:String) ~ Vector<Row>
Parameters
NameTypeDescription
nameStringcolumn name

Return
TypeDescription
Vector<Row>unique rows