MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / unscopedExecutorTable

Function unscopedExecutorTable

packages/core/sdk/src/core-schema.ts:42–53  ·  view source on GitHub ↗
(
  name: string,
  columns: TColumns,
)

Source from the content-addressed store, hash-verified

40/** A truly global table (the blob store). Isolation is carried in the row's
41 * `namespace` (which encodes the owner partition + plugin id), not a policy. */
42const unscopedExecutorTable = <const TColumns extends UserColumns>(
43 name: string,
44 columns: TColumns,
45) => {
46 const out = table(name, {
47 ...columns,
48 row_id: idColumn("row_id", "varchar(255)").defaultTo$("auto"),
49 id: keyColumn("id"),
50 });
51 out.unique(`${name}_id_uidx`, ["id"]);
52 return out.policy({ name: executorUnscopedPolicyName });
53};
54
55/** A tenant-shared table (catalog / blobs) — partitioned only by `tenant`. */
56const tenantExecutorTable = <const TColumns extends UserColumns>(

Callers 1

core-schema.tsFile · 0.85

Calls 6

tableFunction · 0.90
idColumnFunction · 0.90
keyColumnFunction · 0.85
policyMethod · 0.80
uniqueMethod · 0.65
defaultTo$Method · 0.45

Tested by

no test coverage detected