From da5557a3c3832693c787c73f144b39eaf295c393 Mon Sep 17 00:00:00 2001 From: Steven Baldwin Date: Thu, 11 Apr 2024 13:25:03 -0700 Subject: [PATCH] Update docs with schema being set --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7ae03e6..1d0342ac 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,15 @@ Feel free to log issues against this client through GitHub. ## JDBC -The Rockset JDBC driver is packaged as part of this java client. Here is an [one example](https://github.com/rockset/rockset-java-client/blob/master/src/test/java/com/rockset/jdbc/FirstExample.java) that shows how to use it. +The Rockset JDBC driver is packaged as part of this java client. Here is [one example](https://github.com/rockset/rockset-java-client/blob/master/src/test/java/com/rockset/jdbc/FirstExample.java) that shows how to use it. + +A JDBC schema corresponds to a Rockset workspace. +To scope your queries to a particular workspace without needing to fully qualify the workspace name, set the schema on the connection object. +```java +Connection connection = DriverManager.getConnection(...); +connection.setSchema("my_workspace"); +``` +To see the behavior of this configuration, look at the [Schema Tests](https://github.com/rockset/rockset-java-client/blob/master/src/test/java/com/rockset/jdbc/TestSchema.java). ## License