Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3f325c5
added boss.json
Oct 2, 2018
8b744fc
Create README.md
snakeice Oct 2, 2018
578f36b
Create LICENSE
snakeice Oct 2, 2018
3ee3406
Update boss.json
hunsche Oct 4, 2018
d880820
hotfix singleton sqls
hunsche Oct 8, 2018
a51a711
hot fix pointer fdquery
hunsche Oct 9, 2018
f9428ec
adjusted states
hunsche Oct 9, 2018
958fc19
Update Ragna.Impl.pas
hunsche Oct 9, 2018
73d9a32
Update Ragna.Impl.pas
hunsche Oct 9, 2018
0a5c77b
Update Ragna.State.pas
hunsche Oct 9, 2018
670d870
Update Ragna.Impl.pas
hunsche Oct 9, 2018
eb0a2ce
Added support to def connections
snakeice Apr 3, 2019
15b1452
Adjusted call of destroy method
snakeice Apr 17, 2019
773edb6
Adjusted destroy call
snakeice Apr 18, 2019
0389220
added equals string
snakeice May 30, 2019
a67c522
Delete .gitmodules
snakeice Jun 2, 2019
9993ebd
adjusted default criteria
snakeice Jun 3, 2019
1c70830
Merge branch 'master' of github.com:HashLoad/ragna
snakeice Jun 3, 2019
420c31a
changed open empty validation to work in all dbs
snakeice Jun 6, 2019
4040c0a
Rename Delete to Remove
hunsche Jun 18, 2019
d649ed3
Rename Delete to Remove
hunsche Jun 18, 2019
443ac72
Adjusted dproj
hunsche Jun 18, 2019
5ab3523
updated modules
snakeice Jul 26, 2019
5eb8b98
Specific message if ConnectionDefs is nil
CarlosHe Jul 31, 2019
00265cf
Merge pull request #1 from CarlosHe/master
snakeice Aug 26, 2019
931934e
Organization
viniciussanchez Apr 15, 2020
0c33ba2
Created record helper to Operators
viniciussanchez Apr 15, 2020
47368ad
Added OpenEmpty function
viniciussanchez Apr 15, 2020
aa13e5e
Added const parameters
viniciussanchez Apr 15, 2020
e660811
Remove StartCriteria
viniciussanchez Apr 15, 2020
a40ef00
Removed EndCriteria
viniciussanchez Apr 15, 2020
6cbf0d2
Added overload Order method
viniciussanchez Apr 15, 2020
a5aafb0
Criteria improvements
viniciussanchez Apr 15, 2020
46cbd66
Improvements
viniciussanchez Apr 15, 2020
0d6662d
Update gitignore
viniciussanchez Apr 15, 2020
ef33d33
Merge pull request #2 from viniciussanchez/master
viniciussanchez Apr 15, 2020
39b4881
Improvements class helper
viniciussanchez May 16, 2020
dfc61d7
Merge pull request #1 from HashLoad/master
viniciussanchez May 16, 2020
10ef5e9
Implement ToJSONObject and ToJSONArray #4
viniciussanchez May 16, 2020
73df1be
Merge pull request #5 from viniciussanchez/master
viniciussanchez May 17, 2020
5eba059
fixing stack overflow in tojsonobject and tojsonarray
Valdeirsk8 Sep 12, 2020
0d408e3
Merge pull request #7 from Valdeirsk8/FixingStackOverFlow
viniciussanchez Sep 12, 2020
c7c1297
Owns false to load from json
viniciussanchez Oct 7, 2020
7686b99
fix UpdateById
Sep 11, 2021
17c2dc3
Merge pull request #11 from jmjardim05/fixUpdateById
viniciussanchez Sep 11, 2021
41c9960
#12 #8
viniciussanchez May 3, 2022
59ddd19
Samples
viniciussanchez May 3, 2022
f835ebc
Create documentation #3
viniciussanchez May 3, 2022
7b28e55
Remove warnings
viniciussanchez Feb 1, 2023
e07db38
Bug fix OpenEmpty
viniciussanchez Feb 28, 2023
7390f69
Bug fix GetTableName
viniciussanchez Feb 28, 2023
892b25e
Bug fix
viniciussanchez Feb 28, 2023
43c516f
Implementação de métodos onde a "Key" é um TGuid.
EvertonGarcia Jun 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 45 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
dist/
**/Win32/
**/Win64/
**/Linux64/
**/__history/
**/__recovery/
src/*.~*
# Uncomment these types if you want even more clean repository. But be careful.
# It can make harm to an existing project source. Read explanations below.

# Resource files are binaries containing manifest, project icon and version info.
# They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files.
*.res

# Type library file (binary). In old Delphi versions it should be stored.
# Since Delphi 2009 it is produced from .ridl file and can safely be ignored.
#*.tlb
#
# Diagram Portfolio file. Used by the diagram editor up to Delphi 7.
# Uncomment this if you are not using diagrams or use newer Delphi version.
#*.ddp
#
# Visual LiveBindings file. Added in Delphi XE2.
# Uncomment this if you are not using LiveBindings Designer.
#*.vlb
#
# Deployment Manager configuration file for your project. Added in Delphi XE2.
# Uncomment this if it is not mobile development and you do not use remote debug feature.
#*.deployproj
#
# C++ object files produced when C/C++ Output file generation is configured.
# Uncomment this if you are not using external objects (zlib library for example).
#*.obj

# Delphi compiler-generated binaries (safe to delete)
*.exe
*.dll
*.bpl
Expand All @@ -23,14 +43,27 @@ src/*.~*
*.a
*.o
*.ocx

# Delphi autogenerated files (duplicated info)
*.cfg
*.hpp
*Resource.rc

# Delphi local files (user-specific info)
*.local
*.identcache
*.projdata
*.tvsconfig
*.skincfg
*.dsk
*.dcu
*.exe
*.so

# Delphi history and backups
__history/
__recovery/
*.~*
*.a
*.stat

# Castalia statistics file (since XE7 Castalia is distributed with Delphi)
*.stat

# Boss dependency manager vendor folder https://github.com/HashLoad/boss
modules/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 HashLoad

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
108 changes: 108 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# ragna
<b>Ragna</b> Ragna is a query builder for projects written in Delphi, compatible with FireDAC and UniDAC components.
<br>We created a channel on Telegram for questions and support:<br><br>
<a href="https://t.me/hashload">
<img src="https://img.shields.io/badge/telegram-join%20channel-7289DA?style=flat-square">
</a>

## ⚙️ 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).
14 changes: 14 additions & 0 deletions boss-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"hash": "b14e6a77427d10f868e9622e3b2074b0",
"updated": "2022-05-03T11:38:24.2808549-03:00",
"installedModules": {
"github.com/viniciussanchez/dataset-serialize": {
"name": "dataset-serialize",
"version": "v2.4.0",
"hash": "f47b044fca0d9bb347f856798fb20cad",
"artifacts": {},
"failed": false,
"changed": false
}
}
}
11 changes: 11 additions & 0 deletions boss.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "ragna",
"description": "",
"version": "1.0.0",
"homepage": "",
"mainsrc": "src",
"projects": [],
"dependencies": {
"github.com/viniciussanchez/dataset-serialize": "^v2.4.0"
}
}
1 change: 0 additions & 1 deletion modules/DataSetConverter4Delphi
Submodule DataSetConverter4Delphi deleted from 196f36
47 changes: 47 additions & 0 deletions ragna.dpk
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package ragna;

{$R *.res}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION OFF}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES ON}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DEFINE DEBUG}
{$ENDIF IMPLICITBUILDING}
{$RUNONLY}
{$IMPLICITBUILD ON}

requires
rtl,
dbrtl,
FireDAC,
FireDACCommonDriver,
FireDACCommon;

contains
Ragna.Intf in 'src\interfaces\Ragna.Intf.pas',
Ragna.Criteria.Intf in 'src\interfaces\Ragna.Criteria.Intf.pas',
Ragna.Criteria.Impl in 'src\core\Ragna.Criteria.Impl.pas',
Ragna.Impl in 'src\core\Ragna.Impl.pas',
Ragna in 'src\helpers\Ragna.pas',
Ragna.State in 'src\state\Ragna.State.pas',
Ragna.Types in 'src\types\Ragna.Types.pas';

end.
Loading