public class JdbcH2Helper extends JdbcHelper
jdbcConfiguration| Constructor and Description |
|---|
JdbcH2Helper(JdbcConfiguration jdbcConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
backup(File file,
boolean compress)
Backup database in gzip compressed file.
|
void |
clear(boolean dropDatabase) |
boolean |
isTableExist(String tableName) |
boolean |
isTableExist(String schema,
String tableName)
Tests if a given table exists.
|
void |
restore(File file)
Read database from gzip compressed file
|
closeQuietly, closeQuietly, closeQuietly, createSchema, getJdbcDriver, openConnection, registerDriver, runSelectOnString, runUpdatepublic JdbcH2Helper(JdbcConfiguration jdbcConfiguration)
public boolean isTableExist(String tableName)
public boolean isTableExist(String schema, String tableName)
Tests if a given table exists. WARNING : this may not work is the tableName is not exactly the same.
This method is designed for H2 only.schema - schema name filtertableName - table name filtertrue if table exists.public void backup(File file, boolean compress)
file - file to write backupcompress - if true then use gzip to compress filepublic void restore(File file) throws FileNotFoundException
file - the source file to use for restoreFileNotFoundException - if file does not existpublic void clear(boolean dropDatabase)
Copyright © 2004–2017 CodeLutin. All rights reserved.