RawSelect: when attributes aren't enough
Attribute-driven SQL is where most ORMs earn their keep. [TTable], [TColumn], [TJoin], a filter — and the framework hands you back typed entities. It covers 80% of real queries. The remaining 20% ...
Attribute-driven SQL is where most ORMs earn their keep. [TTable], [TColumn], [TJoin], a filter — and the framework hands you back typed entities. It covers 80% of real queries. The remaining 20% ...
Delphi has FireDAC. FireDAC already talks to SQLite, PostgreSQL, Firebird, SQL Server, MySQL, Oracle, and a handful of others. If connectivity is a solved problem, why does Trysil need a driver lay...
Trysil is code-first. You write a plain Delphi class, decorate it with [TTable], [TColumn], [TPrimaryKey] and the rest, and the framework does the mapping. That’s the model you’ve seen in every pos...
Every application eventually needs the same four things on its important tables: when was this row created, by whom, when was it last updated, by whom. Some applications also want a fifth and sixth...
In the first post we fetched every row with SelectAll<TPerson>. That’s fine when the table has ten rows. At ten thousand, it isn’t. This post walks through the three ways Trysil lets you fil...
I’d wanted to write an ORM since the .NET 2.0 days — though back then I didn’t even know what the word meant. The platform had everything you needed: attributes, generics, reflection. The pieces f...
You found Trysil on GitHub and want to try it. This post walks through everything between git clone and a working Delphi project that links against Trysil’s packages: cloning the repo, building for...
An ORM is one of those rare codebases where almost every textbook design pattern shows up because the problem forces it. You can’t build something that maps objects to relational tables, defers loa...
You have an Orders table. Each row references a Customer by ID. You want to list orders with the customer’s company name on the row — one query, one result set, no round trips. Traditional ORM ans...
The Unit of Work pattern is a classic. You hand an object a list of entities, you mutate them, and at commit time you get one transaction that reconciles memory with the database. Hibernate does it...