File tree Expand file tree Collapse file tree 6 files changed +31
-11
lines changed
Expand file tree Collapse file tree 6 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 2020import { TableValuesContainer } from '@esql/_types/TableValuesContainer'
2121import { Dictionary } from '@spec_utils/Dictionary'
2222import { RequestBase } from '@_types/Base'
23- import { FieldValue } from '@_types/common'
2423import { QueryContainer } from '@_types/query_dsl/abstractions'
24+ import { EsqlQueryParameters } from './types'
2525
2626/**
2727 * Run an ES|QL query.
@@ -70,7 +70,7 @@ export interface Request extends RequestBase {
7070 * 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.
7171 * @doc_id esql-query-params
7272 */
73- params ?: Array < FieldValue >
73+ params ?: EsqlQueryParameters
7474 /**
7575 * If provided and `true` the response will include an extra `profile` object
7676 * with information on how the query was executed. This information is for human debugging
Original file line number Diff line number Diff line change 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 { SingleKeyDictionary } from '@spec_utils/Dictionary'
21+ import { Field , FieldValue } from '@_types/common'
22+
23+ export type EsqlQueryParameters =
24+ | FieldValue [ ]
25+ | SingleKeyDictionary < Field , FieldValue >
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { Dictionary } from '@spec_utils/Dictionary'
2120import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2221import { Name } from '@_types/common'
2322
@@ -27,7 +26,3 @@ export class Column {
2726}
2827
2928export type Row = UserDefinedValue [ ]
30-
31- export type QueryParameters =
32- | Dictionary < string , UserDefinedValue >
33- | UserDefinedValue [ ]
Original file line number Diff line number Diff line change 1818 */
1919
2020import { Id } from '@_types/common'
21- import { Column , Row } from '../types'
21+ import { Column , Row } from '../_types/ types'
2222
2323export class Response {
2424 body : {
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { QueryParameters } from '@sql/types'
2120import { RequestBase } from '@_types/Base'
21+ import { FieldValue } from '@_types/common'
2222import { RuntimeFields } from '@_types/mapping/RuntimeFields'
2323import { integer } from '@_types/Numeric'
2424import { QueryContainer } from '@_types/query_dsl/abstractions'
@@ -103,7 +103,7 @@ export interface Request extends RequestBase {
103103 /**
104104 * Values for parameters in the query.
105105 */
106- params ?: QueryParameters
106+ params ?: FieldValue [ ]
107107 /**
108108 * Retention period for an async or saved synchronous search.
109109 * @server_default 5d
Original file line number Diff line number Diff line change 1818 */
1919
2020import { Id } from '@_types/common'
21- import { Column , Row } from '../types'
21+ import { Column , Row } from '../_types/ types'
2222
2323export class Response {
2424 body : {
You can’t perform that action at this time.
0 commit comments