Skip to content

Commit f835ebc

Browse files
Create documentation #3
1 parent 59ddd19 commit f835ebc

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

README.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,108 @@
11
# ragna
2+
<b>Ragna</b> Ragna is a query builder for projects written in Delphi, compatible with FireDAC and UniDAC components.
3+
<br>We created a channel on Telegram for questions and support:<br><br>
4+
<a href="https://t.me/hashload">
5+
<img src="https://img.shields.io/badge/telegram-join%20channel-7289DA?style=flat-square">
6+
</a>
7+
8+
## ⚙️ Installation
9+
Installation is done using the [`boss install`](https://github.com/HashLoad/boss) command:
10+
``` sh
11+
boss install ragna
12+
```
13+
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*
14+
```
15+
../ragna/src/core
16+
../ragna/src/helpers
17+
../ragna/src/interfaces
18+
../ragna/src/state
19+
../ragna/src/types
20+
```
21+
22+
## ⚡️ Quickstart
23+
You need to use Ragna
24+
```pascal
25+
uses Ragna;
26+
```
27+
28+
* Open query
29+
```delphi
30+
begin
31+
Country.OpenUp;
32+
end;
33+
```
34+
35+
* Open empty query
36+
```delphi
37+
begin
38+
Country.OpenEmpty;
39+
end;
40+
```
41+
42+
* Where
43+
```delphi
44+
begin
45+
Country
46+
.Where(CountryName).Equals('Brazil')
47+
.OpenUp;
48+
end;
49+
```
50+
51+
* Or
52+
```delphi
53+
begin
54+
Country
55+
.Where(CountryName).Equals('Brazil')
56+
.&Or(CountryName).Equals('Canada')
57+
.OpenUp;
58+
end;
59+
```
60+
61+
* And
62+
```delphi
63+
begin
64+
Country
65+
.Where(CountryName).Equals('Brazil')
66+
.&And(CountryCapital).Equals('Brasilia')
67+
.OpenUp;
68+
end;
69+
```
70+
71+
* Like
72+
```delphi
73+
begin
74+
Country
75+
.Where(CountryName).Like('B')
76+
.OpenUp;
77+
end;
78+
```
79+
80+
* Order
81+
```delphi
82+
begin
83+
Country
84+
.Order(CountryName)
85+
.OpenUp;
86+
end;
87+
```
88+
89+
* To JSON object
90+
```delphi
91+
var
92+
LJson: TJSONObject;
93+
begin
94+
LJson := Country.OpenUp.ToJSONObject;
95+
end;
96+
```
97+
98+
* To JSON array
99+
```delphi
100+
var
101+
LJson: TJSONArray;
102+
begin
103+
LJson := Country.OpenUp.ToJSONArray;
104+
end;
105+
```
106+
107+
## ⚠️ License
108+
`Ragna` is free and open-source middleware licensed under the [MIT License](https://github.com/HashLoad/ragna/blob/master/LICENSE).

0 commit comments

Comments
 (0)