public interface ScriptRunner
Database database = DB.getDefault();
database.script().run("/scripts/test-script.sql");
Modifier and Type | Method and Description |
---|---|
void |
run(String path)
Run a script given the resource path (that should start with "/").
|
void |
run(String path,
Map<String,String> placeholderMap)
Run a script given the resource path (that should start with "/") and place holders.
|
void |
run(URL resource)
Run a DDL or SQL script given the resource.
|
void |
run(URL resource,
Map<String,String> placeholderMap)
Run a DDL or SQL script given the resource and place holders.
|
void run(String path, Map<String,String> placeholderMap)
Map<String,String> placeholders = new HashMap<>();
placeholders.put("tableName", "e_basic");
Database database = DB.getDefault();
database.script().run("/scripts/test-script.sql", placeholders);
Copyright © 2019. All rights reserved.