@sequenceholdings/orm 2.5.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdl.cjs CHANGED
@@ -1246,6 +1246,11 @@ var CELL_TYPENAMES = {
1246
1246
  function cellsTypename(typename) {
1247
1247
  return `${typename}Cells`;
1248
1248
  }
1249
+
1250
+ // src/client/sql.ts
1251
+ var BUILTIN_SQL_READ_HASH = "sha256:a50c477c952a5e0fe68ed158a4530e4aab573c09bcbb1a8ac454dc88a39a6258";
1252
+
1253
+ // src/ir/index.ts
1249
1254
  var LEGACY_IR_VERSION = 1;
1250
1255
  var GUARDED_IR_VERSION = 2;
1251
1256
  var COMPOSED_IR_VERSION = 3;
@@ -1558,7 +1563,8 @@ var compiledOperationSchema = zod.z.object({
1558
1563
  }).superRefine((operation, ctx) => {
1559
1564
  if (operation.language === "sql") {
1560
1565
  const validPlan = operation.sqlQuery ? !operation.sql && operation.irVersion === RUNTIME_SQL_IR_VERSION : !!operation.sql && operation.irVersion === SQL_IR_VERSION;
1561
- if (!validPlan || operation.kind !== "query" || operation.roots.length !== 0 || !operation.requires?.capability) {
1566
+ const builtin = operation.name === "BuiltinSqlRead" && operation.opHash === BUILTIN_SQL_READ_HASH && operation.requires === null;
1567
+ if (!validPlan || operation.kind !== "query" || operation.roots.length !== 0 || !builtin && !operation.requires?.capability) {
1562
1568
  ctx.addIssue({ code: "custom", message: "SQL operations require a query-only v4 plan or v5 runtime contract, capability, and no GraphQL roots" });
1563
1569
  }
1564
1570
  } else if (operation.sql || operation.sqlQuery || operation.roots.length === 0) {