All Bundles
Table
Container for semi-structured data
Operations
New
Constructor
New(name:String, column_names:String[])
Parameters
Name | Type | Description |
---|
name | String | table name |
column_names | String[] | column names |
Average
Gets the column average
method : public : Average(name:String) ~ Float
Parameters
Name | Type | Description |
---|
name | String | column name |
Return
Type | Description |
---|
Float | column average |
Count
Count of rows
method : public : Count() ~ Int
Return
Type | Description |
---|
Int | number of rows |
Delete
Delete row1 by primary key
method : public : native : Delete(pk:Int) ~ Bool
Parameters
Name | Type | Description |
---|
pk | Int | primary key |
Return
Type | Description |
---|
Bool | true of successful, false otherwise |
Filter
Filters table based upon conditional criteria
method : public : native : Filter(cond:Conditional) ~ Vector<Row>
Parameters
Name | Type | Description |
---|
cond | Conditional | conditional filter |
Return
FromCsv
Loads a table from a CSV file
function : FromCsv(table_name:String, path:String) ~ Table
Parameters
Name | Type | Description |
---|
table_name | String | table name |
path | String | to CSV |
Return
Type | Description |
---|
Table | new table |
FromFilesystem
Loads a table from a directory file system. Columns are: name, path_name, create_date, owner, is_dir and is_readonly.
function : FromFilesystem(table_name:String, path:String) ~ Table
Parameters
Name | Type | Description |
---|
table_name | String | table name |
path | String | to directory |
Return
Type | Description |
---|
Table | new table |
Get
Get row1 by primary key
method : public : native : Get(pk:Int) ~ Row
Parameters
Name | Type | Description |
---|
pk | Int | primary key |
Return
GetAll
Get all row1
method : public : native : GetAll() ~ Vector<Row>
Return
GetColumnNames
Gets all column names
method : public : GetColumnNames() ~ String[]
Return
GetError
Gets the last query error
method : public : GetError() ~ String
Return
Type | Description |
---|
String | last query error |
GetIndex
Get column index by name
method : public : native : GetIndex(name:String) ~ Int
Parameters
Name | Type | Description |
---|
name | String | column name |
Return
Type | Description |
---|
Int | column name |
GetName
Gets the table name
method : public : GetName() ~ String
Return
Type | Description |
---|
String | table 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
Type | Description |
---|
Row | newly 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
Name | Type | Description |
---|
statement | String | query statement |
Return
Type | Description |
---|
Table | result table |
Size
Count of rows
method : public : Size() ~ Int
Return
Type | Description |
---|
Int | number of rows |
Sum
Gets the column sum
method : public : Sum(name:String) ~ Float
Parameters
Name | Type | Description |
---|
name | String | column name |
Return
Type | Description |
---|
Float | column sum |
ToString
String representation of table
method : public : ToString() ~ String
Return
Type | Description |
---|
String | all row1 as a string |
Unique
Gets unique rows by column name
method : public : Unique(name:String) ~ Vector<Row>
Parameters
Name | Type | Description |
---|
name | String | column name |
Return