MCPcopy Index your code
hub / github.com/tinyplex/tinybase / when

Function when

src/persisters/common/database/postgresql.ts:122–134  ·  view source on GitHub ↗
(tableName: string, newOrOldOrBoth: 0 | 1 | 2)

Source from the content-addressed store, hash-verified

120 `PERFORM pg_notify('${channel}',${message});`;
121
122 const when = (tableName: string, newOrOldOrBoth: 0 | 1 | 2): string =>
123 isJson
124 ? TRUE
125 : newOrOldOrBoth === 2
126 ? when(tableName, 0) + ' OR ' + when(tableName, 1)
127 : strReplace(
128 mapGet(
129 (defaultedConfig as DefaultedTabularConfig)[0],
130 tableName,
131 )?.[2] ?? TRUE,
132 TABLE_NAME_PLACEHOLDER,
133 newOrOldOrBoth == 0 ? 'NEW' : 'OLD',
134 );
135
136 const addDataChangedTriggers = (
137 tableName: string,

Callers 1

addDataChangedTriggersFunction · 0.85

Calls 2

strReplaceFunction · 0.90
mapGetFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…