Function Glossary
randomString()
The randomString() command generates a random string based on a specified pattern and stores it in a target variable. It is especially useful when random strings are needed to conform to a specific format, such as passwords or identifiers.

Parameters
Pattern
Type: var
Description: A regular expression (regex) pattern that defines the characters and structure of the string to be generated. It can be a direct value or a variable containing the pattern. For example, [a-zA-Z0-9] will generate a string that includes uppercase letters, lowercase letters, and numbers.
Length
Type: var
Description: An integer value specifying the length of the random string to be generated. It can be a direct value or a variable containing the desired length. This value determines how many characters the resulting string will have.
TargetVariable
Type: var
Description: The variable where the generated string will be stored. This variable should be used later in the program. Unlike the other parameters, this must be a variable and not a direct value.
Usage Example
// Direct call with values:
            randomString('[a-zA-Z0-9]', 8, generatedPassword)

            // Call using variables:
            pattern = '[a-zA-Z0-9]'
            length = 8
            randomString(pattern, length, generatedPassword)
stampToDatetime()
The stampToDatetime() command converts a timestamp value to a date and time according to a specified format, applying a possible time difference, and stores the result in a target variable. It is useful for manipulating and formatting time values into different representations.

Parameters
timestamp
Type: var
Description: A value representing a timestamp, which can be provided directly or through a variable. This value is the starting point for conversion to a date and time format.
Format
Type: var
Description: A format string that defines how the resulting date and time should be presented. This string follows the same conventions used in Python for formatting dates and times. Common symbols include:
%Y: Year with four digits (e.g., 2024)
%m: Month with two digits (01 to 12)
%d: Day of the month with two digits (01 to 31)
%H: Hour in 24-hour format (00 to 23)
%M: Minutes (00 to 59)
%S: Seconds (00 to 59)
For example, the format %Y-%m-%d %H:%M:%S converts a timestamp into a string like 2024-08-25 14:30:00. It can be a direct value or a variable containing the desired format.
TimeDelta
Type: var
Description: An optional value representing a time adjustment (positive or negative) applied to the timestamp before conversion. This value can be provided directly or through a variable and is expressed in seconds.
TargetVariable
Type: var
Description: The variable where the resulting date and time from the conversion will be stored. Unlike the other parameters, this must be a variable and not a direct value.
Usage Example
// Direct call with values:
            stampToDatetime(1692966600, '%Y-%m-%d %H:%M:%S', 3600, convertedDatetime)

            // Call using variables:
            timestamp = 1692966600
            format = '%Y-%m-%d %H:%M:%S'
            adjustment = 3600
            stampToDatetime(timestamp, format, adjustment, convertedDatetime)
In the first example, a timestamp is converted to a date and time in the format "%Y-%m-%d %H:%M:%S", applying a 3600-second (1-hour) adjustment, and the result is stored in the variable convertedDatetime. In the second example, variables are used to define the timestamp, format, and adjustment.

getTimeStamp()
The getTimeStamp() command converts a date and time string, given in a specific format, to a timestamp value. Additionally, it allows for an optional time adjustment before storing the result in a target variable. This command is useful for converting human-readable date and time representations to a numeric timestamp format, which can be used in calculations or time comparisons.

Parameters
DateString
Type: var
Description: A string representing a date and time. This string must follow the format specified in the Format parameter. It can be a direct value or a variable containing the date string.
Format
Type: var
Description: A format string that defines how to interpret the date and time string (DateString). This string follows Python's conventions for formatting and parsing dates and times. Some common symbols include:
%Y: Year with four digits (e.g., 2024)
%m: Month with two digits (01 to 12)
%d: Day of the month with two digits (01 to 31)
%H: Hour in 24-hour format (00 to 23)
%M: Minutes (00 to 59)
%S: Seconds (00 to 59)
For example, to interpret the string "2024-08-25 14:30:00", the format %Y-%m-%d %H:%M:%S would be used. It can be a direct value or a variable containing the format.
TimeDelta
Type: var
Description: An optional value representing a time adjustment (positive or negative) applied to the timestamp after conversion. This value can be provided directly or through a variable and is expressed in seconds.
TargetVariable
Type: var
Description: The variable where the resulting timestamp from the conversion will be stored. Unlike the other parameters, this must be a variable and not a direct value.
Usage Example
// Direct call with values:
            getTimeStamp('2024-08-25 14:30:00', '%Y-%m-%d %H:%M:%S', 3600, generatedTimestamp)

            // Call using variables:
            date = '2024-08-25 14:30:00'
            format = '%Y-%m-%d %H:%M:%S'
            adjustment = 3600
            getTimeStamp(date, format, adjustment, generatedTimestamp)
