Skip to content

Add catalog support #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2021
Merged

Add catalog support #297

merged 1 commit into from
Oct 20, 2021

Conversation

bpintea
Copy link
Collaborator

@bpintea bpintea commented Oct 18, 2021

This adds support for multiple catalogs ("databases").
The client application can now set the catalog at connection level -
with SQLSetConnectAttr - to a pattern matching a local or remote cluster
name and ES/SQL will execute the query on the respective cluster/s.

A default catalog can also be set through the connection string, through
the "Catalog" DSN attribute.

In case the catalog is not set, or set to an empty or null string, the
local catalog will be chosen for execution.

The driver will simply add a "catalog" request attribute containing the
value received from the application, or skip adding the attribute if
this is empty.

Relates to elastic/elasticsearch#78903.

This adds support for multiple catalogs ("databases").
The client application can now set the catalog at connection level -
with SQLSetConnectAttr - to a pattern matching a local or remote cluster
name and ES/SQL will execute the query on the respective cluster/s.

A default catalog can also be set through the connection string, through
the "Catalog" DSN attribute.

In case the catalog is not set, or set to an empty or null string, the
local catalog will be chosen for execution.

The driver will simply add a "catalog" request attribute containing the
value received from the application, or skip adding the attribute if
this is empty.
@bpintea bpintea added >feature Applicable to PRs adding new functionality v8.0.0 v7.16.0 labels Oct 18, 2021
#define REQ_KEY_BINARY_FMT "binary_format"

#define REST_REQ_KEY_COUNT 13 /* "query" / "cursor" count as one */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The count bump was skipped in #215/#216, but fortunately to no bad outcome, since values between 9 and 15 would be treated the same by cbor_nn_hdr_len().

@bpintea bpintea merged commit c1c5b52 into elastic:master Oct 20, 2021
@bpintea bpintea deleted the feat/catalog_support branch October 20, 2021 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature Applicable to PRs adding new functionality v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants