Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

ragna

Query builder for datasets

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

ragna

Ragna Ragna is a query builder for projects written in Delphi, compatible with FireDAC and UniDAC components.

We created a channel on Telegram for questions and support:

⚙️ Installation

Installation is done using the boss install command:

bash
boss install ragna

If you choose to install manually, simply add the following folders to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path

pascal
../ragna/src/core
../ragna/src/helpers
../ragna/src/interfaces
../ragna/src/state
../ragna/src/types

⚡️ Quickstart

You need to use Ragna

pascal
uses Ragna;
  • Open query
delphi
begin
  Country.OpenUp;
end;
  • Open empty query
delphi
begin
  Country.OpenEmpty;
end;
  • Where
delphi
begin
  Country
    .Where(CountryName).Equals('Brazil')
    .OpenUp;
end;
  • Or
delphi
begin
  Country
    .Where(CountryName).Equals('Brazil')
    .&Or(CountryName).Equals('Canada')
    .OpenUp;
end;
  • And
delphi
begin
  Country
    .Where(CountryName).Equals('Brazil')
    .&And(CountryCapital).Equals('Brasilia')
    .OpenUp;
end;
  • Like
delphi
begin
  Country
    .Where(CountryName).Like('B')
    .OpenUp;
end;
  • Order
delphi
begin
  Country
    .Order(CountryName)
    .OpenUp;
end;
  • To JSON object
delphi
var
  LJson: TJSONObject;
begin
  LJson := Country.OpenUp.ToJSONObject;
end;
  • To JSON array
delphi
var
  LJson: TJSONArray;
begin
  LJson := Country.OpenUp.ToJSONArray;
end;

⚠️ License

Ragna is free and open-source middleware licensed under the MIT License.