Skip to content

Commit

Permalink
Merge pull request ClickHouse#85 from ClickHouse/develop
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
zhicwu authored Jan 9, 2021
2 parents 38b6b3b + 1c221ec commit 9ffd1e0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ JDBC bridge for ClickHouse®. It acts as a stateless proxy passing queries from
# build all-in-one docker image
git clone https://github.com/ClickHouse/clickhouse-jdbc-bridge.git
cd clickhouse-jdbc-bridge
docker build -t my/clickhouse-all-in-one .
docker build -t my/clickhouse-all-in-one -f all-in-one.Dockerfile .
# start container in background
docker run --rm -d --name ch-and-jdbc-bridge my/clickhouse-all-in-one
Expand Down Expand Up @@ -397,7 +397,7 @@ clickhouse_url(clickhouse) | `http://ch-server:8123/?query=select * from url('ht
clickhouse_url(jdbc-bridge) | `http://ch-server:8123/?query=select * from url('http://jdbc-bridge:9019/ping', CSV, 'results String')`
clickhouse_constant-query | `http://ch-server:8123/?query=select 1`
clickhouse_constant-query(mysql) | `http://ch-server:8123/?query=select * from mysql('mariadb:3306', 'test', 'constant', 'root', 'root')`
clickhouse_constant-query(remote) | `select * from remote('ch-server:9000', system.constant, 'default', '')`
clickhouse_constant-query(remote) | `http://ch-server:8123/?query=select * from remote('ch-server:9000', system.constant, 'default', '')`
clickhouse_constant-query(url) | `http://ch-server:8123/?query=select * from url('http://ch-server:8123/?query=select 1', CSV, 'results String')`
clickhouse*_constant-query(jdbc*) | `http://ch-server:8123/?query=select * from jdbc('mariadb', 'constant')`
clickhouse_10k-rows-query | `http://ch-server:8123/?query=select 1`
Expand Down
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"
]
}
}
4 changes: 2 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -e

start_server() {
local base_url="${MAVEN_REPO_URL:='https://repo1.maven.org/maven2'}"
local base_url="${MAVEN_REPO_URL:="https://repo1.maven.org/maven2"}"
local driver_dir="$JDBC_BRIDGE_HOME/drivers"
local jdbc_drivers="${JDBC_DRIVERS:=''}"
local jdbc_drivers="${JDBC_DRIVERS:=""}"

# change work directory explicitly
cd $JDBC_BRIDGE_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ public void read(int row, int column, ColumnDefinition metadata, ByteBuffer buff
public static void initialize(ExtensionManager manager) {
Repository<NamedDataSource> dsRepo = manager.getRepositoryManager().getRepository(NamedDataSource.class);

Extension<NamedDataSource> thisExtension = manager.getExtension(ConfigDataSource.class);
dsRepo.registerType(EXTENSION_NAME, thisExtension);
dsRepo.put(Utils.EMPTY_STRING, new ConfigDataSource(dsRepo));
}

Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ public TestRepository(ExtensionManager manager, Class<T> clazz) {
}

@BeforeSuite(groups = { "sit" })
public void beforeSuite() {
public static void beforeSuite() {
pgServer.start();
mdServer.start();
chServer.start();
jbServer.start();
}

@AfterSuite(groups = { "sit" })
public void afterSuite() {
public static void afterSuite() {
pgServer.stop();
mdServer.stop();
chServer.stop();
Expand Down

0 comments on commit 9ffd1e0

Please sign in to comment.