Codolex 2.5.0 aims to improve existing components and offer stability. We added features such as the expression editor to components that did not receive the editor update earlier. Expanded on the REST activity to include pagination and resolved quite a few bugs. This all makes version 2.5.0 a must have when you look to include Codolex in your development process.
Highlights
REST Activity pagination
As mentioned in the intro, we added a pagination option in the REST activity. There are quite a few API’s that use this structure because of large data heaps.
Use the pagination option in this case to get all the records directly into a List variable, instead of performing the call in a loop and adding the results together manually.
You can specify in the activity where the parameters for page size and number have to go in the request, and if all objects or just this page should be returned.
The latter can be useful if the API does not support a structure that the current activity can make use of, but we will include more options later on.
With this change, the result options are also expanded.
This was needed for the pagination changes, the result of that is a collection, and that option is now available.
You can get your results in JSON or let the activity directly convert that JSON to an entity.
Windows authentication for local datasources
Some databases enable windows authentication, for example, sequel server. So to make connecting with these databases easier we added the option of using the windows authentication.
Other improvements
Api folder added to search path
The .API folder used for flows exposed as API, is now added to the search path by default. This allows you to make use of the API and start it in the same Delphi project without having to include the files yourself.
Expand/collapse in project explorer
With larger projects, the project explorer collapses the modules and flow classes by default. It’s still possible to expand them all in one click, but to improve the overview of large projects, the collapse can be a useful feature.
Highlight the open flow in the explorer
The open flow in the editor is highlighted in the explorer. This improves clarity when switching between flows rapidly.
Parse collection from entity to JSON
The activity can make use of a collection of entities, and convert it to a JSON collection.
Close all in search results closes the results tab.
This works better in the codolex app vs. the IDE.
Expression added to more activities
For some activities, the editor was not yet updated to the new expression editor. For example the show dialog.
We added this to the activities where it just made sense to use the editor.
New activity: Clone entity
Instead of the existing copy attributes activity, the clone entity activity makes a new object from a current entity.
Class variable is available in more places.
In activities where a variable can be selected, the class variable is now directly available as option.
OpenAI Chat improvement
We added the option to select a role, more about roles: https://platform.openai.com/docs/guides/chat-completions/overview
JSON date/time conversion
When importing or exporting data, the format YYYY-MM-DD HH:MM:SS (ISO 8601) is recognized and used to directly work with date time attributes.
Validations for flow names
We added better validation for flow names. Especially with duplicate names after adding or editing the name.
Adding flows with the same name or an empty name could lead to errors, so we wanted to prevent errors instead of solving them.
Validations for database file
When the database (e.g. sqlite db) is an referenced file. The local datasource connection tries to check if there is a file on the given location before trying to connect.
Updated support for TArray type
Some activities needed a custom array variable to make use of an array, this results from the activity being added before the addition of the array.
We corrected the activities to offer the correct array type as possibility.
Bugfixes
•Error message when loading a .BPL file now shows the whole bpl name.
•View entities are now always generated after the entities they are based on to prevent errors
•Copy of an activity with an exception handler no longer results in a left over sequence.
•Added a fix for the project explorer visibility in D12.1.
•The datasource view for one to many associations had the wrong direction. we changed the direction to make the view matching with the structure.
•Removed warning when using the result of execute command as flow result.
•Resolved a compile error when using a JSON entity with a parent and attribute with the same name.
•Resolved some memory leaks.
•Activity palette is now scrolled to the top instead of bottom after opening a flow.
•Using an attribute of a flow class entity in a decision does no longer result in an error.
•Used the right order for attributes in the create/change variable editor.
•Resolved an error where MVC Framework files could interfere with each other after installation.
•Fixed an issue with remainder name in the math calculation activity using integer division.
•Corrected the naming for ‘squared’ and ‘square root’ in the math calculation activity.