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

Parameters set in the clientRequestProperties are not sanitized to "dynamic" when needed #132

Open
johnib opened this issue Jun 9, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@johnib
Copy link

johnib commented Jun 9, 2021

Hey,

Could not find the place where the parameters are converted to their kusto types, as described here.

For example, if I specify a date parameter:

clientRequestProperties.setParameter('startTime', new Date().toISOString());

Then something in your package will wrap the value with datetime(<value>).
However, if I provide an array of values:

clientRequestProperties.setParameter('ids', [1,2,3]);

The package will not sanitize it to dynamic(<value>).

Tried looking for the actual code doing this sanitization, however I couldn't find it.

toJson() {
const json: { Options?: { [option: string]: any }, Parameters?: { [option: string]: any } } = {};
if (Object.keys(this._options).length !== 0) {
json.Options = this._options;
if (json.Options.servertimeout) {
json.Options.servertimeout = this._msToTimespan(json.Options.servertimeout);
}
}
if (Object.keys(this._parameters).length !== 0) {
json.Parameters = this._parameters;
}
return Object.keys(json).length !== 0 ? json : null;
}

@yihezkel
Copy link
Member

Hi @johnib ,

We will add this to our backlog.

As a workaround, please explicitly add the dynamic wrapper as needed.

CC @yogilad

@yogilad yogilad added the enhancement New feature or request label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants