Technical Notes v. 6.0
NEW UTILITIES INCLUDED FROM THIS VERSION
- Cosmos Data. Cosmos Data is a Cosmos utility that allows to query and export data from a MultiBase/CTSQL database in a simple and intuitive way, and store queries to access them later. (PDF version)
- Cosmos WebServer. Cosmos WebServer (CWS) is a utility that allows you to use Cosmos as a web services provider, allowing you to create REST services. (PDF version)
- Cosmos as application server.
- New JSON class.
- CosmosData. In this version is distributed an application developed in Cosmos that allows to extract the data of a database in a comfortable and agile way for its later study and valuation. The queries can be done graphically from a repository. These queries can be saved for later use and/or modified if necessary.
- New library Cosregexpdll that allows you to search for text in files and in strings of chars using regular expressions.
- New method of Array class that allows to sort the array.
- Check box in tree lists.
In order to use the check box in tree lists the next methods and events has been implemented in the SimpleControl class: SetListCheckable method, IsNodeChecked method, SetNodeChecked method , ListRowChecked event and ListRowUnchecked event.
- Events. New event On Click in List Box controls.
The ability to export a list to Excel does not display the message asking the user to open the generated document. Implementation of the ASKWHENEXPORTS environment variable..
- Code Insight. Possibility to select the item in the list automatically by pressing the [Enter] key. Only allowed when the item is unique in the list..
- Code Insigth. Added a new option that allows you to choose the Code Insight search mode. In the "Settings" window of the development environment a "Deep search" checkbox has been added. If this box is checked, pressing the [.] (Dot) key will search for the token in the includes and libraries with which the module links (this will be the default operation mode). If it is not checked the box will look only in the current module.
- Development environment. In the "Find in files" option, when an item is selected from the list, the cursor will be positioned at the beginning of the search string..
- CTSQL. Implementation of derived tables in the FROM clause.
A derived table in the FROM clause is a subselect that is placed after the FROM statement of the query.
The derived table only exists in the query in which it is executed, that is, it is not part of the schema of the database.
CTSQL. The SQL function count() supports as a parameter a column name, in which case it returns the number of non-null records in the indicated column.
- CTSQL. Ability to use double quotes in SQL syntax to refer to identifiers (tables, columns).
To do this, you must define the environment variable ALLOWQUOTEDIDENTIFIERS = YES.
CTSQL. Allow, within the to_char function, that the nlsparam parameter values support double quotes for the NLS_NUMERIC_CHARACTERS, NLS_ISO_CURRENCY, and NLS_CURRENCY variables.
CSQL. Ability to execute the SQL file that receives as parameter the csql command without having to open it and press the execute option.
CSQL. A keyboard accelerator has been added to execute the marked statement: [CTRL] + [ENTER].
- ODBC_DISALLOW_FOR_UPDATE_ON_LOCK. ODBC connection variable. This variable will need to be defined when modifying a record with the EditUpdate method; The SQL statement sent by Cosmos will not carry a "for update" clause to block the record.
- ASKWHENEXPORTS. If the ASKWHENEXPORTS variable is defined with FALSE value, the runtime will not ask for the user the and will not open the document after export the data with the ExportToExcel method.
- ALLOWQUOTEDIDENTIFIERS. This variable must be defined whenever double quotes are required to refer to column and/or table identifiers in SQL statements.
It must be defined in the engine configuration file (ctsql.ini) or in the "Environment" section of the project configuration file or Cosmos configuration file.
Los allowed values are YES and NO.
If the value is YES, the identifiers of tables and columns can be indicated in double quotation marks.
- RUNCMDEXT. Environment variable that tells the RunCmdExt command the command line to run.
JSON is a text format for data exchange in which you can store numbers, strings, boolean values, arrays and objects.
- LoadFromFile. Loads a JSON class object from a file.
- LoadFromChar. Loads a JSON class object from a Char object or string.
- SaveToFile. Saves an object of the JSON class to a file.
- Trace. Displays a message box with the JSON object value.
- Set. Adds a new property or modifies an existing Char, Numeric, Boolean or JSON class object.
- SetValue. Assigns a value to a JSON object. If the object of the JSON class already has a value assigned, it modifies it.
- Clear. Cleans a JSON class object by deleting its children.
- Delete. Removes a property from an object of the JSON class.
- SetAsArray. Indicates that a JSON object is array type.
- AddArrayElement. Add a value or a JSON object to an object of the JSON class of array type.
- Get. This method returns an object of the JSON class which is a copy of the object of the JSON class whose name or path has been passed as a parameter.
- GetType. This function returns a string with the name of the element type of the object or property of the JSON class.
- GetSize. Returns the number of child elements of a JSON object of type Object or Array.
- GetString. Returns a string with the object's representation of the JSON class.
- public operator = (oJson as JSON)
This method allows you to assign an exact copy of the indicated JSON object to an object of the JSON class.
- public conversor Char
The JSON class has converters to the Char class. This converter performs the same function as the GetString method, but always returns the string value of the JSON without formatting.
- Sort. This method allows you to sort the elements of an array. The arrays that allow this action are integer, smallint, decimal, date, time, datetime, char, boolean and struct.
- BinarySearch. This method allows to perform a binary search of a previously ordered array element.
- AnsiToUTF8. This method converts a character string from ANSI to UTF8.
- UTF8ToAnsi. This method converts a character string from UTF8 to ANSI.
- SetExecStatus. This method allows assigning a value to a global internal variable of Cosmos.
- GetExecStatus. This method allows you to query the value assigned to the global internal variable of Cosmos using the SetExecStatus.
- SetListCheckable. This method allows you to display a check box on items in a tree list.
- SetNodeChecked. This method allows you to modify the check box status of a node in a tree list.
- IsNodeChecked. Allows you to check the status of the node's check box.
- RunCmdExt. Command of Form Class. It allows invoking, from a form (FormTable), a command indicated in the variable RUNCMDEXT.
The events implemented in version 6.0 of Cosmos are as follows:
- ListRowChecked. This event will be thrown when the check box for a node in a tree list is checked.
- ListRowUnchecked. This event will be thrown when you uncheck the check box for a node in a tree list.
- Click in List Box controls.
This new dll allows to search text patterns in strings or in files using regular expressions.
- CosNewRegExpr. This function allows to search text patterns in strings or in files using regular expressions.
This function will return the identifier of the search that will later be used in the rest of functions of this library.
- CosGetNumMatchesRegExpr. This function returns the number of matches of the regular expression found in the character string or in the file.
- CosGetMatchRegExpr. This function returns the nth match of the regular expression in the text indicated in the search. This function gives the initial position in which the match within the chain has been found.
- CosFreeRegExpr. This function frees memory from the search of the regular expression made with the call to the function CosNewRegExpr.
Cosmos version 6.0 you can execute an SQL file from the command line using the csql command.
In this version, we have performed corrections in the following components:
- Database manager
- Code Insight