|
Currently, QuerySettings are defined as:
QuerySettings:
|
description: >-
|
Struct representing possible settings that may be applied to a given query.
|
fields:
|
indexHints:
|
type:
|
variant: [IndexHintSpec, array<IndexHintSpec>]
|
optional: true
|
queryEngineVersion:
|
type: QueryEngineVersion
|
optional: true
|
While specifying a variant provides additional flexibility to the user (they can either provide an array of index hint specs or a single object), this creates rather ugly code on the server side.
As part of this patch, we would refactor this (introduce custom serializer/deserializer methods), such that user can still specify IndexHintSpec or an array of specs, while we in code always have a vector of IndexHintSpecs.
The goal would be to define the serializer, deserializer methods as well as adding tests to ensure their correctness and adjust the breaking code, as now vector<IndexHintSpec> will be used.
|