mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-26 04:09:50 -05:00
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description 1) Fix up the remaining operators - implementations are sub-optimal 2) Add type bracketing options for all types and use them in operators 3) Add support for truncation of terms TODO: - Support recheck on the index for operators than just bounds - Support N boundaries for index terms. ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary This pull request addresses issues with operators and type bracketing in BSON composite indexes. - Added `bson_gin_index_types_core.c` to manage BSON type bounds for indexes. - Updated `bson_gin_composite_entrypoint.c` to fix operator handling and apply type bracketing for various BSON index strategies. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
32 lines
803 B
C
32 lines
803 B
C
/*-------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
*
|
|
* include/bson/bson_query_common.h
|
|
*
|
|
* Private and common declarations of functions for handling bson query
|
|
* Shared across runtime and index implementations.
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifndef BSON_QUERY_COMMON_H
|
|
#define BSON_QUERY_COMMON_H
|
|
|
|
#include "io/bson_core.h"
|
|
#include "utils/documentdb_errors.h"
|
|
|
|
/*
|
|
* This struct defines the parameters for a range query.
|
|
*/
|
|
typedef struct DollarRangeParams
|
|
{
|
|
bson_value_t minValue;
|
|
bson_value_t maxValue;
|
|
bool isMinInclusive;
|
|
bool isMaxInclusive;
|
|
} DollarRangeParams;
|
|
|
|
DollarRangeParams * ParseQueryDollarRange(pgbsonelement *filterElement);
|
|
|
|
#endif
|