In the first example, the date and time string "2024-08-25 14:30:00" is converted to a timestamp, applying a 3600-second (1-hour) adjustment, and the result is stored in the variable generatedTimestamp. In the second example, variables are used to define the date, format, and adjustment.

getRegex()
The getRegex() command searches for matches in a source string using a regular expression (regex) pattern and stores the result in a target variable. This command is useful for extracting specific parts of a string that match a defined pattern, such as email addresses, phone numbers, or any other structure defined by a regex.

Parameters
SourceVariable
Type: variable
Description: The variable containing the source string in which to search for regex pattern matches. This string is the text on which the regex search will be applied.
rePattern
Type: variable
Description: The variable containing the regular expression (regex) pattern that defines what to search for in the source string. This pattern should follow standard regex rules, allowing the specification of sequences of characters to identify in the source string.
TargetVariable
Type: variable
Description: The variable where the search result will be stored. Depending on the context and the pattern used, the result could be the first match found, all matches, or even specific groups within the match.
Usage Example
// Direct call with values:
            sourceText = "Email: user@example.com and phone: 123-456-7890"
            pattern = r"\b\d{3}-\d{3}-\d{4}\b"
            getRegex(sourceText, pattern, phoneNumber)

            // Call using variables:
            sourceText = "Visit our website at https://www.example.com for more information."
            regexPattern = r"https?://\S+"
            getRegex(sourceText, regexPattern, foundURL)
In the first example, a phone number in the format 123-456-7890 is searched in the sourceText string and the result is stored in the phoneNumber variable. In the second example, a URL is extracted from the sourceText string using a regex that identifies URL patterns, and the result is stored in the foundURL variable.

getDateTime()
The getDateTime() command retrieves the current date and time, formats it according to a specified format, applies an optional time adjustment, and converts it to a specific time zone before storing the result in a target variable. It is useful for obtaining and manipulating the current date and time in different formats and time zones.

Parameters
Format
Type: var
Description: A format string that defines how the resulting date and time should be presented. This string follows the date and time formatting conventions used in Python. Some of the most common symbols include:
%Y: Year with four digits (e.g., 2024)
%m: Month with two digits (01 to 12)
%d: Day of the month with two digits (01 to 31)
%H: Hour in 24-hour format (00 to 23)
%M: Minutes (00 to 59)
%S: Seconds (00 to 59)
For example, the format "%Y-%m-%d %H:%M:%S" will present the date and time as 2024-08-25 14:30:00. It can be a direct value or a variable containing the desired format.
TimeDelta
Type: var
Description: An optional value representing a time adjustment (positive or negative) applied to the current date and time before conversion. This value can be provided directly or through a variable and is expressed in seconds.
TimeZone
Type: var
Description: The time zone to which the date and time should be converted. This value can be a time zone identifier provided directly or through a variable. Some common time zones include:
"UTC": Coordinated Universal Time
"America/New_York": U.S. Eastern Time (EST/EDT)
"America/Los_Angeles": U.S. Pacific Time (PST/PDT)
"Europe/London": London Time (GMT/BST)
"Europe/Madrid": Madrid Time (CET/CEST)
"Asia/Tokyo": Tokyo Time (JST)
"Australia/Sydney": Sydney Time (AEST/AEDT)
You can use any time zone recognized by the pytz library in Python, which includes most time zones worldwide.
TargetVariable
Type: var
Description: The variable in which the resulting date and time from the operation will be stored. Unlike the other parameters, this must be a variable and not a direct value.
Usage Example
// Direct call with values:
            getDateTime('%Y-%m-%d %H:%M:%S', 3600, 'UTC', currentTime)

            // Call using variables:
            format = '%Y-%m-%d %H:%M:%S'
            adjustment = 3600
            timeZone = 'America/New_York'
            getDateTime(format, adjustment, timeZone, currentDateTime)
