Skip to content

support setting a role on a per-query basis #275

@svix-jbrown

Description

@svix-jbrown

Use case

The HTTP interface supports setting a role on a per-query basis. It would be nice to expose this in clickhouse-rs.

Describe the solution you'd like

Another method on clickhouse::Client called .with_role() which will cause all subsequent queries issued by that Client to have the role=... kwarg

Also, a .with_role() arg on Query.

Describe the alternatives you've considered

This could be hacked in with .with_options(), but I think it's clearer to have it as a dedicated method since roles are so central to authorization.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions