Skip to content
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

Allow credentials override for a particular request #279

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented May 28, 2024

Summary

Allows to override username/password for a particular request (query/command/exec/insert).
Resolves #278

Checklist

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

/** When defined, overrides the username from the {@link BaseClickHouseClientConfigOptions.username} setting.
* @default undefined */
username?: string
/** Has no effect if the {@link BaseQueryParams.username} value is not set.
Copy link
Member

@mshustov mshustov May 28, 2024

Choose a reason for hiding this comment

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

considering that we require both username and password to be either defined or not, maybe we should put it under a single field

auth?: { username: string, password: string } | { token: string }

Copy link

sonarcloud bot commented Jun 6, 2024

@slvrtrn slvrtrn merged commit bd262b9 into main Jun 6, 2024
29 checks passed
@slvrtrn slvrtrn deleted the allow-credentials-override branch June 6, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for Connection Pooling Feature when creating several clients.
2 participants