Delphi-RAG-Lint

drag-lint help

Generate the lookup layer interface unit from the field repository

Since: 1.62.0-alpha

Writes DLLookupLayerIntf.pas (and with --impl orm3 the ORM3 lookup units) into a client folder; dry run by default, backup on --apply.

Read this when a client needs the repository-driven lookup layer. drag-lint repo gen-lookup-layer --repo <file> --client-dir <folder> prints the unit it would write; --apply writes DLLookupLayerIntf.pas with a backup (--no-backup skips it). --impl orm3 adds the ORM3 units but refuses a client folder inside COMMON\OBJECTS.

How to run it

drag-lint repo gen-lookup-layer (--repo <file> | --project <project file>) --client-dir <folder> [--server-dir <folder>] [--impl none|orm3] [--table <T,...>] [--apply [--no-backup]] [--json]

Full flag list: repo in the CLI reference.

Flags

FlagArgumentMeaningDefault
--repo<file>
--project<project file>
--client-dir<folder>
--server-dir<folder>
--implnone|orm3
--table<T,...>
--apply
--no-backup
--json

Where to click

No IDE surface: this feature runs from the CLI (see How to run it).

Details

drag-lint repo gen-lookup-layer (--repo <file> | --project <project file>) --client-dir <folder> [--server-dir <folder>]
                                [--impl none|orm3] [--table <T,...>] [--apply [--no-backup]] [--json]

Writes the repository-driven lookup layer into a client project: the interface unit DLLookupLayerIntf.pas, byte for byte the one the ORM3 CLIENT carries, into --client-dir. With --server-dir the server side is part of the plan as well.

Dry run by default. Without --apply the verb prints the plan (the unit it would write, the project line to add and the owner step) and writes nothing. --apply writes the unit; a second run reports it unchanged. A file that changes is backed up first; --no-backup skips the backup (it is on by default, as in repo gen-dataservice).

--impl. none (the default) writes the interface unit only. orm3 also writes the ORM3 implementation units. --impl orm3 is refused with exit 1, naming the folder, when --client-dir is inside \COMMON\OBJECTS (the shared ORM3 objects folder is not a place for generated units). An unknown --impl value is a usage error.

--table limits the layer to the named tables. --json prints one object whose summary carries the counts (written, unchanged) and the owner step.

Exit 0 ok, 1 a missing --client-dir, a missing folder, the COMMON\OBJECTS refusal or a write failure, 2 usage.


All features | CLI reference | IDE menus