Skip to content

Commit

Permalink
enable scripting by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed Jan 9, 2021
1 parent 7d63a64 commit 183d653
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docker/config/datasources/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"script": {
"type": "script",
"driverUrls": [
"/d/Tools/groovy-3.0.1/lib",
"!/d/Tools/groovy-3.0.1/lib/groovy-jaxb-3.0.1.jar",
"D:/Tools/groovy-3.0.1/lib",
"!D:/Tools/groovy-3.0.1/lib/groovy-jaxb-3.0.1.jar"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ public void read(int row, int column, ColumnDefinition metadata, ByteBuffer buff
public static void initialize(ExtensionManager manager) {
ScriptDataSource.vars.putAll(manager.getScriptableObjects());

Repository<NamedDataSource> dsRepo = manager.getRepositoryManager().getRepository(NamedDataSource.class);

Extension<NamedDataSource> thisExtension = manager.getExtension(ScriptDataSource.class);
manager.getRepositoryManager().getRepository(NamedDataSource.class).registerType(EXTENSION_NAME, thisExtension);
dsRepo.registerType(EXTENSION_NAME, thisExtension);
}

public static ScriptDataSource newInstance(Object... args) {
Expand Down

0 comments on commit 183d653

Please sign in to comment.