made Appointment.location() return an optional
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -62,7 +62,7 @@ public class MariaDB implements Database {
|
||||
public Result<Appointment> add(Appointment appointment) {
|
||||
try {
|
||||
ResultSet keys = insertInto(APPOINTMENTS, TITLE, DESCRIPTION, START, END, LOCATION, COORDS) //
|
||||
.values(appointment.title(), appointment.description(), appointment.start(), appointment.end().orElse(null), appointment.location(), appointment.coords().orElse(null))
|
||||
.values(appointment.title(), appointment.description(), appointment.start(), appointment.end().orElse(null), appointment.location().orElse(null), appointment.coords().orElse(null))
|
||||
.execute(connection)
|
||||
.getGeneratedKeys();
|
||||
Appointment saved = null;
|
||||
@@ -316,7 +316,7 @@ public class MariaDB implements Database {
|
||||
.set(TITLE, DESCRIPTION, START, END, LOCATION, COORDS)
|
||||
.where(AID, equal(event.id()))
|
||||
.prepare(connection)
|
||||
.apply(event.title(), event.description(), Timestamp.valueOf(event.start()), end, event.location(), event.coords().orElse(null));
|
||||
.apply(event.title(), event.description(), Timestamp.valueOf(event.start()), end, event.location().orElse(null), event.coords().orElse(null));
|
||||
|
||||
// TODO: update links, attachments, tags
|
||||
|
||||
|
||||
Reference in New Issue
Block a user