Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashload/ragna
Query builder for datasets
https://github.com/hashload/ragna
builder dataset delphi query sql
Last synced: 4 days ago
JSON representation
Query builder for datasets
- Host: GitHub
- URL: https://github.com/hashload/ragna
- Owner: HashLoad
- License: mit
- Created: 2018-08-16T17:45:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-27T15:50:30.000Z (over 1 year ago)
- Last Synced: 2024-04-14T00:32:23.470Z (7 months ago)
- Topics: builder, dataset, delphi, query, sql
- Language: Pascal
- Homepage:
- Size: 78.1 KB
- Stars: 60
- Watchers: 9
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing 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`](https://github.com/HashLoad/boss) command:
``` sh
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*
```
../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](https://github.com/HashLoad/ragna/blob/master/LICENSE).