Implement checked aggregation plans, native SQL, and bounded RPC capture
This commit is contained in:
@@ -1307,12 +1307,12 @@ const lowerPackage = (
|
||||
if (parameters.length) {
|
||||
const use = identifier(clause.identifier(1));
|
||||
const reason = stringValue(clause.stringLiteral()!);
|
||||
if (!["select", "predicate", "order"].includes(use) || !reason.trim())
|
||||
if (!["select", "predicate", "order", "aggregate", "group", "distinct"].includes(use) || !reason.trim())
|
||||
loweringIssue(
|
||||
state,
|
||||
clause,
|
||||
"invalid-query-allowance",
|
||||
"Expected select/predicate/order and a nonempty reason",
|
||||
"Expected select/predicate/order/aggregate/group/distinct and a nonempty reason",
|
||||
);
|
||||
templateAllowances.push({
|
||||
interface: state.types.interface(clause.interfaceType()!),
|
||||
@@ -1329,12 +1329,16 @@ const lowerPackage = (
|
||||
const member = contract?.members.find((entry) => entry.displayName === identifier(clause.identifier(0)));
|
||||
const use = identifier(clause.identifier(1));
|
||||
const reason = stringValue(clause.stringLiteral()!);
|
||||
if (!member || !["select", "predicate", "order"].includes(use) || !reason.trim())
|
||||
if (
|
||||
!member ||
|
||||
!["select", "predicate", "order", "aggregate", "group", "distinct"].includes(use) ||
|
||||
!reason.trim()
|
||||
)
|
||||
loweringIssue(
|
||||
state,
|
||||
clause,
|
||||
"invalid-query-allowance",
|
||||
"Query allowances name an exact member, use (select/predicate/order), and nonempty reason",
|
||||
"Query allowances name an exact member, use (select/predicate/order/aggregate/group/distinct), and nonempty reason",
|
||||
);
|
||||
else
|
||||
declaration.allowances.push({
|
||||
|
||||
Reference in New Issue
Block a user