Skip to content

Releases

Trysil 2.1.0

Choose a tag to compare

@davidlastrucci davidlastrucci released this 01 Nov 09:32

Trysil 2.1.0 is a minor release on top of 2.0.0.

Install it with the setup program

Download Trysil.Setup.exe and run it with Delphi closed. It finds the Delphi versions installed (10.3 to 13), downloads this release, builds the packages and the IDE Expert, and sets the Trysil variable and the library path of each IDE. It updates and uninstalls Trysil from the installed apps of Windows. The setup is not signed: the first time, SmartScreen asks you to click More info, then Run anyway. Its source is in Trysil.Setup. See the setup guide.

GetIt, Boss and the manual build keep working as before: see the installation guide.

What's new

  • OpenAPI: the new Trysil.OpenAPI package generates the OpenAPI 3.1 document of a TTHttpServer<C> and serves it on /openapi.json, schemas and validation constraints included.
  • Registered entity events: TTEntityEvents<T> and TTEventRegistration keep the business rules out of the entity unit, so a model regenerated by the Expert no longer takes them with it.
  • Generic CRUD over HTTP: TTHttpEntityReader<T> and TTHttpEntityWriter<T> carry the standard operations for any entity; your controllers declare the routes and delegate.
  • HTTP server: AddBindAddress to choose the listening addresses, Routes, RegisterControllerClass, [TNotSqid], and with Sqids on the HTTP filter reads ids as sqids.
  • ORM: entities are read through a forward-only dataset, about a third less memory on large reads; eager relations load also when the entity has a read-only ID; TTLazyList<T>.AddEntity is public; TTFilter.AddWhere, constructors for TTFireDACConnectionParameters, read-only values on the validation attributes, OldEntity nil in the events of an insert.
  • JSON: four named presets on TTJSonSerializerConfig; an eager relation goes through JSON and OpenAPI like a TTLazy<T>, key and nested object.
  • Expert: the entity model wizard writes the rules units too; folders and unit names of rules and controllers are settings.

Before you upgrade

A few changes need attention, each marked Breaking in the changelog:

  • the packages are named without the Delphi version: requires Trysil, Trysil.JSon; instead of requires Trysil370, Trysil.JSon370; (the .bpl keeps its name, Trysil370.bpl);
  • an event class with a constructor of its own takes the operation as third parameter;
  • a class derived from TLengthAttribute that calls the Length function writes System.Length;
  • a routed method whose parameters cannot serve its route is refused at registration;
  • the demo translation units are split by package.

Trysil 2.0.0

Choose a tag to compare

@davidlastrucci davidlastrucci released this 20 Sep 15:24

Trysil 2.0.0

A major release: 22 compilation breaks and 84 breaks the compiler does not catch, all described in the changelog.

Upgrading from 1.0.0 takes an afternoon. Start with the upgrade guide, which lists them in the order you meet them, and read the ## 2.0.0 section of CHANGELOG.md end to end: several changes are observable without being source-incompatible.

Highlights

  • Audit columns that mean something: Update<T> no longer rewrites the creation and delete pairs, and no change tracking column is read from a JSON body.
  • Currency end to end, as a fixed-point decimal on all seven engines.
  • Identifiers quoted in the statements Trysil builds: table, column, join alias, sequence, filter builder, ORDER BY.
  • Start-up refuses mappings that cannot work, instead of failing at the first query.
  • Text LOBs on all seven engines.
  • Transactions: RunInTransaction, TTTransaction with RollbackOnDestroy, and a rollback that rewinds what Trysil wrote to the entities.

Built for Delphi 11 and 13; the package sets for 10.3, 10.4 and 12 are kept aligned.

v1.0.0

Choose a tag to compare

@davidlastrucci davidlastrucci released this 07 Apr 15:01

First official release of Trysil

A modern, lightweight ORM for Delphi.

Highlights

Change Tracking & Soft Delete: [TCreatedAt], [TCreatedBy], [TUpdatedAt], [TUpdatedBy], [TDeletedAt], [TDeletedBy]
FilterBuilder: fluent query builder with Where, AndWhere, OrWhere, operators, ordering, paging
Save & SaveAll: automatic insert or update
ApplyAll: batch insert + update + delete in a single transaction
4 database drivers: SQLite, PostgreSQL, SQL Server, Firebird (all via FireDAC)
JSON module: entity serialization/deserialization
HTTP module: REST hosting with attribute-based routing, JWT, CORS, multi-tenant
Delphi 10.3 to 13 Florence support

See CHANGELOG.md for full details and ROADMAP.md for what's next.