new features:

- database now ignoring duplicates isntead of failing
- automatic loading of importer plugins
- automatic tagging

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-01-01 02:09:18 +01:00
parent 50e7f2e71d
commit 211c92b0e3
10 changed files with 341 additions and 21 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ dependencies {
implementation(project(":de.srsoftware.cal.api"))
implementation(project(":de.srsoftware.cal.base"))
implementation("de.srsoftware:tools.jdbc:1.1.3")
implementation("de.srsoftware:tools.jdbc:1.1.4")
implementation("de.srsoftware:tools.optionals:1.0.0")
implementation("de.srsoftware:tools.util:1.3.0")
}
@@ -78,7 +78,7 @@ public class MariaDB implements Database {
if (assignQuery == null) assignQuery = insertInto(APPOINTMENT_ATTACHMENTS, AID, UID, MIME);
if (urlId.isPresent()) assignQuery.values(saved.id(), urlId.get(), attachment.mime());
}
if (assignQuery != null) assignQuery.execute(connection);
if (assignQuery != null) assignQuery.ignoreDuplicates().execute(connection);
}
{ // link to links
@@ -89,7 +89,7 @@ public class MariaDB implements Database {
if (assignQuery == null) assignQuery = insertInto(APPOINTMENT_URLS, AID, UID, DESCRIPTION);
if (urlId.isPresent()) assignQuery.values(saved.id(), urlId.get(), link.desciption());
}
if (assignQuery != null) assignQuery.execute(connection);
if (assignQuery != null) assignQuery.ignoreDuplicates().execute(connection);
}
{
@@ -100,7 +100,7 @@ public class MariaDB implements Database {
if (assignQuery == null) assignQuery = insertInto(APPOINTMENT_TAGS, AID, TID);
if (tagId.isPresent()) assignQuery.values(saved.id(), tagId.get());
}
if (assignQuery != null) assignQuery.execute(connection);
if (assignQuery != null) assignQuery.ignoreDuplicates().execute(connection);
}
return Payload.of(saved);
} catch (SQLException e) {