From dd838b41041dda537d69433b4e966399450ce546 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 6 Nov 2013 16:07:49 +0100 Subject: [PATCH] Rename SQL table. --- src/fr/devinsy/sikevadb/SQLSikevaDB.java | 94 +++++++++---------- src/fr/devinsy/sikevadb/createTable-HSQL.sql | 4 +- src/fr/devinsy/sikevadb/createTable-MySQL.sql | 4 +- test/fr/devinsy/sikevadb/data.xml | 2 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/fr/devinsy/sikevadb/SQLSikevaDB.java b/src/fr/devinsy/sikevadb/SQLSikevaDB.java index f1db62e..bf8dbb0 100644 --- a/src/fr/devinsy/sikevadb/SQLSikevaDB.java +++ b/src/fr/devinsy/sikevadb/SQLSikevaDB.java @@ -108,7 +108,7 @@ public class SQLSikevaDB implements SikevaDB { // connection = getConnection(); connection.setAutoCommit(true); - statement = connection.prepareStatement("UPDATE elements SET ARCHIVE_DATE=? WHERE TOPKEY=? AND SUBKEY IS NULL"); + statement = connection.prepareStatement("UPDATE sikevadb_elements SET ARCHIVE_DATE=? WHERE TOPKEY=? AND SUBKEY IS NULL"); statement.setTimestamp(1, toTimestamp(element.getArchiveDate())); statement.setString(2, element.getKey()); @@ -147,7 +147,7 @@ public class SQLSikevaDB implements SikevaDB { // connection = getConnection(); connection.setAutoCommit(true); - statement = connection.prepareStatement("UPDATE elements SET ARCHIVE_DATE=? WHERE TOPKEY=? AND SUBKEY=?"); + statement = connection.prepareStatement("UPDATE sikevadb_elements SET ARCHIVE_DATE=? WHERE TOPKEY=? AND SUBKEY=?"); statement.setTimestamp(1, toTimestamp(element.getArchiveDate())); statement.setString(2, element.getKey()); @@ -175,7 +175,7 @@ public class SQLSikevaDB implements SikevaDB { // connection = getConnection(); connection.setAutoCommit(true); - statement = connection.prepareStatement("DELETE FROM elements WHERE ARCHIVE_DATE IS NOT NULL"); + statement = connection.prepareStatement("DELETE FROM sikevadb_elements WHERE ARCHIVE_DATE IS NOT NULL"); statement.executeUpdate(); @@ -201,7 +201,7 @@ public class SQLSikevaDB implements SikevaDB { // connection = getConnection(); connection.setAutoCommit(true); - statement = connection.prepareStatement("DELETE FROM elements WHERE ARCHIVE_DATE IS NOT NULL AND UNIX_TIMESTAMP(ARCHIVE_DATE) -