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

Function unscopedExecutorTable

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

Source from the content-addressed store, hash-verified

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