Support change database and raw queries - #72
Merged
Conversation
koletzilla
force-pushed
the
support-database-change-and-raw-queries
branch
from
August 31, 2026 11:03
a5de3d2 to
5cbd3af
Compare
koletzilla
marked this pull request as ready for review
August 31, 2026 11:07
koletzilla
force-pushed
the
support-database-change-and-raw-queries
branch
from
August 31, 2026 15:33
fbd8d45 to
e64d323
Compare
abonander
approved these changes
Aug 31, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Updated
clickhouseto0.15.2The new release adds
Client::query_raw()and support for thedatabaseURL parameter, which this PR builds on.Send SQL verbatim (closes #53)
The SQL set on a statement is now sent to the server exactly as written. Parameters were always bound server-side with
{name: Type}, and that still works the same way.Configurable default database (closes #67)
There are two ways to set the default database:
?database=<name>to the URI to set it for all connections created from aDatabase."adbc.connection.db_schema"(OptionConnection::CurrentSchema) to set or override it per connection, at creation or later. The same option reads it back. In ADBC terms a ClickHouse database maps to a schema, since ClickHouse has no catalogs.The database name travels with every HTTP request, so it is not affected by session expiry or load balancing, unlike a
USE <name>statement.Empty database names are rejected with a clear error instead of being silently ignored.