con un clic
isimplequery-contract
// The exact iSimpleQuery interface contract that all query drivers must implement. Reference for creating or reviewing drivers.
// The exact iSimpleQuery interface contract that all query drivers must implement. Reference for creating or reviewing drivers.
Validates all SimpleORM Delphi source files for Delphi 10.2 Tokyo+ compatibility. Checks inline vars, unit scoping, generics E2506, uses completeness, memory safety, .dpr structure, and conditional compilation. Run anytime to "lint" the project.
Delphi project file structure reference — .dpr vs .pas, .dproj, .res, .dfm. Templates for console and VCL projects.
CHANGELOG.md format reference and examples for the SimpleORM project.
Coding conventions and patterns for the SimpleORM Delphi project. Automatically loaded when writing or modifying Delphi code.
SimpleORM entity-to-database mapping via RTTI attributes. Complete reference for all attributes, property types, and relationship setup.
Horse/ExpxHorse integration patterns for SimpleORM — server auto-routing, client REST driver, serialization examples.
| name | isimplequery-contract |
| description | The exact iSimpleQuery interface contract that all query drivers must implement. Reference for creating or reviewing drivers. |
| user-invocable | false |
Rules are in
.claude/rules/isimplequery-contract.md— this skill provides the interface definition and usage reference.
iSimpleQuery = interface
['{6DCCA942-736D-4C66-AC9B-94151F14853A}']
function SQL: TStrings;
function Params: TParams;
function ExecSQL: iSimpleQuery;
function DataSet: TDataSet;
function Open(aSQL: String): iSimpleQuery; overload;
function Open: iSimpleQuery; overload;
function StartTransaction: iSimpleQuery;
function Commit: iSimpleQuery;
function Rollback: iSimpleQuery;
function &EndTransaction: iSimpleQuery;
function InTransaction: Boolean;
function SQLType: TSQLType;
end;
| Method | Returns | Purpose |
|---|---|---|
SQL | TStrings | Writable SQL text (DAO writes before Open/ExecSQL) |
Params | TParams | Query parameters (DAO writes before Open/ExecSQL) |
ExecSQL | Self | Executes INSERT/UPDATE/DELETE |
DataSet | TDataSet | Query result after Open |
Open(aSQL) | Self | Sets SQL and opens in one call |
Open | Self | Opens with SQL already set |
StartTransaction | Self | Begins transaction (check InTransaction first) |
Commit | Self | Commits active transaction |
Rollback | Self | Rolls back active transaction |
&EndTransaction | Self | Delegates to Commit |
InTransaction | Boolean | True if transaction is active |
SQLType | TSQLType | Database type (Firebird, MySQL, SQLite, Oracle) |
constructor Create(aConnection: TXxxConnection; aSQLType: TSQLType = TSQLType.Firebird);
class function New(aConnection: TXxxConnection; aSQLType: TSQLType = TSQLType.Firebird): iSimpleQuery;
| Driver | Connection Type | File |
|---|---|---|
| FireDAC | TFDConnection | SimpleQueryFiredac.pas |
| UniDAC | TUniConnection | SimpleQueryUnidac.pas |
| Zeos | TZConnection | SimpleQueryZeos.pas |
| RestDW | TRESTDWClientSQL | SimpleQueryRestDW.pas |
| Horse (REST) | HTTP URL string | SimpleQueryHorse.pas |
query.SQLquery.Paramsquery.Open then reads query.DataSetquery.ExecSQLquery.StartTransaction → operations → query.Commit (or Rollback on error)