In the first example, the current date and time are retrieved, adjusted by 3600 seconds (1 hour), converted to UTC, and stored in the variable currentTime. In the second example, variables are used to define the format, time adjustment, and time zone, with the result stored in the currentDateTime variable.

encodeMD5()
The encodeMD5() command generates an MD5 hash of the provided string and stores the result in a target variable. MD5 is a cryptographic hash function that produces a 128-bit value (32 hexadecimal characters), commonly used to verify data integrity.

Parameters
SourceVariable
Type: var
Description: The variable containing the text string to be encoded in MD5. It can be a direct value or a variable storing the input string.
TargetVariable
Type: var
Description: The variable in which the resulting MD5 hash will be stored. Unlike the SourceVariable parameter, this must be a variable and not a direct value.
Usage Example
// Direct call with values:
encodeMD5('example_string', md5Hash)

// Call using variables:
text = 'example_string'
hashVariable = 'md5Hash'
encodeMD5(text, hashVariable)
In the first example, an MD5 hash is generated from the string 'example_string' and stored in the md5Hash variable. In the second example, a variable text is used to define the input string and another variable hashVariable is used to store the resulting MD5 hash.

encodeSHA256()
The encodeSHA256() command generates a SHA-256 hash of the provided string and stores the result in a target variable. SHA-256 is a cryptographic hash function that produces a 256-bit value (64 hexadecimal characters), offering greater security compared to MD5.

Parameters
SourceVariable
Type: var
Description: The variable containing the text string to be encoded in SHA-256. It can be a direct value or a variable storing the input string.
TargetVariable
Type: var
Description: The variable in which the resulting SHA-256 hash will be stored. Unlike the SourceVariable parameter, this must be a variable and not a direct value.
Usage Example
// Direct call with values:
encodeSHA256('example_string', sha256Hash)

// Call using variables:
text = 'example_string'
hashVariable = 'sha256Hash'
encodeSHA256(text, hashVariable)
In the first example, a SHA-256 hash is generated from the string 'example_string' and stored in the sha256Hash variable. In the second example, a variable text is used to define the input string, and another variable hashVariable is used to store the resulting SHA-256 hash.

getQueryParamList()
The getQueryParamList() command extracts the query parameters from the current HTTP request and stores a list of these parameters in a target variable. This is useful for handling and processing query parameters in web applications.

Parameters
TargetVariable
Type: var
Description: The variable in which the extracted query parameter list will be stored. This should be a variable where the command's result will be saved.
Command Flow
Parameter Extraction: Accesses the query parameters from the current HTTP request.
List Construction: Creates a list containing dictionaries, where each dictionary represents a query parameter and its associated value.
Result Storage: Saves the list of parameters in the variable specified by TargetVariable.
Usage Example
Suppose the HTTP query has the following parameters: ?user=alice&age=30.

// Define the variable to store the result
            queryParamsList = []

            // Call the command to extract query parameters
            getQueryParamList(queryParamsList)

            // Return the list of query parameters via addResult
            addResult(queryParamsList)
Given the query string ?user=alice&age=30, the getQueryParamList() command will generate the following list of parameters:

[
    {"user": "alice"},
    {"age": "30"}
]
getListLen()
The getListLen() command calculates the length of a list and stores the result in a target variable. This command is useful for determining the number of elements in a list.

Parameters
SourceVariable
Type: var
Description: The variable containing the list whose length you want to calculate. It can be a variable that stores the list or a direct value representing the list.
TargetVariable
Type: var
Description: The variable where the result of the list length will be stored. This should be a variable that will receive the integer value representing the number of elements in the list.
Command Flow
Retrieve the List: Access the list stored in the SourceVariable.
Calculate the Length: Calculate the number of elements in the list.
Store the Result: Save the calculated length in the variable specified by TargetVariable.
Usage Example
Suppose the list in myList is ['apple', 'banana', 'cherry'].

// Variable definitions
myList = ['apple', 'banana', 'cherry']
listLength = 0

// Call the command to calculate the length of the list
getListLen(myList, listLength)

// Return the list length through addResult
addResult(listLength)
Since the list myList has 3 elements, the getListLen() command will calculate that the length is 3. This value will be stored in the listLength variable and returned through addResult(listLength), resulting in the following output:

3
itemFromList()
The itemFromList() command extracts a specific element from a list based on a given index and stores the result in a target variable. This is useful for accessing individual elements within a list.

Parameters
SourceVariable
Type: var
Description: The variable containing the list from which an element is to be extracted. It can be a variable that stores the list or a direct value representing the list.
index
Type: value
Description: The index of the element to be extracted from the list. It must be an integer value that indicates the position of the element within the list.
TargetVariable
Type: var
Description: The variable where the extracted element will be stored. It must be a variable that will receive the value of the element at the specified index position.
Command Flow
Access the List: Access the list stored in the SourceVariable.
Extract the Element: Retrieve the element at the position specified by the index.
Store the Result: Save the extracted element in the variable specified by TargetVariable.
Usage Example
Suppose the list in myList is ['apple', 'banana', 'cherry'] and you want to extract the element at index 1.

// Variable definitions
myList = ['apple', 'banana', 'cherry']
element = ''

// Call the command to extract the element at index 1
itemFromList(myList, 1, element)

// Return the extracted element through addResult
addResult(element)
Since index 1 corresponds to the element 'banana' in the myList, the itemFromList() command will extract 'banana' and store it in the variable element. The element variable will be returned through addResult(element), resulting in the following output:

"banana"
variableFromJSON()
The variableFromJSON() command extracts the value associated with a specific key from a JSON object and stores the result in a target variable. This command is useful for accessing values within a JSON object.

Parameters
SourceVariable
Type: var
Description: The variable containing the JSON object from which a value is to be extracted. It can be a variable that stores the JSON object or a direct value representing the JSON object.
key
Type: value
Description: The key whose value is to be extracted from the JSON object. It must be a value that represents the key within the JSON object.
TargetVariable
Type: var
Description: The variable where the extracted value will be stored. It must be a variable that will receive the value associated with the specified key in the JSON object.
Command Flow
Access the JSON Object: Access the JSON object stored in the SourceVariable.
Extract the Value: Retrieve the value associated with the key within the JSON object.
Store the Result: Save the extracted value in the variable specified by TargetVariable.
Usage Example
Suppose the JSON object in jsonData is "name": "Alice", "age": 30 and you want to extract the value associated with the key "name".

// Variable definitions
jsonData = {"name": "Alice", "age": 30}
nameValue = ''

// Call the command to extract the value associated with the key "name"
variableFromJSON(jsonData, "name", nameValue)

// Return the extracted value through addResult
addResult(nameValue)
Since the value associated with the key "name" in the JSON object jsonData is "Alice", the variableFromJSON() command will extract "Alice" and store it in the variable nameValue. The nameValue variable will be returned through addResult(nameValue), resulting in the following output:

"Alice"
AddVariableToJSON()
The AddVariableToJSON() command adds a new key and its corresponding value to a JSON object and stores the result in a target variable. This command is useful for updating a JSON object with new key-value pairs.

Parameters
Key
Type: variable
Description: The key to be added to the JSON object. It must be a variable that stores the key to be added.
Value
Type: variable
Description: The value associated with the key to be added to the JSON object. It must be a variable that stores the corresponding value.
TargetVariable
Type: variable
Description: The variable where the updated JSON object will be stored. It must be a variable that will receive the JSON object with the new key and its added value.
Command Flow
Access the JSON Object: Access the JSON object stored in the TargetVariable.
Add the Key and Value: Add the new key and its associated value to the JSON object.
Store the Result: Save the updated JSON object in the variable specified by TargetVariable.
Usage Example
Suppose the initial JSON object in jsonData is "name": "Alice", "age": 30, and you want to add a new key "email" with the value "alice@example.com".

// Variable definitions
jsonData = {"name": "Alice", "age": 30}
newKey = "email"
newValue = "alice@example.com"

// Call the command to add the new key and value to the JSON object
AddVariableToJSON(newKey, newValue, jsonData)

// Return the updated JSON object through addResult
addResult(jsonData)
This updated JSON object will be stored in the variable jsonData and will be returned through addResult(jsonData), resulting in the following output:

{
  "name": "Alice",
  "age": 30,
  "email": "alice@example.com"
}
variableToList()
The variableToList() command converts an element into a list that contains only that element and stores the resulting list in a target variable. This command is useful to ensure that a single value is handled as a list in subsequent processing.

Parameters
element
Type: variable
Description: The variable that contains the element to be converted into a list. It can be any type of value that you want to include as the only item in the list.
TargetVariable
Type: variable
Description: The variable in which the resulting list will be stored. It must be a variable that will receive the list with the included element.
Command Flow
Access the Element: Access the element stored in the element variable.
Create the List: Create a list that contains only the provided element.
Store the Result: Save the resulting list in the variable specified by TargetVariable.
Usage Example
Suppose the element in myElement is "apple" and you want to convert it into a list.

// Variable definitions
myElement = "apple"
myList = []

// Call the command to convert the element into a list
variableToList(myElement, myList)

// Return the resulting list through addResult
addResult(myList)
Since myElement is "apple", the variableToList() command will convert this element into a list with a single item: ["apple"]. This list will be stored in the variable myList, and myList will be returned through addResult(myList), resulting in the following output:

["apple"]
addParam()
The addParam() command retrieves the value associated with a specific key from the query string of the current request and assigns this value to a target variable. This command is useful for extracting values from query parameters in an HTTP request and storing them in variables for processing.

Parameters
param
Type: value
Description: The key of the query string whose value you want to retrieve. It should be a value that represents the key in the query string.
variable
Type: var
Description: The variable in which the retrieved value from the query string will be stored. It must be a variable that will receive the value associated with the specified key.
Command Flow
Retrieve the Value: Access the value associated with the param key from the query string of the current request.
Assign the Value: Assign the retrieved value to the variable specified by variable.
Usage Example
Suppose the query string of the current request is ?user=alice&age=30, and you want to retrieve the value associated with the key "user".

// Variable definitions
userName = ''

// Call the command to retrieve the value for the "user" key and assign it to the variable
addParam("user", userName)

// Return the retrieved value through addResult
addResult(userName)
Given the query string ?user=alice&age=30, the addParam() command will retrieve the value "alice" associated with the key "user" and store it in the userName variable. The userName variable will be returned through addResult(userName), resulting in the following output:

"alice"
addResult()
The addResult() command is used to return the content of a variable as part of the command or function response. It is the way to present results or processed data from commands and operations performed in the language.

Parameters
variable
Type: var
Description: The variable whose content is to be returned as the result. It should be a variable that contains the value or data you want to include in the response.
Command Flow
Access the Content: Access the content of the variable provided as a parameter.
Return the Result: Include the content of the variable in the final response.
Example Usage
Suppose we have performed an operation and want to return the result stored in the result variable.

// Define the variable with the result of an operation
result = "Operation completed successfully."

// Call the command to return the content of the variable
addResult(result)
In this example, the addResult(result) command will return the content of the result variable, which is "Operation completed successfully.". This content will be presented as part of the response.

Note
The addResult() command is the primary mechanism for returning information and results in the language. Make sure that the variable passed to the command contains the desired data or result before calling addResult().
RequestPost()
The RequestPost() command performs an HTTP POST request to a specified URL, sending a query string, headers, and a request body, and stores the result of the request in a destination variable. This command is useful for sending data to a server and handling the responses from the request.

Parameters
url
Type: variable
Description: The URL to which the POST request will be sent. It should be a variable containing the address of the resource to which the request is to be made.
querystring
Type: variable
Description: The query string that will be appended to the URL. It should be a variable containing the query parameters in string format.
headers
Type: variable
Description: The HTTP headers that will be included in the POST request. It should be a variable containing a dictionary of headers and their values.
body
Type: variable
Description: The body of the POST request that will be sent to the server. It should be a variable containing the data to be sent in the request.
o_result
Type: variable
Description: The variable in which the result of the POST request will be stored. It should be a variable that will receive the server's response.
Command Flow
Build the Request: Uses the provided URL, query string, headers, and body to construct the POST request.
Send the Request: Sends the POST request to the specified server.
Store the Result: Saves the server's response in the variable specified by o_result.
Example Usage
Suppose you want to send a POST request to https://api.example.com/data, with a query string userId=123, headers including Content-Type: application/json, and a body with JSON data.

