@harperfast/harper 5.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_OF_CONDUCT.md +83 -0
- package/LICENSE +201 -0
- package/README.md +54 -0
- package/SECURITY.md +18 -0
- package/SUPPORT.md +26 -0
- package/dist/bin/BinObjects.d.ts +9 -0
- package/dist/bin/BinObjects.js +15 -0
- package/dist/bin/BinObjects.js.map +1 -0
- package/dist/bin/cliOperations.d.ts +12 -0
- package/dist/bin/cliOperations.js +156 -0
- package/dist/bin/cliOperations.js.map +1 -0
- package/dist/bin/copyDb.d.ts +2 -0
- package/dist/bin/copyDb.js +298 -0
- package/dist/bin/copyDb.js.map +1 -0
- package/dist/bin/harper.d.ts +2 -0
- package/dist/bin/harper.js +148 -0
- package/dist/bin/harper.js.map +1 -0
- package/dist/bin/install.d.ts +2 -0
- package/dist/bin/install.js +16 -0
- package/dist/bin/install.js.map +1 -0
- package/dist/bin/lite.d.ts +1 -0
- package/dist/bin/lite.js +6 -0
- package/dist/bin/lite.js.map +1 -0
- package/dist/bin/restart.d.ts +13 -0
- package/dist/bin/restart.js +194 -0
- package/dist/bin/restart.js.map +1 -0
- package/dist/bin/run.d.ts +21 -0
- package/dist/bin/run.js +365 -0
- package/dist/bin/run.js.map +1 -0
- package/dist/bin/status.d.ts +2 -0
- package/dist/bin/status.js +56 -0
- package/dist/bin/status.js.map +1 -0
- package/dist/bin/stop.d.ts +2 -0
- package/dist/bin/stop.js +17 -0
- package/dist/bin/stop.js.map +1 -0
- package/dist/bin/upgrade.d.ts +7 -0
- package/dist/bin/upgrade.js +111 -0
- package/dist/bin/upgrade.js.map +1 -0
- package/dist/components/Application.d.ts +110 -0
- package/dist/components/Application.js +509 -0
- package/dist/components/Application.js.map +1 -0
- package/dist/components/ApplicationScope.d.ts +28 -0
- package/dist/components/ApplicationScope.js +81 -0
- package/dist/components/ApplicationScope.js.map +1 -0
- package/dist/components/Component.d.ts +21 -0
- package/dist/components/Component.js +43 -0
- package/dist/components/Component.js.map +1 -0
- package/dist/components/ComponentV1.d.ts +69 -0
- package/dist/components/ComponentV1.js +263 -0
- package/dist/components/ComponentV1.js.map +1 -0
- package/dist/components/DEFAULT_CONFIG.d.ts +18 -0
- package/dist/components/DEFAULT_CONFIG.js +22 -0
- package/dist/components/DEFAULT_CONFIG.js.map +1 -0
- package/dist/components/EntryHandler.d.ts +61 -0
- package/dist/components/EntryHandler.js +148 -0
- package/dist/components/EntryHandler.js.map +1 -0
- package/dist/components/OptionsWatcher.d.ts +75 -0
- package/dist/components/OptionsWatcher.js +281 -0
- package/dist/components/OptionsWatcher.js.map +1 -0
- package/dist/components/PluginModule.d.ts +5 -0
- package/dist/components/PluginModule.js +3 -0
- package/dist/components/PluginModule.js.map +1 -0
- package/dist/components/Scope.d.ts +49 -0
- package/dist/components/Scope.js +262 -0
- package/dist/components/Scope.js.map +1 -0
- package/dist/components/componentLoader.js +498 -0
- package/dist/components/componentLoader.js.map +1 -0
- package/dist/components/deriveCommonPatternBase.d.ts +1 -0
- package/dist/components/deriveCommonPatternBase.js +34 -0
- package/dist/components/deriveCommonPatternBase.js.map +1 -0
- package/dist/components/deriveGlobOptions.d.ts +13 -0
- package/dist/components/deriveGlobOptions.js +30 -0
- package/dist/components/deriveGlobOptions.js.map +1 -0
- package/dist/components/deriveURLPath.d.ts +3 -0
- package/dist/components/deriveURLPath.js +55 -0
- package/dist/components/deriveURLPath.js.map +1 -0
- package/dist/components/operations.d.ts +97 -0
- package/dist/components/operations.js +556 -0
- package/dist/components/operations.js.map +1 -0
- package/dist/components/operationsValidation.d.ts +44 -0
- package/dist/components/operationsValidation.js +221 -0
- package/dist/components/operationsValidation.js.map +1 -0
- package/dist/components/packageComponent.d.ts +8 -0
- package/dist/components/packageComponent.js +42 -0
- package/dist/components/packageComponent.js.map +1 -0
- package/dist/components/requestRestart.d.ts +3 -0
- package/dist/components/requestRestart.js +27 -0
- package/dist/components/requestRestart.js.map +1 -0
- package/dist/components/resolveBaseURLPath.d.ts +15 -0
- package/dist/components/resolveBaseURLPath.js +38 -0
- package/dist/components/resolveBaseURLPath.js.map +1 -0
- package/dist/components/status/ComponentStatus.d.ts +61 -0
- package/dist/components/status/ComponentStatus.js +102 -0
- package/dist/components/status/ComponentStatus.js.map +1 -0
- package/dist/components/status/ComponentStatusRegistry.d.ts +89 -0
- package/dist/components/status/ComponentStatusRegistry.js +195 -0
- package/dist/components/status/ComponentStatusRegistry.js.map +1 -0
- package/dist/components/status/api.d.ts +104 -0
- package/dist/components/status/api.js +137 -0
- package/dist/components/status/api.js.map +1 -0
- package/dist/components/status/crossThread.d.ts +62 -0
- package/dist/components/status/crossThread.js +343 -0
- package/dist/components/status/crossThread.js.map +1 -0
- package/dist/components/status/errors.d.ts +68 -0
- package/dist/components/status/errors.js +123 -0
- package/dist/components/status/errors.js.map +1 -0
- package/dist/components/status/index.d.ts +35 -0
- package/dist/components/status/index.js +75 -0
- package/dist/components/status/index.js.map +1 -0
- package/dist/components/status/internal.d.ts +40 -0
- package/dist/components/status/internal.js +76 -0
- package/dist/components/status/internal.js.map +1 -0
- package/dist/components/status/registry.d.ts +10 -0
- package/dist/components/status/registry.js +14 -0
- package/dist/components/status/registry.js.map +1 -0
- package/dist/components/status/types.d.ts +94 -0
- package/dist/components/status/types.js +20 -0
- package/dist/components/status/types.js.map +1 -0
- package/dist/config/RootConfigWatcher.d.ts +10 -0
- package/dist/config/RootConfigWatcher.js +59 -0
- package/dist/config/RootConfigWatcher.js.map +1 -0
- package/dist/config/configHelpers.d.ts +6 -0
- package/dist/config/configHelpers.js +47 -0
- package/dist/config/configHelpers.js.map +1 -0
- package/dist/config/configUtils.d.ts +85 -0
- package/dist/config/configUtils.js +801 -0
- package/dist/config/configUtils.js.map +1 -0
- package/dist/config/harperConfigEnvVars.d.ts +46 -0
- package/dist/config/harperConfigEnvVars.js +527 -0
- package/dist/config/harperConfigEnvVars.js.map +1 -0
- package/dist/dataLayer/CreateAttributeObject.d.ts +19 -0
- package/dist/dataLayer/CreateAttributeObject.js +23 -0
- package/dist/dataLayer/CreateAttributeObject.js.map +1 -0
- package/dist/dataLayer/CreateTableObject.d.ts +7 -0
- package/dist/dataLayer/CreateTableObject.js +10 -0
- package/dist/dataLayer/CreateTableObject.js.map +1 -0
- package/dist/dataLayer/DataLayerObjects.d.ts +22 -0
- package/dist/dataLayer/DataLayerObjects.js +33 -0
- package/dist/dataLayer/DataLayerObjects.js.map +1 -0
- package/dist/dataLayer/DeleteBeforeObject.d.ts +18 -0
- package/dist/dataLayer/DeleteBeforeObject.js +21 -0
- package/dist/dataLayer/DeleteBeforeObject.js.map +1 -0
- package/dist/dataLayer/DeleteObject.d.ts +19 -0
- package/dist/dataLayer/DeleteObject.js +23 -0
- package/dist/dataLayer/DeleteObject.js.map +1 -0
- package/dist/dataLayer/DropAttributeObject.d.ts +7 -0
- package/dist/dataLayer/DropAttributeObject.js +10 -0
- package/dist/dataLayer/DropAttributeObject.js.map +1 -0
- package/dist/dataLayer/GetBackupObject.d.ts +16 -0
- package/dist/dataLayer/GetBackupObject.js +20 -0
- package/dist/dataLayer/GetBackupObject.js.map +1 -0
- package/dist/dataLayer/InsertObject.d.ts +20 -0
- package/dist/dataLayer/InsertObject.js +24 -0
- package/dist/dataLayer/InsertObject.js.map +1 -0
- package/dist/dataLayer/ReadAuditLogObject.d.ts +18 -0
- package/dist/dataLayer/ReadAuditLogObject.js +22 -0
- package/dist/dataLayer/ReadAuditLogObject.js.map +1 -0
- package/dist/dataLayer/SQLSearch.d.ts +171 -0
- package/dist/dataLayer/SQLSearch.js +1168 -0
- package/dist/dataLayer/SQLSearch.js.map +1 -0
- package/dist/dataLayer/SearchByConditionsObject.d.ts +85 -0
- package/dist/dataLayer/SearchByConditionsObject.js +57 -0
- package/dist/dataLayer/SearchByConditionsObject.js.map +1 -0
- package/dist/dataLayer/SearchByHashObject.d.ts +17 -0
- package/dist/dataLayer/SearchByHashObject.js +20 -0
- package/dist/dataLayer/SearchByHashObject.js.map +1 -0
- package/dist/dataLayer/SearchObject.d.ts +30 -0
- package/dist/dataLayer/SearchObject.js +33 -0
- package/dist/dataLayer/SearchObject.js.map +1 -0
- package/dist/dataLayer/SqlSearchObject.d.ts +10 -0
- package/dist/dataLayer/SqlSearchObject.js +13 -0
- package/dist/dataLayer/SqlSearchObject.js.map +1 -0
- package/dist/dataLayer/UpdateObject.d.ts +18 -0
- package/dist/dataLayer/UpdateObject.js +22 -0
- package/dist/dataLayer/UpdateObject.js.map +1 -0
- package/dist/dataLayer/UpsertObject.d.ts +18 -0
- package/dist/dataLayer/UpsertObject.js +22 -0
- package/dist/dataLayer/UpsertObject.js.map +1 -0
- package/dist/dataLayer/bulkLoad.d.ts +28 -0
- package/dist/dataLayer/bulkLoad.js +624 -0
- package/dist/dataLayer/bulkLoad.js.map +1 -0
- package/dist/dataLayer/dataObjects/BulkLoadObjects.d.ts +17 -0
- package/dist/dataLayer/dataObjects/BulkLoadObjects.js +25 -0
- package/dist/dataLayer/dataObjects/BulkLoadObjects.js.map +1 -0
- package/dist/dataLayer/dataObjects/UpsertObject.d.ts +18 -0
- package/dist/dataLayer/dataObjects/UpsertObject.js +22 -0
- package/dist/dataLayer/dataObjects/UpsertObject.js.map +1 -0
- package/dist/dataLayer/delete.d.ts +22 -0
- package/dist/dataLayer/delete.js +111 -0
- package/dist/dataLayer/delete.js.map +1 -0
- package/dist/dataLayer/export.d.ts +15 -0
- package/dist/dataLayer/export.js +302 -0
- package/dist/dataLayer/export.js.map +1 -0
- package/dist/dataLayer/getBackup.d.ts +8 -0
- package/dist/dataLayer/getBackup.js +28 -0
- package/dist/dataLayer/getBackup.js.map +1 -0
- package/dist/dataLayer/harperBridge/BridgeMethods.d.ts +24 -0
- package/dist/dataLayer/harperBridge/BridgeMethods.js +62 -0
- package/dist/dataLayer/harperBridge/BridgeMethods.js.map +1 -0
- package/dist/dataLayer/harperBridge/ResourceBridge.d.ts +104 -0
- package/dist/dataLayer/harperBridge/ResourceBridge.js +630 -0
- package/dist/dataLayer/harperBridge/ResourceBridge.js.map +1 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.d.ts +14 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.js +24 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.js.map +1 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.d.ts +11 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.js +68 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.js.map +1 -0
- package/dist/dataLayer/harperBridge/harperBridge.d.ts +2 -0
- package/dist/dataLayer/harperBridge/harperBridge.js +18 -0
- package/dist/dataLayer/harperBridge/harperBridge.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/LMDBBridge.d.ts +47 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/LMDBBridge.js +99 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/LMDBBridge.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.d.ts +15 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js +18 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.d.ts +12 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.js +74 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.d.ts +13 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.js +54 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.js +23 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.js +62 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.js +82 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.d.ts +11 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.js +76 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.d.ts +9 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.js +83 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.js +73 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.js +110 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.d.ts +14 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.js +33 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.d.ts +7 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.js +110 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.js +21 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.d.ts +14 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.js +25 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.d.ts +7 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.js +180 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.js +134 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.js +14 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.d.ts +15 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.js +26 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.js +17 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.d.ts +12 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.js +52 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.d.ts +15 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.js +56 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.d.ts +16 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.js +20 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.d.ts +16 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.js +22 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.d.ts +16 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.js +21 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.d.ts +19 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.js +22 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.d.ts +18 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.js +23 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.d.ts +18 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.js +23 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.d.ts +21 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js +24 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.d.ts +7 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.js +19 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.d.ts +22 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js +137 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.d.ts +9 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.js +73 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.js +38 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js +29 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.d.ts +17 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.js +63 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.d.ts +106 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.js +251 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.js +66 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.js.map +1 -0
- package/dist/dataLayer/hdbInfoController.d.ts +28 -0
- package/dist/dataLayer/hdbInfoController.js +203 -0
- package/dist/dataLayer/hdbInfoController.js.map +1 -0
- package/dist/dataLayer/insert.d.ts +44 -0
- package/dist/dataLayer/insert.js +192 -0
- package/dist/dataLayer/insert.js.map +1 -0
- package/dist/dataLayer/readAuditLog.d.ts +8 -0
- package/dist/dataLayer/readAuditLog.js +37 -0
- package/dist/dataLayer/readAuditLog.js.map +1 -0
- package/dist/dataLayer/schema.d.ts +24 -0
- package/dist/dataLayer/schema.js +225 -0
- package/dist/dataLayer/schema.js.map +1 -0
- package/dist/dataLayer/schemaDescribe.d.ts +26 -0
- package/dist/dataLayer/schemaDescribe.js +265 -0
- package/dist/dataLayer/schemaDescribe.js.map +1 -0
- package/dist/dataLayer/search.d.ts +4 -0
- package/dist/dataLayer/search.js +56 -0
- package/dist/dataLayer/search.js.map +1 -0
- package/dist/dataLayer/transaction.d.ts +8 -0
- package/dist/dataLayer/transaction.js +16 -0
- package/dist/dataLayer/transaction.js.map +1 -0
- package/dist/dataLayer/update.d.ts +15 -0
- package/dist/dataLayer/update.js +107 -0
- package/dist/dataLayer/update.js.map +1 -0
- package/dist/globals.d.ts +7 -0
- package/dist/globals.js +12 -0
- package/dist/globals.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/json/systemSchema.json +373 -0
- package/dist/launchServiceScripts/utility/checkNodeVersion.d.ts +4 -0
- package/dist/launchServiceScripts/utility/checkNodeVersion.js +13 -0
- package/dist/launchServiceScripts/utility/checkNodeVersion.js.map +1 -0
- package/dist/resources/DatabaseTransaction.d.ts +96 -0
- package/dist/resources/DatabaseTransaction.js +354 -0
- package/dist/resources/DatabaseTransaction.js.map +1 -0
- package/dist/resources/ErrorResource.d.ts +26 -0
- package/dist/resources/ErrorResource.js +60 -0
- package/dist/resources/ErrorResource.js.map +1 -0
- package/dist/resources/IterableEventQueue.d.ts +19 -0
- package/dist/resources/IterableEventQueue.js +103 -0
- package/dist/resources/IterableEventQueue.js.map +1 -0
- package/dist/resources/LMDBTransaction.d.ts +43 -0
- package/dist/resources/LMDBTransaction.js +371 -0
- package/dist/resources/LMDBTransaction.js.map +1 -0
- package/dist/resources/RecordEncoder.d.ts +65 -0
- package/dist/resources/RecordEncoder.js +700 -0
- package/dist/resources/RecordEncoder.js.map +1 -0
- package/dist/resources/RequestTarget.d.ts +57 -0
- package/dist/resources/RequestTarget.js +91 -0
- package/dist/resources/RequestTarget.js.map +1 -0
- package/dist/resources/Resource.d.ts +152 -0
- package/dist/resources/Resource.js +727 -0
- package/dist/resources/Resource.js.map +1 -0
- package/dist/resources/ResourceInterface.d.ts +162 -0
- package/dist/resources/ResourceInterface.js +3 -0
- package/dist/resources/ResourceInterface.js.map +1 -0
- package/dist/resources/ResourceInterfaceV2.d.ts +21 -0
- package/dist/resources/ResourceInterfaceV2.js +3 -0
- package/dist/resources/ResourceInterfaceV2.js.map +1 -0
- package/dist/resources/ResourceV2.d.ts +30 -0
- package/dist/resources/ResourceV2.js +27 -0
- package/dist/resources/ResourceV2.js.map +1 -0
- package/dist/resources/Resources.d.ts +36 -0
- package/dist/resources/Resources.js +155 -0
- package/dist/resources/Resources.js.map +1 -0
- package/dist/resources/RocksIndexStore.d.ts +24 -0
- package/dist/resources/RocksIndexStore.js +54 -0
- package/dist/resources/RocksIndexStore.js.map +1 -0
- package/dist/resources/RocksTransactionLogStore.d.ts +60 -0
- package/dist/resources/RocksTransactionLogStore.js +344 -0
- package/dist/resources/RocksTransactionLogStore.js.map +1 -0
- package/dist/resources/Table.d.ts +854 -0
- package/dist/resources/Table.js +4350 -0
- package/dist/resources/Table.js.map +1 -0
- package/dist/resources/analytics/hostnames.d.ts +16 -0
- package/dist/resources/analytics/hostnames.js +72 -0
- package/dist/resources/analytics/hostnames.js.map +1 -0
- package/dist/resources/analytics/metadata.d.ts +9 -0
- package/dist/resources/analytics/metadata.js +12 -0
- package/dist/resources/analytics/metadata.js.map +1 -0
- package/dist/resources/analytics/profile.d.ts +2 -0
- package/dist/resources/analytics/profile.js +144 -0
- package/dist/resources/analytics/profile.js.map +1 -0
- package/dist/resources/analytics/read.d.ts +41 -0
- package/dist/resources/analytics/read.js +189 -0
- package/dist/resources/analytics/read.js.map +1 -0
- package/dist/resources/analytics/write.d.ts +131 -0
- package/dist/resources/analytics/write.js +822 -0
- package/dist/resources/analytics/write.js.map +1 -0
- package/dist/resources/auditStore.d.ts +81 -0
- package/dist/resources/auditStore.js +572 -0
- package/dist/resources/auditStore.js.map +1 -0
- package/dist/resources/blob.d.ts +137 -0
- package/dist/resources/blob.js +1273 -0
- package/dist/resources/blob.js.map +1 -0
- package/dist/resources/crdt.d.ts +19 -0
- package/dist/resources/crdt.js +146 -0
- package/dist/resources/crdt.js.map +1 -0
- package/dist/resources/dataLoader.d.ts +98 -0
- package/dist/resources/dataLoader.js +461 -0
- package/dist/resources/dataLoader.js.map +1 -0
- package/dist/resources/databases.d.ts +131 -0
- package/dist/resources/databases.js +1220 -0
- package/dist/resources/databases.js.map +1 -0
- package/dist/resources/graphql.d.ts +19 -0
- package/dist/resources/graphql.js +223 -0
- package/dist/resources/graphql.js.map +1 -0
- package/dist/resources/indexes/HierarchicalNavigableSmallWorld.d.ts +87 -0
- package/dist/resources/indexes/HierarchicalNavigableSmallWorld.js +598 -0
- package/dist/resources/indexes/HierarchicalNavigableSmallWorld.js.map +1 -0
- package/dist/resources/indexes/customIndexes.d.ts +4 -0
- package/dist/resources/indexes/customIndexes.js +10 -0
- package/dist/resources/indexes/customIndexes.js.map +1 -0
- package/dist/resources/indexes/vector.d.ts +2 -0
- package/dist/resources/indexes/vector.js +40 -0
- package/dist/resources/indexes/vector.js.map +1 -0
- package/dist/resources/jsResource.d.ts +24 -0
- package/dist/resources/jsResource.js +82 -0
- package/dist/resources/jsResource.js.map +1 -0
- package/dist/resources/loadEnv.d.ts +5 -0
- package/dist/resources/loadEnv.js +28 -0
- package/dist/resources/loadEnv.js.map +1 -0
- package/dist/resources/login.d.ts +3 -0
- package/dist/resources/login.js +22 -0
- package/dist/resources/login.js.map +1 -0
- package/dist/resources/openApi.d.ts +27 -0
- package/dist/resources/openApi.js +327 -0
- package/dist/resources/openApi.js.map +1 -0
- package/dist/resources/registrationDeprecated.d.ts +4 -0
- package/dist/resources/registrationDeprecated.js +11 -0
- package/dist/resources/registrationDeprecated.js.map +1 -0
- package/dist/resources/replayLogs.d.ts +2 -0
- package/dist/resources/replayLogs.js +170 -0
- package/dist/resources/replayLogs.js.map +1 -0
- package/dist/resources/roles.d.ts +11 -0
- package/dist/resources/roles.js +102 -0
- package/dist/resources/roles.js.map +1 -0
- package/dist/resources/search.d.ts +39 -0
- package/dist/resources/search.js +1333 -0
- package/dist/resources/search.js.map +1 -0
- package/dist/resources/tracked.d.ts +49 -0
- package/dist/resources/tracked.js +665 -0
- package/dist/resources/tracked.js.map +1 -0
- package/dist/resources/transaction.d.ts +9 -0
- package/dist/resources/transaction.js +89 -0
- package/dist/resources/transaction.js.map +1 -0
- package/dist/resources/transactionBroadcast.d.ts +38 -0
- package/dist/resources/transactionBroadcast.js +263 -0
- package/dist/resources/transactionBroadcast.js.map +1 -0
- package/dist/security/auth.d.ts +9 -0
- package/dist/security/auth.js +408 -0
- package/dist/security/auth.js.map +1 -0
- package/dist/security/certificateVerification/certificateVerificationSource.d.ts +18 -0
- package/dist/security/certificateVerification/certificateVerificationSource.js +78 -0
- package/dist/security/certificateVerification/certificateVerificationSource.js.map +1 -0
- package/dist/security/certificateVerification/configValidation.d.ts +14 -0
- package/dist/security/certificateVerification/configValidation.js +101 -0
- package/dist/security/certificateVerification/configValidation.js.map +1 -0
- package/dist/security/certificateVerification/crlVerification.d.ts +29 -0
- package/dist/security/certificateVerification/crlVerification.js +564 -0
- package/dist/security/certificateVerification/crlVerification.js.map +1 -0
- package/dist/security/certificateVerification/index.d.ts +31 -0
- package/dist/security/certificateVerification/index.js +111 -0
- package/dist/security/certificateVerification/index.js.map +1 -0
- package/dist/security/certificateVerification/ocspVerification.d.ts +23 -0
- package/dist/security/certificateVerification/ocspVerification.js +117 -0
- package/dist/security/certificateVerification/ocspVerification.js.map +1 -0
- package/dist/security/certificateVerification/pkijs-ed25519-patch.d.ts +14 -0
- package/dist/security/certificateVerification/pkijs-ed25519-patch.js +183 -0
- package/dist/security/certificateVerification/pkijs-ed25519-patch.js.map +1 -0
- package/dist/security/certificateVerification/types.d.ts +105 -0
- package/dist/security/certificateVerification/types.js +6 -0
- package/dist/security/certificateVerification/types.js.map +1 -0
- package/dist/security/certificateVerification/verificationConfig.d.ts +29 -0
- package/dist/security/certificateVerification/verificationConfig.js +121 -0
- package/dist/security/certificateVerification/verificationConfig.js.map +1 -0
- package/dist/security/certificateVerification/verificationUtils.d.ts +79 -0
- package/dist/security/certificateVerification/verificationUtils.js +441 -0
- package/dist/security/certificateVerification/verificationUtils.js.map +1 -0
- package/dist/security/cryptoHash.d.ts +2 -0
- package/dist/security/cryptoHash.js +35 -0
- package/dist/security/cryptoHash.js.map +1 -0
- package/dist/security/data_objects/PermissionAttributeResponseObject.d.ts +11 -0
- package/dist/security/data_objects/PermissionAttributeResponseObject.js +14 -0
- package/dist/security/data_objects/PermissionAttributeResponseObject.js.map +1 -0
- package/dist/security/data_objects/PermissionResponseObject.d.ts +57 -0
- package/dist/security/data_objects/PermissionResponseObject.js +105 -0
- package/dist/security/data_objects/PermissionResponseObject.js.map +1 -0
- package/dist/security/data_objects/PermissionTableResponseObject.d.ts +16 -0
- package/dist/security/data_objects/PermissionTableResponseObject.js +19 -0
- package/dist/security/data_objects/PermissionTableResponseObject.js.map +1 -0
- package/dist/security/fastifyAuth.d.ts +2 -0
- package/dist/security/fastifyAuth.js +135 -0
- package/dist/security/fastifyAuth.js.map +1 -0
- package/dist/security/impersonation.d.ts +11 -0
- package/dist/security/impersonation.js +139 -0
- package/dist/security/impersonation.js.map +1 -0
- package/dist/security/jsLoader.d.ts +9 -0
- package/dist/security/jsLoader.js +522 -0
- package/dist/security/jsLoader.js.map +1 -0
- package/dist/security/keys.d.ts +119 -0
- package/dist/security/keys.js +866 -0
- package/dist/security/keys.js.map +1 -0
- package/dist/security/permissionsTranslator.d.ts +9 -0
- package/dist/security/permissionsTranslator.js +269 -0
- package/dist/security/permissionsTranslator.js.map +1 -0
- package/dist/security/role.d.ts +5 -0
- package/dist/security/role.js +160 -0
- package/dist/security/role.js.map +1 -0
- package/dist/security/tokenAuthentication.d.ts +38 -0
- package/dist/security/tokenAuthentication.js +205 -0
- package/dist/security/tokenAuthentication.js.map +1 -0
- package/dist/security/user.d.ts +77 -0
- package/dist/security/user.js +349 -0
- package/dist/security/user.js.map +1 -0
- package/dist/server/DurableSubscriptionsSession.d.ts +74 -0
- package/dist/server/DurableSubscriptionsSession.js +511 -0
- package/dist/server/DurableSubscriptionsSession.js.map +1 -0
- package/dist/server/REST.d.ts +16 -0
- package/dist/server/REST.js +423 -0
- package/dist/server/REST.js.map +1 -0
- package/dist/server/Server.d.ts +62 -0
- package/dist/server/Server.js +27 -0
- package/dist/server/Server.js.map +1 -0
- package/dist/server/fastifyRoutes/helpers/getCORSOptions.d.ts +11 -0
- package/dist/server/fastifyRoutes/helpers/getCORSOptions.js +32 -0
- package/dist/server/fastifyRoutes/helpers/getCORSOptions.js.map +1 -0
- package/dist/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.d.ts +6 -0
- package/dist/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.js +13 -0
- package/dist/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.js.map +1 -0
- package/dist/server/fastifyRoutes/helpers/getServerOptions.d.ts +12 -0
- package/dist/server/fastifyRoutes/helpers/getServerOptions.js +30 -0
- package/dist/server/fastifyRoutes/helpers/getServerOptions.js.map +1 -0
- package/dist/server/fastifyRoutes/plugins/hdbCore.d.ts +2 -0
- package/dist/server/fastifyRoutes/plugins/hdbCore.js +31 -0
- package/dist/server/fastifyRoutes/plugins/hdbCore.js.map +1 -0
- package/dist/server/fastifyRoutes.d.ts +25 -0
- package/dist/server/fastifyRoutes.js +235 -0
- package/dist/server/fastifyRoutes.js.map +1 -0
- package/dist/server/graphqlQuerying.d.ts +1 -0
- package/dist/server/graphqlQuerying.js +630 -0
- package/dist/server/graphqlQuerying.js.map +1 -0
- package/dist/server/http.d.ts +15 -0
- package/dist/server/http.js +650 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/itc/serverHandlers.d.ts +10 -0
- package/dist/server/itc/serverHandlers.js +153 -0
- package/dist/server/itc/serverHandlers.js.map +1 -0
- package/dist/server/itc/utility/ITCEventObject.d.ts +6 -0
- package/dist/server/itc/utility/ITCEventObject.js +9 -0
- package/dist/server/itc/utility/ITCEventObject.js.map +1 -0
- package/dist/server/jobs/JobObject.d.ts +15 -0
- package/dist/server/jobs/JobObject.js +22 -0
- package/dist/server/jobs/JobObject.js.map +1 -0
- package/dist/server/jobs/jobProcess.d.ts +1 -0
- package/dist/server/jobs/jobProcess.js +66 -0
- package/dist/server/jobs/jobProcess.js.map +1 -0
- package/dist/server/jobs/jobRunner.d.ts +11 -0
- package/dist/server/jobs/jobRunner.js +160 -0
- package/dist/server/jobs/jobRunner.js.map +1 -0
- package/dist/server/jobs/jobs.d.ts +20 -0
- package/dist/server/jobs/jobs.js +267 -0
- package/dist/server/jobs/jobs.js.map +1 -0
- package/dist/server/loadRootComponents.d.ts +5 -0
- package/dist/server/loadRootComponents.js +45 -0
- package/dist/server/loadRootComponents.js.map +1 -0
- package/dist/server/mqtt.d.ts +9 -0
- package/dist/server/mqtt.js +466 -0
- package/dist/server/mqtt.js.map +1 -0
- package/dist/server/nodeName.d.ts +5 -0
- package/dist/server/nodeName.js +84 -0
- package/dist/server/nodeName.js.map +1 -0
- package/dist/server/operationsServer.d.ts +48 -0
- package/dist/server/operationsServer.js +265 -0
- package/dist/server/operationsServer.js.map +1 -0
- package/dist/server/serverHelpers/Headers.d.ts +20 -0
- package/dist/server/serverHelpers/Headers.js +134 -0
- package/dist/server/serverHelpers/Headers.js.map +1 -0
- package/dist/server/serverHelpers/JSONStream.d.ts +14 -0
- package/dist/server/serverHelpers/JSONStream.js +322 -0
- package/dist/server/serverHelpers/JSONStream.js.map +1 -0
- package/dist/server/serverHelpers/OperationFunctionObject.d.ts +9 -0
- package/dist/server/serverHelpers/OperationFunctionObject.js +17 -0
- package/dist/server/serverHelpers/OperationFunctionObject.js.map +1 -0
- package/dist/server/serverHelpers/Request.d.ts +69 -0
- package/dist/server/serverHelpers/Request.js +141 -0
- package/dist/server/serverHelpers/Request.js.map +1 -0
- package/dist/server/serverHelpers/contentTypes.d.ts +57 -0
- package/dist/server/serverHelpers/contentTypes.js +639 -0
- package/dist/server/serverHelpers/contentTypes.js.map +1 -0
- package/dist/server/serverHelpers/requestTimePlugin.d.ts +2 -0
- package/dist/server/serverHelpers/requestTimePlugin.js +56 -0
- package/dist/server/serverHelpers/requestTimePlugin.js.map +1 -0
- package/dist/server/serverHelpers/serverHandlers.d.ts +6 -0
- package/dist/server/serverHelpers/serverHandlers.js +130 -0
- package/dist/server/serverHelpers/serverHandlers.js.map +1 -0
- package/dist/server/serverHelpers/serverUtilities.d.ts +29 -0
- package/dist/server/serverHelpers/serverUtilities.js +356 -0
- package/dist/server/serverHelpers/serverUtilities.js.map +1 -0
- package/dist/server/serverRegistry.d.ts +3 -0
- package/dist/server/serverRegistry.js +11 -0
- package/dist/server/serverRegistry.js.map +1 -0
- package/dist/server/static.d.ts +16 -0
- package/dist/server/static.js +164 -0
- package/dist/server/static.js.map +1 -0
- package/dist/server/status/definitions.d.ts +27 -0
- package/dist/server/status/definitions.js +22 -0
- package/dist/server/status/definitions.js.map +1 -0
- package/dist/server/status/index.d.ts +26 -0
- package/dist/server/status/index.js +89 -0
- package/dist/server/status/index.js.map +1 -0
- package/dist/server/storageReclamation.d.ts +18 -0
- package/dist/server/storageReclamation.js +96 -0
- package/dist/server/storageReclamation.js.map +1 -0
- package/dist/server/threads/itc.d.ts +53 -0
- package/dist/server/threads/itc.js +81 -0
- package/dist/server/threads/itc.js.map +1 -0
- package/dist/server/threads/manageThreads.d.ts +30 -0
- package/dist/server/threads/manageThreads.js +579 -0
- package/dist/server/threads/manageThreads.js.map +1 -0
- package/dist/server/threads/socketRouter.d.ts +6 -0
- package/dist/server/threads/socketRouter.js +395 -0
- package/dist/server/threads/socketRouter.js.map +1 -0
- package/dist/server/threads/threadServer.d.ts +5 -0
- package/dist/server/threads/threadServer.js +288 -0
- package/dist/server/threads/threadServer.js.map +1 -0
- package/dist/server/throttle.d.ts +7 -0
- package/dist/server/throttle.js +71 -0
- package/dist/server/throttle.js.map +1 -0
- package/dist/sqlTranslator/SelectValidator.d.ts +79 -0
- package/dist/sqlTranslator/SelectValidator.js +274 -0
- package/dist/sqlTranslator/SelectValidator.js.map +1 -0
- package/dist/sqlTranslator/alasqlFunctionImporter.d.ts +2 -0
- package/dist/sqlTranslator/alasqlFunctionImporter.js +55 -0
- package/dist/sqlTranslator/alasqlFunctionImporter.js.map +1 -0
- package/dist/sqlTranslator/deleteTranslator.d.ts +2 -0
- package/dist/sqlTranslator/deleteTranslator.js +56 -0
- package/dist/sqlTranslator/deleteTranslator.js.map +1 -0
- package/dist/sqlTranslator/index.d.ts +16 -0
- package/dist/sqlTranslator/index.js +215 -0
- package/dist/sqlTranslator/index.js.map +1 -0
- package/dist/sqlTranslator/sql_statement_bucket.d.ts +46 -0
- package/dist/sqlTranslator/sql_statement_bucket.js +430 -0
- package/dist/sqlTranslator/sql_statement_bucket.js.map +1 -0
- package/dist/upgrade/UpgradeObjects.d.ts +5 -0
- package/dist/upgrade/UpgradeObjects.js +12 -0
- package/dist/upgrade/UpgradeObjects.js.map +1 -0
- package/dist/upgrade/directives/directivesController.d.ts +30 -0
- package/dist/upgrade/directives/directivesController.js +76 -0
- package/dist/upgrade/directives/directivesController.js.map +1 -0
- package/dist/upgrade/directivesManager.d.ts +7 -0
- package/dist/upgrade/directivesManager.js +125 -0
- package/dist/upgrade/directivesManager.js.map +1 -0
- package/dist/upgrade/upgradePrompt.d.ts +13 -0
- package/dist/upgrade/upgradePrompt.js +102 -0
- package/dist/upgrade/upgradePrompt.js.map +1 -0
- package/dist/upgrade/upgradeUtilities.d.ts +10 -0
- package/dist/upgrade/upgradeUtilities.js +26 -0
- package/dist/upgrade/upgradeUtilities.js.map +1 -0
- package/dist/utility/AWS/AWSConnector.d.ts +2 -0
- package/dist/utility/AWS/AWSConnector.js +26 -0
- package/dist/utility/AWS/AWSConnector.js.map +1 -0
- package/dist/utility/OperationFunctionCaller.d.ts +9 -0
- package/dist/utility/OperationFunctionCaller.js +58 -0
- package/dist/utility/OperationFunctionCaller.js.map +1 -0
- package/dist/utility/assignCmdEnvVariables.d.ts +10 -0
- package/dist/utility/assignCmdEnvVariables.js +55 -0
- package/dist/utility/assignCmdEnvVariables.js.map +1 -0
- package/dist/utility/common_utils.d.ts +264 -0
- package/dist/utility/common_utils.js +806 -0
- package/dist/utility/common_utils.js.map +1 -0
- package/dist/utility/environment/environmentManager.d.ts +41 -0
- package/dist/utility/environment/environmentManager.js +179 -0
- package/dist/utility/environment/environmentManager.js.map +1 -0
- package/dist/utility/environment/systemInformation.d.ts +67 -0
- package/dist/utility/environment/systemInformation.js +326 -0
- package/dist/utility/environment/systemInformation.js.map +1 -0
- package/dist/utility/errors/commonErrors.d.ts +171 -0
- package/dist/utility/errors/commonErrors.js +230 -0
- package/dist/utility/errors/commonErrors.js.map +1 -0
- package/dist/utility/errors/hdbError.d.ts +76 -0
- package/dist/utility/errors/hdbError.js +128 -0
- package/dist/utility/errors/hdbError.js.map +1 -0
- package/dist/utility/functions/date/dateFunctions.d.ts +11 -0
- package/dist/utility/functions/date/dateFunctions.js +64 -0
- package/dist/utility/functions/date/dateFunctions.js.map +1 -0
- package/dist/utility/functions/geo.d.ts +74 -0
- package/dist/utility/functions/geo.js +311 -0
- package/dist/utility/functions/geo.js.map +1 -0
- package/dist/utility/functions/sql/alaSQLExtension.d.ts +13 -0
- package/dist/utility/functions/sql/alaSQLExtension.js +96 -0
- package/dist/utility/functions/sql/alaSQLExtension.js.map +1 -0
- package/dist/utility/globalSchema.d.ts +151 -0
- package/dist/utility/globalSchema.js +34 -0
- package/dist/utility/globalSchema.js.map +1 -0
- package/dist/utility/hdbTerms.d.ts +737 -0
- package/dist/utility/hdbTerms.js +756 -0
- package/dist/utility/hdbTerms.js.map +1 -0
- package/dist/utility/install/checkJWTTokensExist.d.ts +5 -0
- package/dist/utility/install/checkJWTTokensExist.js +53 -0
- package/dist/utility/install/checkJWTTokensExist.js.map +1 -0
- package/dist/utility/install/installer.d.ts +17 -0
- package/dist/utility/install/installer.js +569 -0
- package/dist/utility/install/installer.js.map +1 -0
- package/dist/utility/installation.d.ts +12 -0
- package/dist/utility/installation.js +64 -0
- package/dist/utility/installation.js.map +1 -0
- package/dist/utility/lmdb/DBIDefinition.d.ts +16 -0
- package/dist/utility/lmdb/DBIDefinition.js +19 -0
- package/dist/utility/lmdb/DBIDefinition.js.map +1 -0
- package/dist/utility/lmdb/DeleteRecordsResponseObject.d.ts +21 -0
- package/dist/utility/lmdb/DeleteRecordsResponseObject.js +24 -0
- package/dist/utility/lmdb/DeleteRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/InsertRecordsResponseObject.d.ts +18 -0
- package/dist/utility/lmdb/InsertRecordsResponseObject.js +21 -0
- package/dist/utility/lmdb/InsertRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/OpenDBIObject.d.ts +23 -0
- package/dist/utility/lmdb/OpenDBIObject.js +29 -0
- package/dist/utility/lmdb/OpenDBIObject.js.map +1 -0
- package/dist/utility/lmdb/OpenEnvironmentObject.d.ts +22 -0
- package/dist/utility/lmdb/OpenEnvironmentObject.js +40 -0
- package/dist/utility/lmdb/OpenEnvironmentObject.js.map +1 -0
- package/dist/utility/lmdb/UpdateRecordsResponseObject.d.ts +21 -0
- package/dist/utility/lmdb/UpdateRecordsResponseObject.js +24 -0
- package/dist/utility/lmdb/UpdateRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/UpsertRecordsResponseObject.d.ts +18 -0
- package/dist/utility/lmdb/UpsertRecordsResponseObject.js +21 -0
- package/dist/utility/lmdb/UpsertRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/cleanLMDBMap.d.ts +6 -0
- package/dist/utility/lmdb/cleanLMDBMap.js +63 -0
- package/dist/utility/lmdb/cleanLMDBMap.js.map +1 -0
- package/dist/utility/lmdb/commonUtility.d.ts +28 -0
- package/dist/utility/lmdb/commonUtility.js +120 -0
- package/dist/utility/lmdb/commonUtility.js.map +1 -0
- package/dist/utility/lmdb/deleteUtility.d.ts +10 -0
- package/dist/utility/lmdb/deleteUtility.js +115 -0
- package/dist/utility/lmdb/deleteUtility.js.map +1 -0
- package/dist/utility/lmdb/environmentUtility.d.ts +81 -0
- package/dist/utility/lmdb/environmentUtility.js +432 -0
- package/dist/utility/lmdb/environmentUtility.js.map +1 -0
- package/dist/utility/lmdb/searchCursorFunctions.d.ts +93 -0
- package/dist/utility/lmdb/searchCursorFunctions.js +174 -0
- package/dist/utility/lmdb/searchCursorFunctions.js.map +1 -0
- package/dist/utility/lmdb/searchUtility.d.ts +204 -0
- package/dist/utility/lmdb/searchUtility.js +724 -0
- package/dist/utility/lmdb/searchUtility.js.map +1 -0
- package/dist/utility/lmdb/terms.d.ts +34 -0
- package/dist/utility/lmdb/terms.js +52 -0
- package/dist/utility/lmdb/terms.js.map +1 -0
- package/dist/utility/lmdb/writeUtility.d.ts +32 -0
- package/dist/utility/lmdb/writeUtility.js +360 -0
- package/dist/utility/lmdb/writeUtility.js.map +1 -0
- package/dist/utility/logging/harper_logger.d.ts +141 -0
- package/dist/utility/logging/harper_logger.js +862 -0
- package/dist/utility/logging/harper_logger.js.map +1 -0
- package/dist/utility/logging/logRotator.d.ts +19 -0
- package/dist/utility/logging/logRotator.js +146 -0
- package/dist/utility/logging/logRotator.js.map +1 -0
- package/dist/utility/logging/logger.d.ts +11 -0
- package/dist/utility/logging/logger.js +19 -0
- package/dist/utility/logging/logger.js.map +1 -0
- package/dist/utility/logging/readLog.d.ts +8 -0
- package/dist/utility/logging/readLog.js +339 -0
- package/dist/utility/logging/readLog.js.map +1 -0
- package/dist/utility/logging/transactionLog.d.ts +8 -0
- package/dist/utility/logging/transactionLog.js +46 -0
- package/dist/utility/logging/transactionLog.js.map +1 -0
- package/dist/utility/mount_hdb.d.ts +2 -0
- package/dist/utility/mount_hdb.js +51 -0
- package/dist/utility/mount_hdb.js.map +1 -0
- package/dist/utility/npmUtilities.d.ts +6 -0
- package/dist/utility/npmUtilities.js +91 -0
- package/dist/utility/npmUtilities.js.map +1 -0
- package/dist/utility/operationPermissions.d.ts +36 -0
- package/dist/utility/operationPermissions.js +116 -0
- package/dist/utility/operationPermissions.js.map +1 -0
- package/dist/utility/operation_authorization.d.ts +18 -0
- package/dist/utility/operation_authorization.js +667 -0
- package/dist/utility/operation_authorization.js.map +1 -0
- package/dist/utility/packageUtils.d.ts +9 -0
- package/dist/utility/packageUtils.js +52 -0
- package/dist/utility/packageUtils.js.map +1 -0
- package/dist/utility/password.d.ts +20 -0
- package/dist/utility/password.js +119 -0
- package/dist/utility/password.js.map +1 -0
- package/dist/utility/processManagement/processManagement.d.ts +35 -0
- package/dist/utility/processManagement/processManagement.js +188 -0
- package/dist/utility/processManagement/processManagement.js.map +1 -0
- package/dist/utility/processManagement/servicesConfig.d.ts +29 -0
- package/dist/utility/processManagement/servicesConfig.js +52 -0
- package/dist/utility/processManagement/servicesConfig.js.map +1 -0
- package/dist/utility/scripts/restartHdb.d.ts +1 -0
- package/dist/utility/scripts/restartHdb.js +23 -0
- package/dist/utility/scripts/restartHdb.js.map +1 -0
- package/dist/utility/signalling.d.ts +2 -0
- package/dist/utility/signalling.js +35 -0
- package/dist/utility/signalling.js.map +1 -0
- package/dist/utility/terms/certificates.d.ts +46 -0
- package/dist/utility/terms/certificates.js +65 -0
- package/dist/utility/terms/certificates.js.map +1 -0
- package/dist/utility/when.d.ts +3 -0
- package/dist/utility/when.js +18 -0
- package/dist/utility/when.js.map +1 -0
- package/dist/validation/bulkDeleteValidator.d.ts +2 -0
- package/dist/validation/bulkDeleteValidator.js +21 -0
- package/dist/validation/bulkDeleteValidator.js.map +1 -0
- package/dist/validation/check_permissions.d.ts +2 -0
- package/dist/validation/check_permissions.js +20 -0
- package/dist/validation/check_permissions.js.map +1 -0
- package/dist/validation/common_validators.d.ts +19 -0
- package/dist/validation/common_validators.js +76 -0
- package/dist/validation/common_validators.js.map +1 -0
- package/dist/validation/configValidator.d.ts +8 -0
- package/dist/validation/configValidator.js +292 -0
- package/dist/validation/configValidator.js.map +1 -0
- package/dist/validation/deleteValidator.d.ts +2 -0
- package/dist/validation/deleteValidator.js +15 -0
- package/dist/validation/deleteValidator.js.map +1 -0
- package/dist/validation/fileLoadValidator.d.ts +4 -0
- package/dist/validation/fileLoadValidator.js +138 -0
- package/dist/validation/fileLoadValidator.js.map +1 -0
- package/dist/validation/insertValidator.d.ts +2 -0
- package/dist/validation/insertValidator.js +38 -0
- package/dist/validation/insertValidator.js.map +1 -0
- package/dist/validation/installValidator.d.ts +7 -0
- package/dist/validation/installValidator.js +28 -0
- package/dist/validation/installValidator.js.map +1 -0
- package/dist/validation/readLogValidator.d.ts +2 -0
- package/dist/validation/readLogValidator.js +48 -0
- package/dist/validation/readLogValidator.js.map +1 -0
- package/dist/validation/role_validation.d.ts +3 -0
- package/dist/validation/role_validation.js +284 -0
- package/dist/validation/role_validation.js.map +1 -0
- package/dist/validation/schemaMetadataValidator.d.ts +16 -0
- package/dist/validation/schemaMetadataValidator.js +38 -0
- package/dist/validation/schemaMetadataValidator.js.map +1 -0
- package/dist/validation/searchValidator.d.ts +2 -0
- package/dist/validation/searchValidator.js +141 -0
- package/dist/validation/searchValidator.js.map +1 -0
- package/dist/validation/statusValidator.d.ts +19 -0
- package/dist/validation/statusValidator.js +95 -0
- package/dist/validation/statusValidator.js.map +1 -0
- package/dist/validation/transactionLogValidator.d.ts +2 -0
- package/dist/validation/transactionLogValidator.js +28 -0
- package/dist/validation/transactionLogValidator.js.map +1 -0
- package/dist/validation/user_validation.d.ts +3 -0
- package/dist/validation/user_validation.js +52 -0
- package/dist/validation/user_validation.js.map +1 -0
- package/dist/validation/validationWrapper.d.ts +15 -0
- package/dist/validation/validationWrapper.js +95 -0
- package/dist/validation/validationWrapper.js.map +1 -0
- package/package.json +225 -0
- package/static/README.md +13 -0
- package/static/ascii_logo.txt +21 -0
- package/static/defaultConfig.yaml +75 -0
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const environmentUtility = require('./environmentUtility.js');
|
|
3
|
+
const common = require('./commonUtility.js');
|
|
4
|
+
const lmdbTerms = require('./terms.js');
|
|
5
|
+
const LMDB_ERRORS = require('../errors/commonErrors.js').LMDB_ERRORS_ENUM;
|
|
6
|
+
const hdbTerms = require("../hdbTerms.js");
|
|
7
|
+
const cursorFunctions = require('./searchCursorFunctions.js');
|
|
8
|
+
const { parseRow } = cursorFunctions;
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
const lmdb = require('lmdb');
|
|
11
|
+
const { OVERFLOW_MARKER, MAX_SEARCH_KEY_LENGTH } = lmdbTerms;
|
|
12
|
+
/** UTILITY CURSOR FUNCTIONS **/
|
|
13
|
+
/**
|
|
14
|
+
* Creates the basis for a full iteration of a dbi with an evaluation function used to determine the logic inside the iteration
|
|
15
|
+
* @param {lmdb.Transaction} transactionOrEnv
|
|
16
|
+
* @param {String} hash_attribute
|
|
17
|
+
* @param {String} attribute
|
|
18
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
19
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
20
|
+
* @param {number} offset - defines the entries to skip
|
|
21
|
+
* @returns {[]}
|
|
22
|
+
*/
|
|
23
|
+
function iterateFullIndex(transactionOrEnv, hash_attribute, attribute, reverse = false, limit = undefined, offset = undefined) {
|
|
24
|
+
return setupTransaction(transactionOrEnv, hash_attribute, attribute, (transaction, dbi) => {
|
|
25
|
+
return dbi.getRange({
|
|
26
|
+
transaction,
|
|
27
|
+
start: reverse ? undefined : false,
|
|
28
|
+
end: !reverse ? undefined : false,
|
|
29
|
+
limit,
|
|
30
|
+
offset,
|
|
31
|
+
reverse,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* specific iterator function for perfroming betweens on numeric columns
|
|
37
|
+
* for this function specifically it is important to remember that the buffer representations of numbers are stored in the following order:
|
|
38
|
+
* 0,1,2,3,4,5,6.....1000,-1,-2,-3,-4,-5,-6....-1000
|
|
39
|
+
* as such we need to do some work with the cursor in order to move to the point we need depending on the type of range we are searching.
|
|
40
|
+
* another important point to remember is the search is always iterating forward. this makes sense for positive number searches,
|
|
41
|
+
* but get wonky for negative number searches and especially for a range of between -4 & 6. the reason is we will start the iterator at 0, move forward to 6,
|
|
42
|
+
* then we need to jump forward to the highest negative number and stop at the start of our range (-4).
|
|
43
|
+
* @param {TableTransaction} transactionOrEnv
|
|
44
|
+
* @param {String} hash_attribute
|
|
45
|
+
* @param {String} attribute
|
|
46
|
+
* @param {Number|String} lowerValue
|
|
47
|
+
* @param {Number|String} upperValue
|
|
48
|
+
* @param {boolean} reverse
|
|
49
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
50
|
+
* @param {number} offset - defines the entries to skip
|
|
51
|
+
* @returns {Iterable}
|
|
52
|
+
*/
|
|
53
|
+
function iterateRangeBetween(transactionOrEnv, hash_attribute, attribute, lowerValue, upperValue, reverse = false, limit = undefined, offset = undefined, exclusiveLower = false, exclusiveUpper = false) {
|
|
54
|
+
return setupTransaction(transactionOrEnv, hash_attribute, attribute, (transaction, attrDbi, env, hash_attribute) => {
|
|
55
|
+
let end = reverse === true ? lowerValue : upperValue;
|
|
56
|
+
let start = reverse === true ? upperValue : lowerValue;
|
|
57
|
+
let inclusiveEnd = reverse === true ? !exclusiveLower : !exclusiveUpper;
|
|
58
|
+
let exclusiveStart = reverse === true ? exclusiveUpper : exclusiveLower;
|
|
59
|
+
let options = {
|
|
60
|
+
transaction,
|
|
61
|
+
start,
|
|
62
|
+
end,
|
|
63
|
+
reverse,
|
|
64
|
+
limit,
|
|
65
|
+
offset,
|
|
66
|
+
inclusiveEnd,
|
|
67
|
+
exclusiveStart,
|
|
68
|
+
};
|
|
69
|
+
if (hash_attribute === attribute) {
|
|
70
|
+
options.values = false;
|
|
71
|
+
return attrDbi.getRange(options).map((value) => ({ value }));
|
|
72
|
+
}
|
|
73
|
+
else
|
|
74
|
+
return attrDbi.getRange(options);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @param {lmdb.Transaction|lmdb.RootDatabase} transactionOrEnv
|
|
79
|
+
* @param {String} hash_attribute
|
|
80
|
+
* @param {String} attribute
|
|
81
|
+
* @param {Function} callback
|
|
82
|
+
*/
|
|
83
|
+
function setupTransaction(transactionOrEnv, hash_attribute, attribute, callback) {
|
|
84
|
+
let env = transactionOrEnv.database || transactionOrEnv;
|
|
85
|
+
// make sure all DBIs have been opened prior to starting any new persistent read transaction
|
|
86
|
+
let attrDbi = environmentUtility.openDBI(env, attribute);
|
|
87
|
+
if (attrDbi[lmdbTerms.DBI_DEFINITION_NAME].isPrimaryKey) {
|
|
88
|
+
hash_attribute = attribute;
|
|
89
|
+
}
|
|
90
|
+
else if (hash_attribute) {
|
|
91
|
+
environmentUtility.openDBI(env, hash_attribute);
|
|
92
|
+
}
|
|
93
|
+
let transaction;
|
|
94
|
+
if (transactionOrEnv.database)
|
|
95
|
+
transaction = transactionOrEnv;
|
|
96
|
+
else {
|
|
97
|
+
transaction = transactionOrEnv.useReadTransaction();
|
|
98
|
+
transaction.database = transactionOrEnv;
|
|
99
|
+
}
|
|
100
|
+
// do the main query after the dbi opening has been committed
|
|
101
|
+
let results = callback(transaction, attrDbi, env, hash_attribute);
|
|
102
|
+
results.transaction = transaction;
|
|
103
|
+
if (!transactionOrEnv.database) {
|
|
104
|
+
results.onDone = () => {
|
|
105
|
+
transaction.done();
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return results;
|
|
109
|
+
}
|
|
110
|
+
function getOverflowCheck(env, transaction, hash_attribute, attribute) {
|
|
111
|
+
let primaryDbi;
|
|
112
|
+
return function (key, value) {
|
|
113
|
+
if (typeof key === 'string' && key.endsWith(OVERFLOW_MARKER)) {
|
|
114
|
+
// the entire value couldn't be encoded because it was too long, so need to search the attribute from
|
|
115
|
+
// the original record.
|
|
116
|
+
// first get the hash/primary dbi
|
|
117
|
+
if (!primaryDbi) {
|
|
118
|
+
// only have to open once per search
|
|
119
|
+
if (hash_attribute)
|
|
120
|
+
primaryDbi = environmentUtility.openDBI(env, hash_attribute);
|
|
121
|
+
else {
|
|
122
|
+
// not sure how often this gets called without a hash_attribute, as this would be kind of expensive
|
|
123
|
+
// if done frequently
|
|
124
|
+
let dbis = environmentUtility.listDBIs(env);
|
|
125
|
+
for (let i = 0, l = dbis.length; i < l; i++) {
|
|
126
|
+
primaryDbi = environmentUtility.openDBI(env, dbis[i]);
|
|
127
|
+
if (primaryDbi[lmdbTerms.DBI_DEFINITION_NAME].isPrimaryKey)
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
let record = primaryDbi.get(value, { transaction, lazy: true });
|
|
133
|
+
key = record[attribute];
|
|
134
|
+
}
|
|
135
|
+
return key;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* iterates the entire hash_attribute dbi and returns all objects back
|
|
140
|
+
* @param {lmdb.Transaction} transaction - Transaction used to interact with all data in an environment
|
|
141
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
142
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
143
|
+
* @returns {Array.<Object>} - object array of fetched records
|
|
144
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
145
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
146
|
+
* @param {number} offset - defines the entries to skip
|
|
147
|
+
*/
|
|
148
|
+
function searchAll(transactionOrEnv, hash_attribute, fetchAttributes, reverse = false, limit = undefined, offset = undefined) {
|
|
149
|
+
common.validateEnv(transactionOrEnv);
|
|
150
|
+
if (hash_attribute === undefined) {
|
|
151
|
+
throw new Error(LMDB_ERRORS.HASH_ATTRIBUTE_REQUIRED);
|
|
152
|
+
}
|
|
153
|
+
return setupTransaction(transactionOrEnv, hash_attribute, hash_attribute, (transaction, dbi, env) => {
|
|
154
|
+
validateFetchAttributes(fetchAttributes);
|
|
155
|
+
fetchAttributes = setGetWholeRowAttributes(env, fetchAttributes);
|
|
156
|
+
return dbi
|
|
157
|
+
.getRange({
|
|
158
|
+
transaction,
|
|
159
|
+
start: reverse ? undefined : false,
|
|
160
|
+
end: !reverse ? undefined : false,
|
|
161
|
+
limit,
|
|
162
|
+
offset,
|
|
163
|
+
reverse,
|
|
164
|
+
})
|
|
165
|
+
.map((entry) => {
|
|
166
|
+
return parseRow(entry.value, fetchAttributes);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* iterates the entire hash_attribute dbi and returns all objects back in a map
|
|
172
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
173
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
174
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
175
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
176
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
177
|
+
* @param {number} offset - defines the entries to skip
|
|
178
|
+
* @returns {{String|Number, Object}} - object array of fetched records
|
|
179
|
+
|
|
180
|
+
*/
|
|
181
|
+
function searchAllToMap(transactionOrEnv, hash_attribute, fetchAttributes, reverse = false, limit = undefined, offset = undefined) {
|
|
182
|
+
common.validateEnv(transactionOrEnv);
|
|
183
|
+
if (hash_attribute === undefined) {
|
|
184
|
+
throw new Error(LMDB_ERRORS.HASH_ATTRIBUTE_REQUIRED);
|
|
185
|
+
}
|
|
186
|
+
validateFetchAttributes(fetchAttributes);
|
|
187
|
+
fetchAttributes = setGetWholeRowAttributes(transactionOrEnv.database || transactionOrEnv, fetchAttributes);
|
|
188
|
+
let map = new Map();
|
|
189
|
+
for (let { key, value } of iterateFullIndex(transactionOrEnv, hash_attribute, hash_attribute, reverse, limit, offset)) {
|
|
190
|
+
map.set(key, cursorFunctions.parseRow(value, fetchAttributes));
|
|
191
|
+
}
|
|
192
|
+
return map;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* iterates a dbi and returns the key/value pairing for each entry
|
|
196
|
+
* @param env
|
|
197
|
+
* @param attribute
|
|
198
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
199
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
200
|
+
* @param {number} offset - defines the entries to skip
|
|
201
|
+
* @returns {Array.<Array>}
|
|
202
|
+
*/
|
|
203
|
+
function iterateDBI(transactionOrEnv, attribute, reverse = false, limit = undefined, offset = undefined) {
|
|
204
|
+
common.validateEnv(transactionOrEnv);
|
|
205
|
+
if (attribute === undefined) {
|
|
206
|
+
throw new Error(LMDB_ERRORS.ATTRIBUTE_REQUIRED);
|
|
207
|
+
}
|
|
208
|
+
let results = Object.create(null);
|
|
209
|
+
let iterator = iterateFullIndex(transactionOrEnv, undefined, attribute, reverse, limit, offset);
|
|
210
|
+
let transaction = iterator.transaction;
|
|
211
|
+
const overflowCheck = getOverflowCheck(transaction.database, transaction, undefined, attribute);
|
|
212
|
+
for (let { key, value } of iterator) {
|
|
213
|
+
let fullKey = overflowCheck(key, value);
|
|
214
|
+
if (results[fullKey] === undefined) {
|
|
215
|
+
results[fullKey] = [];
|
|
216
|
+
}
|
|
217
|
+
results[fullKey].push(value);
|
|
218
|
+
}
|
|
219
|
+
return results;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* counts all records in an environment based on the count from stating the hash_attribute dbi
|
|
223
|
+
* @param {lmdb.RootDatabase} env - Transaction used to interact with all data in an environment
|
|
224
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
225
|
+
* @returns {number} - number of records in the environment
|
|
226
|
+
*/
|
|
227
|
+
function countAll(env, hash_attribute) {
|
|
228
|
+
common.validateEnv(env);
|
|
229
|
+
if (hash_attribute === undefined) {
|
|
230
|
+
throw new Error(LMDB_ERRORS.HASH_ATTRIBUTE_REQUIRED);
|
|
231
|
+
}
|
|
232
|
+
let stat = environmentUtility.statDBI(env, hash_attribute);
|
|
233
|
+
return stat.entryCount;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* performs an equal search on the key of a named dbi, returns a list of ids where their keys literally match the searchValue
|
|
237
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
238
|
+
* @param {String} hash_attribute
|
|
239
|
+
* @param {String} attribute - name of the attribute (dbi) to search
|
|
240
|
+
* @param searchValue - value to search
|
|
241
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
242
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
243
|
+
* @param {number} offset - defines the entries to skip
|
|
244
|
+
* @returns {[[],[]]} - ids matching the search
|
|
245
|
+
*/
|
|
246
|
+
function equals(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
247
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
248
|
+
return setupTransaction(transactionOrEnv, hash_attribute, attribute, (transaction, dbi, env, hash_attribute) => {
|
|
249
|
+
searchValue = common.convertKeyValueToWrite(searchValue);
|
|
250
|
+
if (hash_attribute === attribute) {
|
|
251
|
+
let value = dbi.get(searchValue, { transaction, lazy: true });
|
|
252
|
+
return value === undefined ? [] : [{ key: searchValue, value: searchValue }];
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
return dbi
|
|
256
|
+
.getValues(searchValue, {
|
|
257
|
+
transaction,
|
|
258
|
+
reverse,
|
|
259
|
+
limit,
|
|
260
|
+
offset,
|
|
261
|
+
})
|
|
262
|
+
.map((value) => ({ key: searchValue, value }));
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Counts the number of entries for a key of a named dbi, returning the count
|
|
268
|
+
* @param {lmdb.RootDatabase} env - Transaction used to interact with all data in an environment
|
|
269
|
+
* @param {String} hash_attribute
|
|
270
|
+
* @param {String} attribute - name of the attribute (dbi) to search
|
|
271
|
+
* @param searchValue - value to search
|
|
272
|
+
*/
|
|
273
|
+
function count(env, attribute, searchValue) {
|
|
274
|
+
validateComparisonFunctions(env, attribute, searchValue);
|
|
275
|
+
let dbi = environmentUtility.openDBI(env, attribute);
|
|
276
|
+
return dbi.getValuesCount(searchValue);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* performs an startsWith search on the key of a named dbi, returns a list of ids where their keys begin with the searchValue
|
|
280
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
281
|
+
* @param {String} hash_attribute
|
|
282
|
+
* @param {String} attribute - name of the attribute (dbi) to search
|
|
283
|
+
* @param searchValue - value to search
|
|
284
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
285
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
286
|
+
* @param {number} offset - defines the entries to skip
|
|
287
|
+
* @returns {lmdb.ArrayLikeIterable<unknown>} - ids matching the search
|
|
288
|
+
*/
|
|
289
|
+
function startsWith(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
290
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
291
|
+
return setupTransaction(transactionOrEnv, null, attribute, (transaction, dbi) => {
|
|
292
|
+
//if the search is numeric we need to scan the entire index, if string we can just do a range
|
|
293
|
+
searchValue = common.convertKeyValueToWrite(searchValue);
|
|
294
|
+
let stringSearch = true;
|
|
295
|
+
if (typeof searchValue === 'number') {
|
|
296
|
+
stringSearch = false;
|
|
297
|
+
}
|
|
298
|
+
let iterator;
|
|
299
|
+
//if we are reversing we need to get the key after the one we want to search on so we can start there and iterate to the front
|
|
300
|
+
if (reverse === true) {
|
|
301
|
+
let nextKey;
|
|
302
|
+
//iterate based on the searchValue until the key no longer starts with the searchValue, this is the key we need to start with in the search
|
|
303
|
+
for (let key of dbi.getKeys({ transaction, start: searchValue })) {
|
|
304
|
+
if (!key.startsWith(searchValue)) {
|
|
305
|
+
nextKey = key;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
//with the new search value we iterate
|
|
310
|
+
if (nextKey !== undefined) {
|
|
311
|
+
if (Number.isInteger(offset)) {
|
|
312
|
+
offset++;
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
limit++;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
iterator = dbi.getRange({ transaction, start: nextKey, end: undefined, reverse, limit, offset }).map((entry) => {
|
|
319
|
+
let { key } = entry;
|
|
320
|
+
if (key === nextKey) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (key.toString().startsWith(searchValue)) {
|
|
324
|
+
return entry;
|
|
325
|
+
}
|
|
326
|
+
else if (stringSearch === true) {
|
|
327
|
+
return iterator.DONE;
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
return iterator.filter((entry) => entry);
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
iterator = dbi.getRange({ transaction, start: searchValue, reverse, limit, offset }).map((entry) => {
|
|
334
|
+
if (entry.key.toString().startsWith(searchValue)) {
|
|
335
|
+
return entry;
|
|
336
|
+
}
|
|
337
|
+
else if (stringSearch === true) {
|
|
338
|
+
return iterator.DONE;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
return stringSearch ? iterator : iterator.filter((entry) => entry); // filter out non-matching if we are not
|
|
342
|
+
// a string and have to do a full scan
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* performs an endsWith search on the key of a named dbi, returns a list of ids where their keys end with searchValue
|
|
348
|
+
* @param {lmdb.Transaction} transaction - Transaction used to interact with all data in an environment
|
|
349
|
+
* @param {String} hash_attribute
|
|
350
|
+
* @param {String} attribute - name of the attribute (dbi) to search
|
|
351
|
+
* @param searchValue - value to search
|
|
352
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
353
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
354
|
+
* @param {number} offset - defines the entries to skip
|
|
355
|
+
* @returns {[[],[]]} - ids matching the search
|
|
356
|
+
*/
|
|
357
|
+
function endsWith(transaction, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
358
|
+
return contains(transaction, hash_attribute, attribute, searchValue, reverse, limit, offset, true);
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* performs a contains search on the key of a named dbi, returns a list of ids where their keys contain the searchValue
|
|
362
|
+
* @param {lmdb.Transaction|lmdb.RootDatabase} transactionOrEnv - Transaction used to interact with all data in an
|
|
363
|
+
* environment
|
|
364
|
+
* @param {String} hash_attribute
|
|
365
|
+
* @param {String} attribute - name of the attribute (dbi) to search
|
|
366
|
+
* @param {String|Number} searchValue - value to search
|
|
367
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
368
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
369
|
+
* @param {number} offset - defines the entries to skip
|
|
370
|
+
* @param {boolean} ends_with - Must only contain this value at the end
|
|
371
|
+
* @returns {[[],[]]} - ids matching the search
|
|
372
|
+
*/
|
|
373
|
+
function contains(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined, ends_with = false) {
|
|
374
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
375
|
+
return setupTransaction(transactionOrEnv, null, attribute, (transaction, attrDbi, env, hash_attribute) => {
|
|
376
|
+
const overflowCheck = getOverflowCheck(env, transaction, hash_attribute, attribute);
|
|
377
|
+
offset = Number.isInteger(offset) ? offset : 0;
|
|
378
|
+
return attrDbi
|
|
379
|
+
.getKeys({ transaction, end: reverse ? false : undefined, reverse })
|
|
380
|
+
.flatMap((key) => {
|
|
381
|
+
let foundStr = key.toString();
|
|
382
|
+
if (foundStr.endsWith(OVERFLOW_MARKER)) {
|
|
383
|
+
// the entire value couldn't be encoded because it was too long, so need to search the attributes from
|
|
384
|
+
// the original record
|
|
385
|
+
return attrDbi
|
|
386
|
+
.getValues(key, { transaction })
|
|
387
|
+
.map((primaryKey) => {
|
|
388
|
+
// this will get the full value from each entire record so we can check it
|
|
389
|
+
let fullKey = overflowCheck(key, primaryKey);
|
|
390
|
+
if (ends_with ? fullKey.endsWith(searchValue) : fullKey.includes(searchValue)) {
|
|
391
|
+
return { key: fullKey, value: primaryKey };
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
.filter((v) => v);
|
|
395
|
+
}
|
|
396
|
+
else if (ends_with ? foundStr.endsWith(searchValue) : foundStr.includes(searchValue)) {
|
|
397
|
+
if (attrDbi[lmdbTerms.DBI_DEFINITION_NAME].isPrimaryKey)
|
|
398
|
+
return { key, value: key };
|
|
399
|
+
else {
|
|
400
|
+
return attrDbi.getValues(key, { transaction }).map((primaryKey) => {
|
|
401
|
+
return { key, value: primaryKey };
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return [];
|
|
406
|
+
})
|
|
407
|
+
.slice(offset, limit === undefined ? undefined : limit + (offset || 0));
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
/** RANGE FUNCTIONS **/
|
|
411
|
+
/**
|
|
412
|
+
* performs a greater than search for string / numeric search value
|
|
413
|
+
* @param {lmdb.Transaction} transactionOrEnv
|
|
414
|
+
* @param {String} hash_attribute
|
|
415
|
+
* @param {String} attribute
|
|
416
|
+
* @param {String|Number} searchValue
|
|
417
|
+
* @param {boolean} reverse - determines direction to iterate
|
|
418
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
419
|
+
* @param {number} offset - defines the entries to skip
|
|
420
|
+
* @returns {[[],[]]}
|
|
421
|
+
*/
|
|
422
|
+
function greaterThan(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
423
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
424
|
+
let type = typeof searchValue;
|
|
425
|
+
let upperValue;
|
|
426
|
+
if (type === 'string')
|
|
427
|
+
upperValue = '\uffff';
|
|
428
|
+
else if (type === 'number')
|
|
429
|
+
upperValue = Infinity;
|
|
430
|
+
else if (type === 'boolean')
|
|
431
|
+
upperValue = true;
|
|
432
|
+
return iterateRangeBetween(transactionOrEnv, hash_attribute, attribute, searchValue, upperValue, reverse, limit, offset, true, false);
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* performs a greater than equal search for string / numeric search value
|
|
436
|
+
* @param {lmdb.Transaction} transactionOrEnv
|
|
437
|
+
* @param {String} hash_attribute
|
|
438
|
+
* @param {String} attribute
|
|
439
|
+
* @param {String|Number} searchValue
|
|
440
|
+
* @param {boolean} reverse - determines direction of iterator
|
|
441
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
442
|
+
* @param {number} offset - defines the entries to skip
|
|
443
|
+
* @returns {[[],[]]}
|
|
444
|
+
*/
|
|
445
|
+
function greaterThanEqual(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
446
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
447
|
+
let type = typeof searchValue;
|
|
448
|
+
let upperValue;
|
|
449
|
+
if (type === 'string')
|
|
450
|
+
upperValue = '\uffff';
|
|
451
|
+
else if (type === 'number')
|
|
452
|
+
upperValue = Infinity;
|
|
453
|
+
else if (type === 'boolean')
|
|
454
|
+
upperValue = true;
|
|
455
|
+
return iterateRangeBetween(transactionOrEnv, hash_attribute, attribute, searchValue, upperValue, reverse, limit, offset, false, false);
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* performs a less than search for string / numeric search value
|
|
459
|
+
* @param {lmdb.Transaction} transactionOrEnv
|
|
460
|
+
* @param {String} hash_attribute
|
|
461
|
+
* @param {String} attribute
|
|
462
|
+
* @param {String|Number} searchValue
|
|
463
|
+
* @param {boolean} reverse - determines direction of iterator
|
|
464
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
465
|
+
* @param {number} offset - defines the entries to skip
|
|
466
|
+
* @returns {[[],[]]}
|
|
467
|
+
*/
|
|
468
|
+
function lessThan(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
469
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
470
|
+
let type = typeof searchValue;
|
|
471
|
+
let lowerValue;
|
|
472
|
+
if (type === 'string')
|
|
473
|
+
lowerValue = '\x00';
|
|
474
|
+
else if (type === 'number')
|
|
475
|
+
lowerValue = -Infinity;
|
|
476
|
+
else if (type === 'boolean')
|
|
477
|
+
lowerValue = false;
|
|
478
|
+
return iterateRangeBetween(transactionOrEnv, hash_attribute, attribute, lowerValue, searchValue, reverse, limit, offset, false, true);
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* performs a less than equal search for string / numeric search value
|
|
482
|
+
* @param {lmdb.Transaction} transactionOrEnv
|
|
483
|
+
* @param {String} hash_attribute
|
|
484
|
+
* @param {String} attribute
|
|
485
|
+
* @param {String|Number} searchValue
|
|
486
|
+
* @param {boolean} reverse - defines the direction to iterate
|
|
487
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
488
|
+
* @param {number} offset - defines the entries to skip
|
|
489
|
+
* @returns {[[],[]]}
|
|
490
|
+
*/
|
|
491
|
+
function lessThanEqual(transactionOrEnv, hash_attribute, attribute, searchValue, reverse = false, limit = undefined, offset = undefined) {
|
|
492
|
+
validateComparisonFunctions(transactionOrEnv, attribute, searchValue);
|
|
493
|
+
let type = typeof searchValue;
|
|
494
|
+
let lowerValue;
|
|
495
|
+
if (type === 'string')
|
|
496
|
+
lowerValue = '\x00';
|
|
497
|
+
else if (type === 'number')
|
|
498
|
+
lowerValue = -Infinity;
|
|
499
|
+
else if (type === 'boolean')
|
|
500
|
+
lowerValue = false;
|
|
501
|
+
return iterateRangeBetween(transactionOrEnv, hash_attribute, attribute, lowerValue, searchValue, reverse, limit, offset, false, false);
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* performs a between search for string / numeric search value
|
|
505
|
+
* @param {lmdb.Transaction} transactionOrEnv
|
|
506
|
+
* @param {String} hash_attribute
|
|
507
|
+
* @param {String} attribute
|
|
508
|
+
* @param {String|Number} startValue
|
|
509
|
+
* @param {String|Number}endValue
|
|
510
|
+
* @param {boolean} reverse - defines if the iterator goes from last to first
|
|
511
|
+
* @param {number} limit - defines the max number of entries to iterate
|
|
512
|
+
* @param {number} offset - defines the entries to skip
|
|
513
|
+
* @returns {*[]}
|
|
514
|
+
*/
|
|
515
|
+
function between(transactionOrEnv, hash_attribute, attribute, startValue, endValue, reverse = false, limit = undefined, offset = undefined) {
|
|
516
|
+
common.validateEnv(transactionOrEnv);
|
|
517
|
+
if (attribute === undefined) {
|
|
518
|
+
throw new Error(LMDB_ERRORS.ATTRIBUTE_REQUIRED);
|
|
519
|
+
}
|
|
520
|
+
if (startValue === undefined) {
|
|
521
|
+
throw new Error(LMDB_ERRORS.START_VALUE_REQUIRED);
|
|
522
|
+
}
|
|
523
|
+
if (endValue === undefined) {
|
|
524
|
+
throw new Error(LMDB_ERRORS.END_VALUE_REQUIRED);
|
|
525
|
+
}
|
|
526
|
+
startValue = common.convertKeyValueToWrite(startValue);
|
|
527
|
+
endValue = common.convertKeyValueToWrite(endValue);
|
|
528
|
+
if (startValue > endValue) {
|
|
529
|
+
throw new Error(LMDB_ERRORS.END_VALUE_MUST_BE_GREATER_THAN_START_VALUE);
|
|
530
|
+
}
|
|
531
|
+
return iterateRangeBetween(transactionOrEnv, hash_attribute, attribute, startValue, endValue, reverse, limit, offset);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* finds a single record based on the id passed
|
|
535
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
536
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
537
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
538
|
+
* @param {String} id - id value to search
|
|
539
|
+
* @returns {{}} - object found
|
|
540
|
+
*/
|
|
541
|
+
function searchByHash(transactionOrEnv, hash_attribute, fetchAttributes, id) {
|
|
542
|
+
common.validateEnv(transactionOrEnv);
|
|
543
|
+
let env = transactionOrEnv.database || transactionOrEnv;
|
|
544
|
+
let transaction = transactionOrEnv.database ? transactionOrEnv : null;
|
|
545
|
+
if (hash_attribute === undefined) {
|
|
546
|
+
throw new Error(LMDB_ERRORS.HASH_ATTRIBUTE_REQUIRED);
|
|
547
|
+
}
|
|
548
|
+
validateFetchAttributes(fetchAttributes);
|
|
549
|
+
fetchAttributes = setGetWholeRowAttributes(env, fetchAttributes);
|
|
550
|
+
if (id === undefined) {
|
|
551
|
+
throw new Error(LMDB_ERRORS.ID_REQUIRED);
|
|
552
|
+
}
|
|
553
|
+
let obj = null;
|
|
554
|
+
let object = env.dbis[hash_attribute].get(id, { transaction, lazy: fetchAttributes.length < 3 });
|
|
555
|
+
if (object) {
|
|
556
|
+
obj = cursorFunctions.parseRow(object, fetchAttributes);
|
|
557
|
+
}
|
|
558
|
+
return obj;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* checks if a hash value exists based on the id passed
|
|
562
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
563
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
564
|
+
* @param {String|Number} id - id value to check exists
|
|
565
|
+
* @returns {boolean} - whether the hash exists (true) or not (false)
|
|
566
|
+
*/
|
|
567
|
+
function checkHashExists(transactionOrEnv, hash_attribute, id) {
|
|
568
|
+
common.validateEnv(transactionOrEnv);
|
|
569
|
+
let env = transactionOrEnv.database || transactionOrEnv;
|
|
570
|
+
let transaction = transactionOrEnv.database ? transactionOrEnv : null;
|
|
571
|
+
if (hash_attribute === undefined) {
|
|
572
|
+
throw new Error(LMDB_ERRORS.HASH_ATTRIBUTE_REQUIRED);
|
|
573
|
+
}
|
|
574
|
+
if (id === undefined) {
|
|
575
|
+
throw new Error(LMDB_ERRORS.ID_REQUIRED);
|
|
576
|
+
}
|
|
577
|
+
let foundKey = true;
|
|
578
|
+
let value = env.dbis[hash_attribute].get(id, { transaction, lazy: true });
|
|
579
|
+
if (value === undefined) {
|
|
580
|
+
foundKey = false;
|
|
581
|
+
}
|
|
582
|
+
return foundKey;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* finds an array of records based on the ids passed
|
|
586
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
587
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
588
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
589
|
+
* @param {Array.<String>} ids - list of ids to search
|
|
590
|
+
* @param {[]} [notFound] - optional, meant to be an array passed by reference so that skipped ids can be aggregated.
|
|
591
|
+
* @returns {Map} - Map of records found
|
|
592
|
+
*/
|
|
593
|
+
function batchSearchByHash(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound = []) {
|
|
594
|
+
initializeBatchSearchByHash(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound);
|
|
595
|
+
return batchHashSearch(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound).map((entry) => entry[1]);
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* finds an array of records based on the ids passed and returns a map of the results
|
|
599
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
600
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
601
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
602
|
+
* @param {Array.<String>} ids - list of ids to search
|
|
603
|
+
* @param {[]} [notFound] - optional, meant to be an array passed by reference so that skipped ids can be aggregated.
|
|
604
|
+
* @returns {Map} - Map of records found
|
|
605
|
+
*/
|
|
606
|
+
function batchSearchByHashToMap(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound = []) {
|
|
607
|
+
initializeBatchSearchByHash(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound);
|
|
608
|
+
let results = new Map();
|
|
609
|
+
for (let [id, record] of batchHashSearch(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound)) {
|
|
610
|
+
results.set(id, record);
|
|
611
|
+
}
|
|
612
|
+
return results;
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* finds an array of records based on the ids passed and returns a map of the results
|
|
616
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
617
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
618
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
619
|
+
* @param {Array.<String>} ids - list of ids to search
|
|
620
|
+
* @param {[]} [notFound] - optional, meant to be an array passed by reference so that skipped ids can be aggregated.
|
|
621
|
+
* @returns {Object}
|
|
622
|
+
*/
|
|
623
|
+
function batchHashSearch(transactionOrEnv, hash_attribute, fetchAttributes, ids, notFound = []) {
|
|
624
|
+
return setupTransaction(transactionOrEnv, hash_attribute, hash_attribute, (transaction, dbi, env) => {
|
|
625
|
+
fetchAttributes = setGetWholeRowAttributes(env, fetchAttributes);
|
|
626
|
+
let lazy = fetchAttributes.length < 3;
|
|
627
|
+
return ids
|
|
628
|
+
.map((id) => {
|
|
629
|
+
let object = env.dbis[hash_attribute].get(id, { transaction, lazy });
|
|
630
|
+
if (object) {
|
|
631
|
+
return [id, cursorFunctions.parseRow(object, fetchAttributes)];
|
|
632
|
+
}
|
|
633
|
+
else {
|
|
634
|
+
notFound.push(id);
|
|
635
|
+
}
|
|
636
|
+
})
|
|
637
|
+
.filter((object) => object); // omit not found
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* function used to intialize the batchSearchByHash functions
|
|
642
|
+
* @param {lmdb.Transaction} transactionOrEnv - Transaction used to interact with all data in an environment
|
|
643
|
+
* @param {String} hash_attribute - name of the hash_attribute for this environment
|
|
644
|
+
* @param {Array.<String>} fetchAttributes - string array of attributes to pull from the object
|
|
645
|
+
* @param {Array.<String>} ids - list of ids to search
|
|
646
|
+
* @param {[]} [_notFound] -optional, meant to be an array passed by reference so that skipped ids can be aggregated.
|
|
647
|
+
*/
|
|
648
|
+
function initializeBatchSearchByHash(transactionOrEnv, hash_attribute, fetchAttributes, ids, _notFound) {
|
|
649
|
+
common.validateEnv(transactionOrEnv);
|
|
650
|
+
if (hash_attribute === undefined) {
|
|
651
|
+
throw new Error(LMDB_ERRORS.HASH_ATTRIBUTE_REQUIRED);
|
|
652
|
+
}
|
|
653
|
+
validateFetchAttributes(fetchAttributes);
|
|
654
|
+
if (ids === undefined || ids === null) {
|
|
655
|
+
throw new Error(LMDB_ERRORS.IDS_REQUIRED);
|
|
656
|
+
}
|
|
657
|
+
if (!ids[Symbol.iterator]) {
|
|
658
|
+
throw new Error(LMDB_ERRORS.IDS_MUST_BE_ITERABLE);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* validates the fetchAttributes argument
|
|
663
|
+
* @param fetchAttributes - string array of attributes to pull from the object
|
|
664
|
+
*/
|
|
665
|
+
function validateFetchAttributes(fetchAttributes) {
|
|
666
|
+
if (!Array.isArray(fetchAttributes)) {
|
|
667
|
+
if (fetchAttributes === undefined) {
|
|
668
|
+
throw new Error(LMDB_ERRORS.FETCH_ATTRIBUTES_REQUIRED);
|
|
669
|
+
}
|
|
670
|
+
throw new Error(LMDB_ERRORS.FETCH_ATTRIBUTES_MUST_BE_ARRAY);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* common validation function for all of the comparison searches (equals, startsWith, endsWith, contains)
|
|
675
|
+
* @param {lmdb.RootDatabase} env - The env used to interact with all data in an environment
|
|
676
|
+
* @param attribute - name of the attribute (dbi) to search
|
|
677
|
+
* @param searchValue - value to search
|
|
678
|
+
*/
|
|
679
|
+
function validateComparisonFunctions(env, attribute, searchValue) {
|
|
680
|
+
common.validateEnv(env);
|
|
681
|
+
if (attribute === undefined) {
|
|
682
|
+
throw new Error(LMDB_ERRORS.ATTRIBUTE_REQUIRED);
|
|
683
|
+
}
|
|
684
|
+
if (searchValue === undefined) {
|
|
685
|
+
throw new Error(LMDB_ERRORS.SEARCH_VALUE_REQUIRED);
|
|
686
|
+
}
|
|
687
|
+
if (searchValue?.length > MAX_SEARCH_KEY_LENGTH) {
|
|
688
|
+
throw new Error(LMDB_ERRORS.SEARCH_VALUE_TOO_LARGE);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* determines if the intent is to return the whole row based on fetchAttributes having 1 entry that is wildcard * or %
|
|
693
|
+
* @param env
|
|
694
|
+
* @param fetchAttributes
|
|
695
|
+
* @returns {Array}
|
|
696
|
+
*/
|
|
697
|
+
function setGetWholeRowAttributes(env, fetchAttributes) {
|
|
698
|
+
if (fetchAttributes.length === 1 && hdbTerms.SEARCH_WILDCARDS.indexOf(fetchAttributes[0]) >= 0) {
|
|
699
|
+
fetchAttributes = environmentUtility.listDBIs(env);
|
|
700
|
+
}
|
|
701
|
+
return fetchAttributes;
|
|
702
|
+
}
|
|
703
|
+
module.exports = {
|
|
704
|
+
searchAll,
|
|
705
|
+
searchAllToMap,
|
|
706
|
+
count,
|
|
707
|
+
countAll,
|
|
708
|
+
equals,
|
|
709
|
+
startsWith,
|
|
710
|
+
endsWith,
|
|
711
|
+
contains,
|
|
712
|
+
searchByHash,
|
|
713
|
+
setGetWholeRowAttributes,
|
|
714
|
+
batchSearchByHash,
|
|
715
|
+
batchSearchByHashToMap,
|
|
716
|
+
checkHashExists,
|
|
717
|
+
iterateDBI,
|
|
718
|
+
greaterThan,
|
|
719
|
+
greaterThanEqual,
|
|
720
|
+
lessThan,
|
|
721
|
+
lessThanEqual,
|
|
722
|
+
between,
|
|
723
|
+
};
|
|
724
|
+
//# sourceMappingURL=searchUtility.js.map
|