Row, Column, StringColumn
Row, Column, StringColumn
Row Class
The Row class represents a single row of data in a table.
Methods
getString(columnName: String): String- Returns a string value from the specified column.
var stringValueByName = row.getString("ColumnName");getString(columnIndex: Integer): String- Returns a string value from the column at the specified index.
var stringValueByIndex = row.getString(columnIndex);rowHash(): Integer- Returns a hash value for the row.
var rowHashValue = row.rowHash();toString(): String- Converts the row to a string.
var rowAsString = selectedRow.toString();Column Class
The Column class represents a single column of data in a table.
Methods
title(): String- Returns the title or name of the column.
var columnTitle = column.title();name(): String- Returns the name of the column.
var columnName = column.name();size(): Integer- Returns the number of items in the column.get(rowIndex: Integer): any- Returns the data value at the specified row index.isEmpty(): Boolean- Checks if the column is empty.
var isEmpty = column.isEmpty();print(): String- Converts the column to a string for printing.'contains(object: any): Boolean- Checks if the column contains a specific object.type(): any- Returns the data type of the column.sortAscending()- Sorts the column in ascending order.
column.sortAscending();sortDescending()- Sorts the column in descending order.
column.sortDescending();StringColumn Class
The StringColumn class represents a column of string values and provides various methods for string-specific operations.
Methods
equalToIgnoringCase(str: String): Selection
equalToIgnoringCase(str: String): SelectionThis method is used to filter the selection based on a case-insensitive comparison with the provided string (str). It selects rows in which the values in the column match the specified string while ignoring case differences.
startsWith(str: String): Selection
startsWith(str: String): SelectionThe startsWith method is used to filter the selection, returning rows where the values in the column start with the provided string (str).
endsWith(str: String): Selection
endsWith(str: String): SelectionThis method is employed to filter the selection, returning rows where the values in the column end with the specified string (str).
contains(str: String): Selection
contains(str: String): SelectionThe contains method filters the selection to include rows where the column values contain the given string (str).
matchesRegex(str: String): Selection
matchesRegex(str: String): SelectionThis method allows you to filter the selection using a regular expression. It selects rows where the column values match the provided regular expression string (str).
isEmpty(): Selection
isEmpty(): SelectionThe isEmpty method is used to filter the selection to include rows where the column values are empty or null.
isAlpha(): Selection
isAlpha(): SelectionThis method filters the selection to include rows where the column values consist of alphabetic characters only, excluding digits and special characters.
isNumeric(): Selection
isNumeric(): SelectionThe isNumeric method selects rows where the column values are numeric, consisting of digits and optional decimal points.
isAlphaNumeric(): Selection
isAlphaNumeric(): SelectionThis method is used to filter the selection to include rows where the column values contain both alphabetic characters and digits.
isUpperCase(): Selection
isUpperCase(): SelectionThe isUpperCase method selects rows where the column values consist of uppercase letters only.
isLowerCase(): Selection
isLowerCase(): SelectionThis method is used to filter the selection to include rows where the column values consist of lowercase letters only.
hasLengthEqualTo(lengthChars: Integer): Selection
hasLengthEqualTo(lengthChars: Integer): SelectionThe hasLengthEqualTo method filters the selection to include rows where the column values have a length equal to the specified lengthChars.
hasLengthLessThan(lengthChars: Integer): Selection
hasLengthLessThan(lengthChars: Integer): SelectionThis method selects rows where the length of the column values is less than the specified lengthChars.
hasLengthGreaterThan(lengthChars: Integer): Selection
hasLengthGreaterThan(lengthChars: Integer): SelectionThe hasLengthGreaterThan method is used to filter the selection to include rows where the length of the column values is greater than the specified lengthChars.
These methods provide a variety of ways to filter and manipulate data in a StringColumn, allowing you to tailor your selections based on specific criteria and conditions.
Last updated