Home

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 row 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
Parameters
NameTypeDescription
condConditionalconditional filter

Return
TypeDescription
Vectorfiltered rows

GetAll

Get all row

method : public : native : GetAll() ~ Vector
Return
TypeDescription
Vectorall row

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

GetRow

Get row by primary key

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

Return
TypeDescription
Rowrow

Insert

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

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

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

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 row as a string

Unique

Gets unique rows by column name

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

Return
TypeDescription
Vectorunique rows