// Define variables
url = "https://api.example.com/data"
querystring = "userId=123"
headers = {"Content-Type": "application/json"}
body = '{"name": "Alice", "age": 30}'
response = ''

// Call the command to perform the POST request
RequestPost(url, querystring, headers, body, response)

// Return the request result via addResult
addResult(response)
In this example, the RequestPost() command will send a POST request to https://api.example.com/data with the provided query string, headers, and body. The server's response will be stored in the response variable, and this variable will be returned via addResult(response). The result of the request will be included in the final response.

ormCreateTable()
The ormCreateTable() command creates a new table in a database using the specified ORM (Object-Relational Mapping). This command defines the columns of the table and their data types, and stores a reference to the created table in a destination variable.

Parameters
fields
Type: value
Description: A string containing the names of the table columns, separated by commas. Each column name should correspond to a field in the table.
fieldsType
Type: value
Description: A string containing the data types for each column, separated by commas. The data types should be in the same order as the column names in fields.
dbaseName
Type: value
Description: The name of the database where the table will be created. It should be a string indicating the target database.
varTarget
Type: variable
Description: The variable in which the reference to the created table will be stored. It should be a variable that will receive the reference to the new table.
Command Flow
Define the Table: Uses the column names (fields) and their data types (fieldsType) to define the structure of the new table.
Create the Table: Creates the table in the database specified by dbaseName using the provided definition.
Store the Result: Saves the reference to the created table in the variable specified by varTarget.
Example Usage
Suppose you want to create a table called users in a database called myDatabase, with two columns: username of type VARCHAR and age of type INTEGER.

// Define variables
fields = "username,age"
fieldsType = "VARCHAR,INTEGER"
dbaseName = "myDatabase"
tableReference = ''

// Call the command to create the table
ormCreateTable(fields, fieldsType, dbaseName, tableReference)

// Return the reference to the created table via addResult
addResult(tableReference)
In this example, the ormCreateTable() command will create a table in the myDatabase database with the specified columns and data types. The reference to the new table will be stored in the tableReference variable, and this variable will be returned via addResult(tableReference). The output will include the reference to the created table.

ormCheckTable()
The ormCheckTable() command checks for the existence of a table in a specific database and stores the result in a destination variable. This command is useful for verifying if a table already exists before attempting further operations on it.

Parameters
dbaseName
Type: value
Description: The name of the database in which the table's existence should be checked. It should be a string indicating the database to check.
varTarget
Type: variable
Description: The variable in which the result of the check will be stored. It should be a variable that will receive a value indicating whether the table exists or not.
Command Flow
Check Existence: Accesses the database specified by dbaseName to verify if the requested table exists.
Store the Result: Saves the result of the check in the variable specified by varTarget. The stored value will indicate whether the table exists (True or False).
Example Usage
Suppose you want to check if a table called users exists in a database called myDatabase.

// Define variables
dbaseName = "myDatabase"
tableExists = ''

// Call the command to check the existence of the table
ormCheckTable(dbaseName, tableExists)

// Return the result of the check via addResult
addResult(tableExists)
In this example, the ormCheckTable() command will check for the existence of the users table in the myDatabase database. The result of the check (whether the table exists or not) will be stored in the tableExists variable, and this variable will be returned via addResult(tableExists). The output will reflect whether the table exists (True) or not (False).

ormAccessUpdate()
The ormAccessUpdate() command updates records in a database table based on the provided selection criteria. This command modifies the values of specified fields in a database using the corresponding values from variables.

