Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
StarUML Evológica Plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evologica
StarUML Evológica Plugin
Commits
52c1c2f4
Commit
52c1c2f4
authored
Nov 23, 2020
by
Sandro Camata Santana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suporte postgre
parent
1c46e551
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
642 additions
and
60 deletions
+642
-60
IntegracaoDelphiSUML.pas
EvoUMLPlugin/src/IntegracaoDelphiSUML.pas
+15
-4
fCodeGen.dfm
EvoUMLPlugin/src/fCodeGen.dfm
+609
-56
fCodeGen.pas
EvoUMLPlugin/src/fCodeGen.pas
+18
-0
No files found.
EvoUMLPlugin/src/IntegracaoDelphiSUML.pas
View file @
52c1c2f4
...
@@ -30,7 +30,7 @@ const cBASE_USECASE_CLASS_FULL_PATH = MODELO + '::FrameworkModel::acuFrameworkPa
...
@@ -30,7 +30,7 @@ const cBASE_USECASE_CLASS_FULL_PATH = MODELO + '::FrameworkModel::acuFrameworkPa
type
type
TDataBaseVendor
=
(
dbvSQLServer
,
dbvOracle
,
dbvDB2
);
TDataBaseVendor
=
(
dbvSQLServer
,
dbvOracle
,
dbvDB2
,
dbvPostgre
);
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
TCodeGenParams
=
class
(
TObject
);
TCodeGenParams
=
class
(
TObject
);
...
@@ -284,20 +284,31 @@ begin
...
@@ -284,20 +284,31 @@ begin
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'text'
)
then
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'text'
)
then
case
piDBVendor
of
case
piDBVendor
of
dbvSQLServer
:
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
dbvSQLServer
:
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
dbvOracle
:
lSQLColumnDBType
:=
'clob'
;
dbvDB2
:
lSQLColumnDBType
:=
'clob'
;
else
else
lSQLColumnDBType
:=
'clob'
;
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
end
end
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'datetime'
)
then
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'datetime'
)
then
case
piDBVendor
of
case
piDBVendor
of
dbvSQLServer
:
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
dbvSQLServer
:
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
dbvOracle
:
lSQLColumnDBType
:=
'date'
;
dbvOracle
:
lSQLColumnDBType
:=
'date'
;
dbvDB2
:
lSQLColumnDBType
:=
'timestamp'
;
dbvDB2
:
lSQLColumnDBType
:=
'timestamp'
;
dbvPostgre
:
lSQLColumnDBType
:=
'timestamp'
;
end
end
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'image'
)
then
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'image'
)
then
case
piDBVendor
of
case
piDBVendor
of
dbvSQLServer
:
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
dbvOracle
:
lSQLColumnDBType
:=
'blob'
;
dbvDB2
:
lSQLColumnDBType
:=
'blob'
;
dbvPostgre
:
lSQLColumnDBType
:=
'bytea'
;
else
else
lSQLColumnDBType
:=
'blob'
;
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
end
else
if
SameText
(
piDBColumnMap
.
AttributeTicket
.
DBType
,
'blob'
)
then
case
piDBVendor
of
dbvPostgre
:
lSQLColumnDBType
:=
'bytea'
;
else
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
end
end
else
else
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
lSQLColumnDBType
:=
piDBColumnMap
.
AttributeTicket
.
DBType
;
...
...
EvoUMLPlugin/src/fCodeGen.dfm
View file @
52c1c2f4
This diff is collapsed.
Click to expand it.
EvoUMLPlugin/src/fCodeGen.pas
View file @
52c1c2f4
...
@@ -28,18 +28,23 @@ type
...
@@ -28,18 +28,23 @@ type
TCodeGen
=
class
(
TForm
)
TCodeGen
=
class
(
TForm
)
memCode
:
TSynEdit
;
memCode
:
TSynEdit
;
memSQLPostgre
:
TSynEdit
;
memXSDIn
:
TSynEdit
;
memXSDIn
:
TSynEdit
;
memXSDOut
:
TSynEdit
;
memXSDOut
:
TSynEdit
;
memSQLServer
:
TSynEdit
;
memSQLServer
:
TSynEdit
;
memSQLOracle
:
TSynEdit
;
memSQLOracle
:
TSynEdit
;
memSQLDB2
:
TSynEdit
;
memSQLDB2
:
TSynEdit
;
PageControl1
:
TPageControl
;
PageControl1
:
TPageControl
;
Panel16
:
TPanel
;
Panel17
:
TPanel
;
SpeedButton9
:
TSpeedButton
;
SynCppSyn1
:
TSynCppSyn
;
SynCppSyn1
:
TSynCppSyn
;
SynFreePascalSyn1
:
TSynFreePascalSyn
;
SynFreePascalSyn1
:
TSynFreePascalSyn
;
SynJavaSyn1
:
TSynJavaSyn
;
SynJavaSyn1
:
TSynJavaSyn
;
SynSQLSyn1
:
TSynSQLSyn
;
SynSQLSyn1
:
TSynSQLSyn
;
SynSQLSyn2
:
TSynSQLSyn
;
SynSQLSyn2
:
TSynSQLSyn
;
SynSQLSyn3
:
TSynSQLSyn
;
SynSQLSyn3
:
TSynSQLSyn
;
SynSQLSyn4
:
TSynSQLSyn
;
SynXMLSyn1
:
TSynXMLSyn
;
SynXMLSyn1
:
TSynXMLSyn
;
TabSheet1
:
TTabSheet
;
TabSheet1
:
TTabSheet
;
Panel3
:
TPanel
;
Panel3
:
TPanel
;
...
@@ -50,6 +55,7 @@ type
...
@@ -50,6 +55,7 @@ type
SpeedButton2
:
TSpeedButton
;
SpeedButton2
:
TSpeedButton
;
SpeedButton3
:
TSpeedButton
;
SpeedButton3
:
TSpeedButton
;
PageControl2
:
TPageControl
;
PageControl2
:
TPageControl
;
TabSheet12
:
TTabSheet
;
TabSheet2
:
TTabSheet
;
TabSheet2
:
TTabSheet
;
Panel5
:
TPanel
;
Panel5
:
TPanel
;
Panel6
:
TPanel
;
Panel6
:
TPanel
;
...
@@ -108,6 +114,7 @@ type
...
@@ -108,6 +114,7 @@ type
procedure
edtJavaPackageNameChange
(
Sender
:
TObject
);
procedure
edtJavaPackageNameChange
(
Sender
:
TObject
);
procedure
SpeedButton7Click
(
Sender
:
TObject
);
procedure
SpeedButton7Click
(
Sender
:
TObject
);
procedure
SpeedButton8Click
(
Sender
:
TObject
);
procedure
SpeedButton8Click
(
Sender
:
TObject
);
procedure
SpeedButton9Click
(
Sender
:
TObject
);
private
private
{ Private declarations }
{ Private declarations }
fUtil
:
TUtil
;
fUtil
:
TUtil
;
...
@@ -348,6 +355,17 @@ begin
...
@@ -348,6 +355,17 @@ begin
end
;
end
;
end
;
end
;
procedure
TCodeGen
.
SpeedButton9Click
(
Sender
:
TObject
);
begin
Screen
.
Cursor
:=
crHourGlass
;
try
memSQLPostgre
.
Clear
;
memSQLPostgre
.
Lines
.
Text
:=
Util
.
GerarFullSQLPreview
(
dbvPostgre
);
finally
Screen
.
Cursor
:=
crDefault
;
end
;
end
;
function
TCodeGen
.
SuggestFileName
(
piValue
:
string
;
piExtension
:
boolean
=
false
):
string
;
function
TCodeGen
.
SuggestFileName
(
piValue
:
string
;
piExtension
:
boolean
=
false
):
string
;
var
lFileName
:
string
;
var
lFileName
:
string
;
begin
begin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment