Skip to content

Commit f71d162

Browse files
committed
push new sample
1 parent 83f4e69 commit f71d162

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3499
-1049
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,4 @@ __recovery/
6565
# Castalia statistics file (since XE7 Castalia is distributed with Delphi)
6666
*.stat
6767

68-
*.bin
69-
70-
# Boss dependency manager vendor folder https://github.com/HashLoad/boss
71-
modules/
68+
*.bin

README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
<p align="center">
2-
<a href="https://github.com/bittencourtthulio/SimpleORM/blob/master/assets/logo.fw.png">
3-
<img alt="router4d" src="https://github.com/bittencourtthulio/SimpleORM/blob/master/assets/logo.fw.png">
4-
</a>
5-
</p>
6-
<br>
7-
<p align="center">
8-
<img src="https://img.shields.io/github/v/release/bittencourtthulio/SimpleORM?style=flat-square">
9-
<img src="https://img.shields.io/github/stars/bittencourtthulio/SimpleORM?style=flat-square">
10-
<img src="https://img.shields.io/github/contributors/bittencourtthulio/SimpleORM?color=orange&style=flat-square">
11-
<img src="https://img.shields.io/github/forks/bittencourtthulio/SimpleORM?style=flat-square">
12-
<img src="https://tokei.rs/b1/github/bittencourtthulio/SimpleORM?color=red&category=lines">
13-
<img src="https://tokei.rs/b1/github/bittencourtthulio/SimpleORM?color=green&category=code">
14-
<img src="https://tokei.rs/b1/github/bittencourtthulio/SimpleORM?color=yellow&category=files">
15-
</p>
16-
17-
181
# SimpleORM
192
ORM Simples para Aplicações Delphi
203

@@ -27,7 +10,6 @@ Homologado para os drivers de Conexão Firedac e RestDataware.
2710

2811
#### Gerador de Classes para o SimpleORM criados pela Comunidade
2912

