Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Devops CW Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Byron Biggs
Devops CW Fork
Commits
0cd3080c
Commit
0cd3080c
authored
7 months ago
by
Byron Biggs
Browse files
Options
Downloads
Patches
Plain Diff
"Corrected type sensitivity throughout project"
parent
bd2a8f1e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/com/example/demo/Contact/contactRepositoryImpl.java
+6
-6
6 additions, 6 deletions
.../java/com/example/demo/Contact/contactRepositoryImpl.java
src/main/resources/schema.sql
+0
-23
0 additions, 23 deletions
src/main/resources/schema.sql
src/schema.sql
+6
-6
6 additions, 6 deletions
src/schema.sql
with
12 additions
and
35 deletions
src/main/java/com/example/demo/Contact/contactRepositoryImpl.java
+
6
−
6
View file @
0cd3080c
...
...
@@ -31,33 +31,33 @@ public class contactRepositoryImpl {
};
public
void
addContactItem
(
Contact
contact
)
{
String
sql
=
"INSERT INTO email
d
ata (Email, Query) VALUES (?, ?)"
;
String
sql
=
"INSERT INTO email
D
ata (Email, Query) VALUES (?, ?)"
;
jdbcTemplate
.
update
(
sql
,
contact
.
getEmail
(),
contact
.
getQuery
());
}
public
List
<
Contact
>
getContactItems
()
{
String
sql
=
"SELECT * FROM email
d
ata"
;
String
sql
=
"SELECT * FROM email
D
ata"
;
return
jdbcTemplate
.
query
(
sql
,
contactRowMapper
);
}
public
void
addPhoneNumber
(
PhoneNumber
phoneNumber
)
{
String
sql
=
"INSERT INTO phone
n
umber
d
ata (phoneNumber) VALUES (?)"
;
String
sql
=
"INSERT INTO phone
N
umber
D
ata (phoneNumber) VALUES (?)"
;
jdbcTemplate
.
update
(
sql
,
phoneNumber
.
getPhoneNumber
());
}
public
List
<
PhoneNumber
>
getPhoneNumbers
()
{
String
sql
=
"SELECT * FROM phone
n
umber
d
ata"
;
String
sql
=
"SELECT * FROM phone
N
umber
D
ata"
;
return
jdbcTemplate
.
query
(
sql
,
phoneRowMapper
);
}
// Delete methods by ID
public
void
deleteContactItem
(
Long
id
)
{
String
sql
=
"DELETE FROM email
d
ata WHERE ID = ?"
;
String
sql
=
"DELETE FROM email
D
ata WHERE ID = ?"
;
jdbcTemplate
.
update
(
sql
,
id
);
}
public
void
deletePhoneNumber
(
Long
id
)
{
String
sql
=
"DELETE FROM phone
n
umber
d
ata WHERE ID = ?"
;
String
sql
=
"DELETE FROM phone
N
umber
D
ata WHERE ID = ?"
;
jdbcTemplate
.
update
(
sql
,
id
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/schema.sql
deleted
100644 → 0
+
0
−
23
View file @
bd2a8f1e
create
database
if
not
exists
ludek
;
use
ludek
;
create
table
if
not
exists
media
(
post_id
int
auto_increment
primary
key
,
title
varchar
(
255
)
not
null
,
description
text
,
archived
boolean
default
false
);
create
table
if
not
exists
media_files
(
file_id
int
auto_increment
primary
key
,
post_id
int
not
null
,
media_type
ENUM
(
'IMAGE'
,
'VIDEO'
)
not
null
,
file_path
varchar
(
512
)
not
null
,
foreign
key
(
post_id
)
references
media
(
post_id
)
on
delete
cascade
);
This diff is collapsed.
Click to expand it.
src/schema.sql
+
6
−
6
View file @
0cd3080c
...
...
@@ -2,7 +2,7 @@ drop database if exists ludek;
create
database
if
not
exists
ludek
;
use
ludek
;
create
table
email
d
ata
create
table
email
D
ata
(
ID
int
auto_increment
primary
key
,
...
...
@@ -46,7 +46,7 @@ create table news_articles
archived
tinyint
(
1
)
default
0
null
);
create
table
phone
n
umber
d
ata
create
table
phone
N
umber
D
ata
(
ID
int
auto_increment
primary
key
,
...
...
@@ -110,12 +110,12 @@ create index role_id
on
user_roles
(
role_id
);
-- Single sample for email
d
ata
INSERT
INTO
email
d
ata
(
Email
,
Query
)
-- Single sample for email
D
ata
INSERT
INTO
email
D
ata
(
Email
,
Query
)
VALUES
(
'contact@example.com'
,
'Sample inquiry about community events'
);
-- Single sample for phone
n
umber
d
ata
INSERT
INTO
phone
n
umber
d
ata
(
phoneNumber
)
-- Single sample for phone
N
umber
D
ata
INSERT
INTO
phone
N
umber
D
ata
(
phoneNumber
)
VALUES
(
'07712345678'
);
-- Single sample for news_articles
...
...
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