Parameters
fields
Type: variable
Description: A string containing the names of the fields to be updated. The field names should be separated by commas.
fieldsValuesVariables
Type: variable
Description: A string containing the names of the variables holding the new values for the specified fields. The variable names should be separated by commas, in the same order as the fields in fields.
dbase
Type: variable
Description: The name of the database where the table to be updated is located. It should be a variable containing the name of the database.
selector
Type: variable
Description: A condition to select the records to be updated. It should be a string specifying the selection criteria in SQL format, such as id = 1.
varTarget
Type: variable
Description: The variable in which the result of the update operation will be stored. It should be a variable that will receive a value indicating whether the update was successful or not.
Command Flow
Define Fields and Values: Uses the field names (fields) and the variables with the values to be updated (fieldsValuesVariables) to define which records should be modified and with what data.
Select Records: Uses the condition provided in selector to identify the records to be updated.
Update the Database: Performs the update in the database specified by dbase, applying the changes to the records that meet the selector condition.
Store the Result: Saves the result of the update operation in the variable specified by varTarget. The stored value will indicate whether the update was successful (True) or failed (False).
Example Usage
Suppose you want to update the age field to 31 for the user with id equal to 1 in a database called myDatabase.

// Define variables
fields = "age"
fieldsValuesVariables = "newAge"
dbase = "myDatabase"
selector = "id = 1"
updateSuccess = ''

// Define the variable holding the new value
newAge = 31

// Call the command to update the record
ormAccessUpdate(fields, fieldsValuesVariables, dbase, selector, updateSuccess)

// Return the result of the update via addResult
addResult(updateSuccess)
In this example, the ormAccessUpdate() command will update the age field in the myDatabase database for the record where id = 1. The new value for age is 31, stored in the newAge variable. The updateSuccess variable will store the result of the operation (whether it was successful or not), and this variable will be returned via addResult(updateSuccess).

ormAccessSelect()
The ormAccessSelect() command retrieves records from a table in a database based on the provided selection criteria. This command selects the desired fields and stores the results in a target variable.

Parameters
fields
Type: variable
Description: A string containing the names of the fields to be retrieved. The field names should be separated by commas.
dbase
Type: variable
Description: The name of the database from which records should be retrieved. It must be a variable containing the name of the database.
selector
Type: variable
Description: A condition to select the records to be retrieved. It must be a string specifying the selection criteria in SQL format, such as id = 1.
varTarget
Type: variable
Description: The variable in which the query results will be stored. It must be a variable that will receive a list of dictionaries, each representing a retrieved record.
Command Flow
Defining the Fields: Use the field names (fields) to specify which data should be retrieved.
Selecting Records: Use the condition provided in selector to identify which records should be selected from the database.
Retrieving Data: Access the database specified by dbase and retrieve the records that meet the selector condition, including only the specified fields.
Storing the Result: Save the query results in the variable specified by varTarget. The stored value will be a list of dictionaries, where each dictionary represents a retrieved record with the requested fields.
Example Usage
Suppose you want to retrieve the username field for all users where age is greater than 25 from a database called myDatabase.

// Define variables
fields = "username"
dbase = "myDatabase"
selector = "age > 25"
usersList = ''

// Call the command to retrieve the records
ormAccessSelect(fields, dbase, selector, usersList)

// Return the query results via addResult
addResult(usersList)
In this example, the ormAccessSelect() command will retrieve the username field for all users in the myDatabase database where age is greater than 25. The results will be stored in the usersList variable, and this variable will be returned via addResult(usersList). The output will be a list of dictionaries, each representing a user whose username has been retrieved.

ormAccessInsert()
The ormAccessInsert() command inserts a new record into a database table using the provided values for the fields. This command defines the fields and their corresponding values, and stores the result of the operation in a target variable.

Parameters
fields
Type: variable
Description: A string containing the names of the fields into which the values will be inserted. The field names should be separated by commas.
fieldsValuesVariables
Type: variable
Description: A string containing the names of the variables that hold the values to be inserted into the specified fields. The variable names should be separated by commas, in the same order as the fields in fields.
dbase
Type: variable
Description: The name of the database where the table into which the new record should be inserted is located. It must be a variable containing the name of the database.
varTarget
Type: variable
Description: The variable in which the result of the insertion operation will be stored. It must be a variable that will receive a value indicating whether the insertion was successful or not.
Command Flow
Defining the Fields and Values: Use the field names (fields) and the variables with the values to be inserted (fieldsValuesVariables) to define what data should be inserted.
Inserting into the Database: Perform the insertion of the new record into the database specified by dbase, using the provided values.
Storing the Result: Save the result of the insertion operation in the variable specified by varTarget. The stored value will indicate whether the insertion was successful (True) or failed (False).
Example Usage
Suppose you want to insert a new record into a table called users in a database called myDatabase, with values for username and age coming from the variables newUsername and newAge.

// Define variables
fields = "username,age"
fieldsValuesVariables = "newUsername,newAge"
dbase = "myDatabase"
insertSuccess = ''

// Define the variables with the new values
newUsername = "Alice"
newAge = 31

// Call the command to insert the new record
ormAccessInsert(fields, fieldsValuesVariables, dbase, insertSuccess)

// Return the result of the insertion via addResult
addResult(insertSuccess)
In this example, the ormAccessInsert() command will insert a new record into the myDatabase database in the users table. The values for username and age are provided by the newUsername and newAge variables. The insertSuccess variable will store the result of the operation (whether it was successful or not), and this variable will be returned via addResult(insertSuccess). The output will reflect whether the insertion was successful (True) or failed (False).

ormAI()
The ormAI() command uses an artificial intelligence model to convert a natural language query into an SQL statement, which is then executed against a database. This command processes a natural language query to generate an SQL statement that is executed on the table specified in the source parameter, and stores the result in a target variable.

Parameters
prompt
Type: variable
Description: A string in natural language that describes the query to be made. For example, "get the value of the row with id 5".
source
Type: variable
Description: The name of the table on which the generated query should be executed. It must be a variable containing the name of the table in the database.
TargetVariable
Type: variable
Description: The variable in which the result of the query will be stored. It must be a variable that will receive the result of the generated and executed SQL query.
Command Flow
Generating SQL Query: Use the artificial intelligence model to convert the prompt into an SQL statement. For example, if the prompt is "get the value of the row with id 5", the AI will generate the SQL query SELECT * FROM source WHERE id = 5;.
Executing the Query: Execute the generated SQL statement on the table specified in source.
Storing the Result: Save the result of the query execution in the variable specified by TargetVariable. The result will be the dataset retrieved by the executed SQL statement.
Example Usage
Suppose you want to retrieve all the data from the row with id equal to 5 from a table called users.

// Define variables
prompt = "get the value of the row with id 5"
source = "users"
queryResult = ''

// Call the command to process the query
ormAI(prompt, source, queryResult)

// Return the query result via addResult
addResult(queryResult)
In this example, the ormAI() command will convert the prompt into an SQL query: SELECT * FROM users WHERE id = 5;. This query will be executed on the users table, and the results will be stored in the queryResult variable. The queryResult variable will be returned via addResult(queryResult). The output will be the dataset retrieved by the executed SQL statement.

functionAI()
The functionAI() command uses an artificial intelligence model to convert a natural language description of a function or process into a code implementation, which is then executed and returns the result. This command converts a description provided in prompt into a function that operates on the data of the table specified in source, and stores the result in a target variable.

Parameters
prompt
Type: variable
Description: A string in natural language that describes the process or function to be executed. For example, "calculate the average of the salary column".
source
Type: variable
Description: The name of the table on which the generated function should be executed. It must be a variable containing the name of the table in the database.
TargetVariable
Type: variable
Description: The variable in which the result of the executed function or process will be stored. It must be a variable that will receive the result of the generated and executed code.
Command Flow
Generating Code: Use the artificial intelligence model to convert the prompt into a code implementation. For example, if the prompt is "calculate the average of the salary column", the AI will generate the code necessary to calculate the average of that column.
Executing the Code: Execute the generated code on the table specified in source.
Storing the Result: Save the result of the code execution in the variable specified by TargetVariable. The result will be the calculated value or the dataset produced by the executed code.
Example Usage
Suppose you want to calculate the average of the salary column in a table called employees.

// Define variables
prompt = "calculate the average of the salary column"
source = "employees"
averageSalary = ''

// Call the command to process the function
functionAI(prompt, source, averageSalary)

// Return the result of the function via addResult
addResult(averageSalary)
In this example, the functionAI() command will convert the prompt into a code implementation to calculate the average of the salary column in the employees table. The result of the calculation will be stored in the averageSalary variable, and this variable will be returned via addResult(averageSalary). The output will be the calculated average of the salary column.