public final class Upgrade extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static Driver |
loadH2(int version)
Loads the specified version of H2 in a separate class loader.
|
static void |
unloadH2(Driver driver)
Unloads the specified driver of H2.
|
static boolean |
upgrade(String url,
Properties info,
int version)
Performs database upgrade from an older version of H2.
|
public static boolean upgrade(String url, Properties info, int version) throws Exception
url - the JDBC connection URLinfo - the connection properties ("user", "password", etc).version - the old version of H2true on success, false if URL is a remote or
in-memory URLException - on failurepublic static Driver loadH2(int version) throws IOException, ReflectiveOperationException
version - the version to loadIOException - on I/O exceptionReflectiveOperationException - on exception during initialization of the driverpublic static void unloadH2(Driver driver) throws ReflectiveOperationException
driver - the driver to unloadReflectiveOperationException - on exceptionCopyright © 2022. All rights reserved.