30-
[davisouzatb](https://github.com/davisouzatb/SimpleORMrClassGenerator)</br>
3113
[andersonlugarinhoramos](https://github.com/andersonlugarinhoramos/geradorsimpleorm)</br>
3214
[alan-petry](https://github.com/alan-petry/GeraClassesSimpleORM)</br>
3315
[Douglas09](https://github.com/Douglas09/GeradorDeClasses_SimpleORM_MySql)</br>
@@ -96,10 +78,6 @@ Obs.: Em casos como o "Campo('ID')" a anotação é opcional, pois a `property`
9678
## Instalação
9779
Basta adicionar ao LibraryPatch o Caminho do SimpleORM ou via [Boss](https://github.com/HashLoad/boss) com o comando `boss install bittencourtthulio/SimpleORM`, não precisa realizar a instalação de nenhum componente.
9880

99-
## Dependências
100-
- DataSetConverter4Delphi
101-
- Rest Dataware CORE
102-
10381
## Uses Necessárias
10482

10583
SimpleInterface,
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/delphi
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=delphi
4+
5+
### Delphi ###
6+
# Uncomment these types if you want even more clean repository. But be careful.
7+
# It can make harm to an existing project source. Read explanations below.
8+
#
9+
# Resource files are binaries containing manifest, project icon and version info.
10+
# They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files.
11+
#*.res
12+
# Type library file (binary). In old Delphi versions it should be stored.
13+
# Since Delphi 2009 it is produced from .ridl file and can safely be ignored.
14+
#*.tlb
15+
# Diagram Portfolio file. Used by the diagram editor up to Delphi 7.
16+
# Uncomment this if you are not using diagrams or use newer Delphi version.
17+
#*.ddp
18+
# Visual LiveBindings file. Added in Delphi XE2.
19+
# Uncomment this if you are not using LiveBindings Designer.
20+
#*.vlb
21+
# Deployment Manager configuration file for your project. Added in Delphi XE2.
22+
# Uncomment this if it is not mobile development and you do not use remote debug feature.
23+
#*.deployproj
24+
# C++ object files produced when C/C++ Output file generation is configured.
25+
# Uncomment this if you are not using external objects (zlib library for example).
26+
#*.obj
27+
28+
# Delphi compiler-generated binaries (safe to delete)
29+
*.exe
30+
*.dll
31+
*.bpl
32+
*.bpi
33+
*.dcp
34+
*.so
35+
*.apk
36+
*.drc
37+
*.map
38+
*.dres
39+
*.rsm
40+
*.tds
41+
*.dcu
42+
*.lib
43+
*.a
44+
*.o
45+
*.ocx
46+
47+
# Delphi autogenerated files (duplicated info)
48+
*.cfg
49+
*.hpp
50+
*Resource.rc
51+
52+
# Delphi local files (user-specific info)
53+
*.local
54+
*.identcache
55+
*.projdata
56+
*.tvsconfig
57+
*.dsk
58+
59+
# Delphi history and backups
60+
__history/
61+
__recovery/
62+
*.~*
63+
64+
# Castalia statistics file (since XE7 Castalia is distributed with Delphi)
65+
*.stat
66+
67+
# Boss dependency manager vendor folder https://github.com/HashLoad/boss
68+
modules/
69+
70+
# End of https://www.toptal.com/developers/gitignore/api/delphi
Binary file not shown.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<ProjectGuid>{E28206FD-740A-41A1-BC73-8405921ED818}</ProjectGuid>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<Projects Include="SimpleORM_Intensive.dproj">
7+
<Dependencies/>
8+
</Projects>
9+
<Projects Include="..\intensivepkg\model.dproj">
10+
<Dependencies/>
11+
</Projects>
12+
<Projects Include="..\..\Nova pasta (2)\Project1.dproj">
13+
<Dependencies/>
14+
</Projects>
15+
</ItemGroup>
16+
<ProjectExtensions>
17+
<Borland.Personality>Default.Personality.12</Borland.Personality>
18+
<Borland.ProjectType/>
19+
<BorlandProject>
20+
<Default.Personality/>
21+
</BorlandProject>
22+
</ProjectExtensions>
23+
<Target Name="SimpleORM_Intensive">
24+
<MSBuild Projects="SimpleORM_Intensive.dproj"/>
25+
</Target>
26+
<Target Name="SimpleORM_Intensive:Clean">
27+
<MSBuild Projects="SimpleORM_Intensive.dproj" Targets="Clean"/>
28+
</Target>
29+
<Target Name="SimpleORM_Intensive:Make">
30+
<MSBuild Projects="SimpleORM_Intensive.dproj" Targets="Make"/>
31+
</Target>
32+
<Target Name="model">
33+
<MSBuild Projects="..\intensivepkg\model.dproj"/>
34+
</Target>
35+
<Target Name="model:Clean">
36+
<MSBuild Projects="..\intensivepkg\model.dproj" Targets="Clean"/>
37+
</Target>
38+
<Target Name="model:Make">
39+
<MSBuild Projects="..\intensivepkg\model.dproj" Targets="Make"/>
40+
</Target>
41+
<Target Name="Project1">
42+
<MSBuild Projects="..\..\Nova pasta (2)\Project1.dproj"/>
43+
</Target>
44+
<Target Name="Project1:Clean">
45+
<MSBuild Projects="..\..\Nova pasta (2)\Project1.dproj" Targets="Clean"/>
46+
</Target>
47+
<Target Name="Project1:Make">
48+
<MSBuild Projects="..\..\Nova pasta (2)\Project1.dproj" Targets="Make"/>
49+
</Target>
50+
<Target Name="Build">
51+
<CallTarget Targets="SimpleORM_Intensive;model;Project1"/>
52+
</Target>
53+
<Target Name="Clean">
54+
<CallTarget Targets="SimpleORM_Intensive:Clean;model:Clean;Project1:Clean"/>
55+
</Target>
56+
<Target Name="Make">
57+
<CallTarget Targets="SimpleORM_Intensive:Make;model:Make;Project1:Make"/>
58+
</Target>
59+
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
60+
</Project>
Binary file not shown.

Sample/ActiveRecord_Builder/boss.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "BoasPraticasCRUDNivel3",
3+
"description": "",
4+
"version": "1.0.0",
5+
"homepage": "",
6+
"mainsrc": "./",
7+
"projects": [],
8+
"dependencies": {
9+
"https://github.com/bittencourtthulio/simpleorm": "^2.02.04"
10+
}
11+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
unit intensive.Controller.Interfaces;
2+
3+
interface
4+
5+
uses
6+
FireDAC.Stan.Intf,
7+
FireDAC.Stan.Option,
8+
FireDAC.Stan.Error,
9+
FireDAC.UI.Intf,
10+
FireDAC.Phys.Intf,
11+
FireDAC.Stan.Def,
12+
FireDAC.Stan.Pool,
13+
FireDAC.Stan.Async,
14+
FireDAC.Phys,
15+
FireDAC.Phys.SQLite,
16+
FireDAC.Phys.SQLiteDef,
17+
FireDAC.Stan.ExprFuncs,
18+
FireDAC.Phys.SQLiteWrapper.Stat,
19+
FireDAC.VCLUI.Wait,
20+
FireDAC.Comp.UI,
21+
Data.DB,
22+
FireDAC.Comp.Client, intensive.Controller.DTO.Interfaces;
23+
24+
type
25+
iController = interface
26+
function Cliente : iClienteDTO;
27+
function Endereco : iEnderecoDTO;
28+
end;
29+
30+
implementation
31+
32+
end.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
unit intensive.Controller;
2+
3+
interface
4+
5+
uses
6+
FireDAC.Stan.Intf,
7+
FireDAC.Stan.Option,
8+
FireDAC.Stan.Error,
9+
FireDAC.UI.Intf,
10+
FireDAC.Phys.Intf,
11+
FireDAC.Stan.Def,
12+
FireDAC.Stan.Pool,
13+
FireDAC.Stan.Async,
14+
FireDAC.Phys,
15+
FireDAC.Phys.SQLite,
16+
FireDAC.Phys.SQLiteDef,
17+
FireDAC.Stan.ExprFuncs,
18+
FireDAC.Phys.SQLiteWrapper.Stat,
19+
FireDAC.VCLUI.Wait,
20+
FireDAC.Comp.UI,
21+
Data.DB,
22+
FireDAC.Comp.Client,
23+
intensive.Controller.Interfaces,
24+
intensive.Model.Entity.Cliente, intensive.Services.Generic,
25+
intensive.Controller.DTO.Interfaces, intensive.Controller.DTO.Cliente,
26+
intensive.Controller.DTO.Endereco;
27+
28+
type
29+
TController = class(TInterfacedObject, iController)
30+
private
31+
FCliente : iClienteDTO;
32+
FEndereco : iEnderecoDTO;
33+
public
34+
constructor Create;
35+
destructor Destroy; override;
36+
class function New : iController;
37+
function Cliente : iClienteDTO;
38+
function Endereco : iEnderecoDTO;
39+
end;
40+
41+
implementation
42+
43+
constructor TController.Create;
44+
begin
45+
46+
end;
47+
48+
destructor TController.Destroy;
49+
begin
50+
51+
inherited;
52+
end;
53+
54+
function TController.Endereco: iEnderecoDTO;
55+
begin
56+
if not Assigned(FEndereco) then
57+
FEndereco := TEnderecoDTO.New;
58+
Result := FEndereco;
59+
end;
60+
61+
class function TController.New : iController;
62+
begin
63+
Result := Self.Create;
64+
end;
65+
66+
function TController.Cliente: iClienteDTO;
67+
begin
68+
if not Assigned(FCliente) then
69+
FCliente := TClienteDTO.New;
70+
Result := FCliente;
71+
end;
72+
73+
end.
Binary file not shown.

0 commit comments

Comments
 (0)