Open slvrtrn opened 4 months ago
@slvrtrn Are you actively working on this, or would it be alright if I attempted it?
@pulpdrew, sure, please feel free to do so. I think the impl is more or less as follows: We should have
role: string | Array<string>
added to BaseClickHouseClientConfigOptions
(client-common/src/config.ts
)
QueryParams
, CommandParams
, ExecParams
, InsertParams
(client-common/src/client.ts
).client-common/src/connection.ts
.toSearchParams
fn in common/utils/url.ts
roles
to the toSearchParams
fn in the client-node/src/connection/node_base_connection.ts
; Web client - same in the client-web/src/connection/web_connection.
In case of any questions, please feel free to contact me in the community Slack.
NB: in the case of just a single role now, the current workaround could be
const client = createClient({
clickhouse_settings: {
role: 'my_role',
}
})
should work similarly with the other methods (query, insert, command, exec). But this will not allow to provide multiple roles.
See