Skip to content

Commit 3da63ab

Browse files
authored
[BREAKING] Support mutli-valued ES|QL parameters (#5362)
* [BREAKING] Support mutli-valued ES|QL parameters * Run make contrib
1 parent eca32a3 commit 3da63ab

File tree

6 files changed

+87
-7
lines changed

6 files changed

+87
-7
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 32 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/esql/_types/types.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { FieldValue } from '@_types/common'
21+
22+
export type ESQLParam = FieldValue | FieldValue[]

specification/esql/query/QueryRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { FieldValue } from '@_types/common'
2221
import { QueryContainer } from '@_types/query_dsl/abstractions'
2322
import { EsqlFormat } from '@esql/_types/QueryParameters'
2423
import { TableValuesContainer } from '@esql/_types/TableValuesContainer'
24+
import { ESQLParam } from '@esql/_types/types'
2525
import { Dictionary } from '@spec_utils/Dictionary'
2626

2727
/**
@@ -87,7 +87,7 @@ export interface Request extends RequestBase {
8787
* To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
8888
* @doc_id esql-query-params
8989
*/
90-
params?: Array<FieldValue>
90+
params?: Array<ESQLParam>
9191
/**
9292
* If provided and `true` the response will include an extra `profile` object
9393
* with information on how the query was executed. This information is for human debugging

0 commit comments

Comments
 (0)