mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactor ### 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? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Move source files under new directory. ---- #### AI description (iteration 1) #### PR Classification Code reorganization #### PR Summary This pull request moves the `helio_api` and `helio_distributed` sources under the `documentdb` directory, updating references and initialization logic accordingly. - Added `pg_documentdb.c` for initializing the `pg_documentdb` extension. - Added `documentdb_distributed.c` for initializing the `pg_documentdb_distributed` extension. - Updated `validate_helio_extension_state.sh` to include new checks for `documentdb`. - Moved `helio_api_extension_version.c` to `documentdb_extension_version.c` without code changes. - Updated various `Makefile` configurations to reflect the new directory structure and dependencies.
63 lines
1.9 KiB
C
63 lines
1.9 KiB
C
/*-------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
*
|
|
* include/planner/helio_plan_cache.h
|
|
*
|
|
* Common declarations for the pg_helio_api plan cache.
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifndef HELIO_PLAN_CACHE_H
|
|
#define HELIO_PLAN_CACHE_H
|
|
|
|
#include <executor/spi.h>
|
|
|
|
/*
|
|
* ID prefixes for different types of query.
|
|
*
|
|
* The first 32 bits of a query ID are used to identity the operation,
|
|
* and the latter 32 bits to identify different query variants.
|
|
*/
|
|
#define QUERY_ID_INSERT (1L << 32)
|
|
#define QUERY_ID_UPDATE_BY_TID (2L << 32)
|
|
#define QUERY_ID_DELETE_BY_TID (3L << 32)
|
|
|
|
#define QUERY_DELETE_WITH_FILTER (4L << 32);
|
|
#define QUERY_DELETE_WITH_FILTER_SHARDKEY (5L << 32)
|
|
#define QUERY_DELETE_WITH_FILTER_ID (6L << 32)
|
|
#define QUERY_DELETE_WITH_FILTER_SHARDKEY_ID (7L << 32)
|
|
|
|
#define QUERY_CALL_UPDATE_ONE (8L << 32)
|
|
|
|
#define QUERY_DELETE_ONE (9L << 32)
|
|
#define QUERY_DELETE_ONE_ID (10L << 32)
|
|
#define QUERY_DELETE_ONE_ID_RETURN_DOCUMENT (11L << 32)
|
|
|
|
#define QUERY_UPDATE_SELECT_UPDATE_CANDIDATE (12L << 32)
|
|
#define QUERY_UPDATE_SELECT_UPDATE_CANDIDATE_NON_OBJECT_ID (13L << 32)
|
|
#define QUERY_UPDATE_SELECT_UPDATE_CANDIDATE_ONLY_OBJECT_ID (14L << 32)
|
|
#define QUERY_UPDATE_SELECT_UPDATE_CANDIDATE_BOTH_FILTER (15L << 32)
|
|
|
|
|
|
#define QUERY_ID_RETRY_RECORD_INSERT (20L << 32)
|
|
#define QUERY_ID_RETRY_RECORD_DELETE (21L << 32)
|
|
#define QUERY_ID_RETRY_RECORD_SELECT (22L << 32)
|
|
|
|
#define QUERY_ID_INSERT_OR_REPLACE (23L << 32)
|
|
|
|
|
|
/* GUC that controls the query plan cache size */
|
|
extern int QueryPlanCacheSizeLimit;
|
|
|
|
|
|
void InitializeQueryPlanCache(void);
|
|
SPIPlanPtr GetSPIQueryPlan(uint64 collectionId, uint64 queryId,
|
|
const char *query, Oid *argTypes, int argCount);
|
|
|
|
SPIPlanPtr GetSPIQueryPlanWithLocalShard(uint64 collectionId, const char *shardTableName,
|
|
uint64 queryId,
|
|
const char *query, Oid *argTypes, int argCount);
|
|
|
|
#endif
|