Refactored SQL part to dedicated package.
This commit is contained in:
parent
bc969b91a6
commit
1ef88b0c7d
7 changed files with 12 additions and 4 deletions
|
@ -20,6 +20,8 @@ package fr.devinsy.sikevadb;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import fr.devinsy.sikevadb.sql.SQLSikevaDB;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with SikevaDB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
package fr.devinsy.sikevadb.sql;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
@ -38,6 +38,9 @@ import org.joda.time.DateTime;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import fr.devinsy.sikevadb.Element;
|
||||
import fr.devinsy.sikevadb.Elements;
|
||||
import fr.devinsy.sikevadb.SikevaDB;
|
||||
import fr.devinsy.util.StringList;
|
||||
|
||||
/**
|
||||
|
@ -709,7 +712,7 @@ public class SQLSikevaDB implements SikevaDB
|
|||
StringList sqlCommands;
|
||||
String databaseProductName = connection.getMetaData().getDatabaseProductName().split(" ")[0];
|
||||
logger.debug("[datatbaseProductName={}]", databaseProductName);
|
||||
sqlCommands = SQLSikevaDBTools.loadSQLScript(SQLSikevaDB.class.getResource("/fr/devinsy/sikevadb/createTable-" + databaseProductName + ".sql"));
|
||||
sqlCommands = SQLSikevaDBTools.loadSQLScript(SQLSikevaDB.class.getResource("/fr/devinsy/sikevadb/sql/createTable-" + databaseProductName + ".sql"));
|
||||
|
||||
if (sqlCommands == null)
|
||||
{
|
|
@ -16,7 +16,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with SikevaDB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
package fr.devinsy.sikevadb.sql;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
|
@ -16,7 +16,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with SikevaDB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
package fr.devinsy.sikevadb.sql;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.SQLException;
|
||||
|
@ -34,6 +34,9 @@ import org.junit.Assert;
|
|||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import fr.devinsy.sikevadb.Element;
|
||||
import fr.devinsy.sikevadb.Elements;
|
||||
import fr.devinsy.sikevadb.sql.SQLSikevaDB;
|
||||
import fr.devinsy.util.StringList;
|
||||
|
||||
/**
|
Loading…
Reference in a new issue