Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tool-up-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
elis
tool-up-backend
Commits
643b5583
Commit
643b5583
authored
9 years ago
by
Thiemo Belmega
Browse files
Options
Downloads
Patches
Plain Diff
Adjust SQL statements to altered database schema
parent
05671b21
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/unipotsdam/cs/toolup/database/SqlStatementFactory.java
+6
-1
6 additions, 1 deletion
...de/unipotsdam/cs/toolup/database/SqlStatementFactory.java
src/main/resources/SQL_Statements.xml
+1
-0
1 addition, 0 deletions
src/main/resources/SQL_Statements.xml
with
7 additions
and
1 deletion
src/main/java/de/unipotsdam/cs/toolup/database/SqlStatementFactory.java
+
6
−
1
View file @
643b5583
...
...
@@ -38,7 +38,12 @@ public class SqlStatementFactory {
}
public
PreparedStatement
getInsertInto
(
String
tableName
)
throws
SQLException
{
return
getCustomizedStatement
(
"insertBO"
,
tableName
);
switch
(
tableName
)
{
case
"category"
:
return
getCustomizedStatement
(
"insertCategory"
,
tableName
);
default
:
return
getCustomizedStatement
(
"insertBO"
,
tableName
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/SQL_Statements.xml
+
1
−
0
View file @
643b5583
...
...
@@ -4,6 +4,7 @@
<entry
key=
"selectBO"
>
SELECT * FROM TABLE_NAME WHERE uuid = ?;
</entry>
<entry
key=
"selectAll"
>
SELECT * FROM TABLE_NAME;
</entry>
<entry
key=
"insertBO"
>
INSERT INTO TABLE_NAME VALUES (?,?,?);
</entry>
<entry
key=
"insertCategory"
>
INSERT INTO TABLE_NAME VALUES (?,?,?,NULL);
</entry>
<entry
key=
"updateBO"
>
UPDATE TABLE_NAME SET title = ?, description = ? WHERE uuid = ?;
</entry>
<entry
key=
"deleteBO"
>
DELETE FROM TABLE_NAME WHERE uuid = ?;
</entry>
<entry
key=
"selectRelation"
>
SELECT * FROM TABLE_NAME WHERE FOREIGN_KEY = ?;
</entry>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment