-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcds-plugin.js
More file actions
21 lines (17 loc) · 845 Bytes
/
cds-plugin.js
File metadata and controls
21 lines (17 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const cds = require('@sap/cds');
const { enhanceModel } = require('./lib/csn-enhancements');
const { registerSessionVariableHandlers } = require('./lib/skipHandlers.js');
const { deploySQLiteTriggers } = require('./lib/sqlite/register.js');
const { registerPostgresCompilerHook, deployPostgresLabels } = require('./lib/postgres/register.js');
const { registerH2CompilerHook } = require('./lib/h2/register.js');
const { registerHDICompilerHook } = require('./lib/hana/register.js');
cds.on('loaded', enhanceModel);
cds.on('listening', registerSessionVariableHandlers);
cds.once('served', async () => {
await deploySQLiteTriggers();
await deployPostgresLabels();
});
registerH2CompilerHook();
registerPostgresCompilerHook();
registerHDICompilerHook();
cds.add?.register?.('change-tracking-migration', require('./lib/addMigrationTable.js'));