Files
NapCatQQ/.pnpm-store/v3/files/ac/e41733a75dad7df38720bcc869357106c3b620b2ed61ce4d73b256f3862945055f21b61d26d3cd3faace76d087bee533b7947cbc697ccace89e9a7665865f2
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

25 lines
1.4 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addRootServiceNodeBindingIfContextFree = addRootServiceNodeBindingIfContextFree;
const buildPlanBindingConstraintsList_1 = require("../calculations/buildPlanBindingConstraintsList");
const LazyPlanServiceNode_1 = require("../models/LazyPlanServiceNode");
const addServiceNodeBindingIfContextFree_1 = require("./addServiceNodeBindingIfContextFree");
/**
* Attach a binding to the root service node if the binding is context-free.
* @param params The plan parameters.
* @param serviceNode The service node to attach the binding to.
* @param binding The binding to attach.
* @returns True if the binding requires ancestor metadata, false otherwise.
*/
function addRootServiceNodeBindingIfContextFree(params, serviceNode, binding) {
if (LazyPlanServiceNode_1.LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
return {
isContextFreeBinding: true,
shouldInvalidateServiceNode: false,
};
}
const bindingConstraintsList = (0, buildPlanBindingConstraintsList_1.buildPlanBindingConstraintsList)(params);
const chained = params.rootConstraints.isMultiple && params.rootConstraints.chained;
return (0, addServiceNodeBindingIfContextFree_1.addServiceNodeBindingIfContextFree)(params, serviceNode, binding, bindingConstraintsList, chained);
}
//# sourceMappingURL=addRootServiceNodeBindingIfContextFree.js.map