#1984 - ENH: Add DB.script() ... to access ScriptRunner from DB

This commit is contained in:
rob bygrave
2020-04-08 14:13:57 +12:00
parent bf24949efb
commit 4094339407
2 changed files with 18 additions and 2 deletions
+16
View File
@@ -101,6 +101,22 @@ public class DB {
// return originalPrimaryServer;
// }
/**
* Return the ScriptRunner for the default database.
* <p>
* Useful to run SQL scripts that are resources. For example a test script
* for inserting seed data for a particular test.
*
* <pre>{@code
*
* DB.script().run("/scripts/test-script.sql")
*
* }</pre>
*/
public static ScriptRunner script() {
return getDefault().script();
}
/**
* Return the ExpressionFactory from the default database.
* <p>