From dcc0f03601a8e956e447b0a6a9aa54726d047797 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Thu, 14 Nov 2024 12:31:09 -0800 Subject: [PATCH] DataSync: export NewRecordBehaviour --- lib/IHP/DataSync/ihp-datasync.js | 1 + lib/IHP/DataSync/index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/IHP/DataSync/ihp-datasync.js b/lib/IHP/DataSync/ihp-datasync.js index af4f77978..d6c41b740 100644 --- a/lib/IHP/DataSync/ihp-datasync.js +++ b/lib/IHP/DataSync/ihp-datasync.js @@ -233,6 +233,7 @@ class DataSyncController { const APPEND_NEW_RECORD = 0; const PREPEND_NEW_RECORD = 1; +export const NewRecordBehaviour = { APPEND_NEW_RECORD, PREPEND_NEW_RECORD }; class DataSubscription { constructor(query, cache = null) { diff --git a/lib/IHP/DataSync/index.js b/lib/IHP/DataSync/index.js index 7577b8883..1674daaaa 100644 --- a/lib/IHP/DataSync/index.js +++ b/lib/IHP/DataSync/index.js @@ -19,7 +19,7 @@ import { whereGreaterThan, whereGreaterThanOrEqual } from './ihp-querybuilder.js'; -import { DataSyncController, DataSubscription, initIHPBackend, createRecord, createRecords, updateRecord, updateRecords, deleteRecord, deleteRecords } from './ihp-datasync.js'; +import { DataSyncController, DataSubscription, initIHPBackend, createRecord, createRecords, updateRecord, updateRecords, deleteRecord, deleteRecords, NewRecordBehaviour } from './ihp-datasync.js'; import { Transaction, withTransaction } from './transaction.js'; export { @@ -45,7 +45,7 @@ export { whereGreaterThanOrEqual, /* ihp-datasync.js */ - DataSyncController, DataSubscription, initIHPBackend, createRecord, createRecords, updateRecord, updateRecords, deleteRecord, deleteRecords, + DataSyncController, DataSubscription, initIHPBackend, createRecord, createRecords, updateRecord, updateRecords, deleteRecord, deleteRecords, NewRecordBehaviour, /* transaction.js */ Transaction, withTransaction