Members
(constant) DB_CONFIG
Database Configuration Module Needed to put into the hydrocompute database
This module serves as the single source of truth for database configuration across the entire application. All database connections should reference this module to ensure consistency.
- Source:
(constant) DB_CONFIG
Database Configuration Module Needed to put into the hydrocompute database
This module serves as the single source of truth for database configuration across the entire application. All database connections should reference this module to ensure consistency.
- Source:
Methods
(private) getDatabaseConfig() → {Object}
Get database configuration
- Source:
Returns:
The database configuration object
- Type
- Object
getDatabaseConfig() → {Object}
Get database configuration
- Source:
Returns:
The database configuration object
- Type
- Object
getDatabaseConfig() → {Object}
Get database configuration
- Source:
Returns:
The database configuration object
- Type
- Object
(private) getDatabaseName() → {string}
Get database name
- Source:
Returns:
The database name
- Type
- string
getDatabaseName() → {string}
Get database name
- Source:
Returns:
The database name
- Type
- string
getDatabaseName() → {string}
Get database name
- Source:
Returns:
The database name
- Type
- string
(private) getDatabaseVersion() → {number}
Get database version
- Source:
Returns:
The database version
- Type
- number
getDatabaseVersion() → {number}
Get database version
- Source:
Returns:
The database version
- Type
- number
getDatabaseVersion() → {number}
Get database version
- Source:
Returns:
The database version
- Type
- number
(private) getDataFromIndexedDB(datab, storeName, id) → {Promise.<any>}
Get data from IndexedDB
Parameters:
| Name | Type | Description |
|---|---|---|
datab |
string | Database name |
storeName |
string | Object store name |
id |
string | Record ID |
- Source:
Returns:
Promise resolving to the data
- Type
- Promise.<any>
(private) getStoreConfig(storeName) → {Object|null}
Get store configuration
Parameters:
| Name | Type | Description |
|---|---|---|
storeName |
string | Name of the store to get configuration for |
- Source:
Returns:
The store configuration or null if not found
- Type
- Object | null
getStoreConfig(storeName) → {Object|null}
Get store configuration
Parameters:
| Name | Type | Description |
|---|---|---|
storeName |
string | Name of the store to get configuration for |
- Source:
Returns:
The store configuration or null if not found
- Type
- Object | null
getStoreConfig(storeName) → {Object|null}
Get store configuration
Parameters:
| Name | Type | Description |
|---|---|---|
storeName |
string | Name of the store to get configuration for |
- Source:
Returns:
The store configuration or null if not found
- Type
- Object | null
(private) openDatabase(dbNameopt, versionopt) → {Promise.<IDBDatabase>}
Creates a new database connection
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dbName |
string |
<optional> |
DB_CONFIG.NAME | Database name |
version |
number |
<optional> |
DB_CONFIG.VERSION | Database version |
- Source:
Returns:
Promise resolving to database connection
- Type
- Promise.<IDBDatabase>
openDatabase(dbNameopt, versionopt) → {Promise.<IDBDatabase>}
Creates a new database connection
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dbName |
string |
<optional> |
DB_CONFIG.NAME | Database name |
version |
number |
<optional> |
DB_CONFIG.VERSION | Database version |
- Source:
Returns:
Promise resolving to database connection
- Type
- Promise.<IDBDatabase>
openDatabase(dbNameopt, versionopt) → {Promise.<IDBDatabase>}
Creates a new database connection
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dbName |
string |
<optional> |
DB_CONFIG.NAME | Database name |
version |
number |
<optional> |
DB_CONFIG.VERSION | Database version |
- Source:
Returns:
Promise resolving to database connection
- Type
- Promise.<IDBDatabase>
(private) parseXMLSimple(xmlString) → {Object|null}
Simple XML parser fallback for web worker contexts where DOMParser is not available This is a limited parser that extracts basic structure
Parameters:
| Name | Type | Description |
|---|---|---|
xmlString |
string | XML string to parse |
- Source:
Returns:
Parsed object or null
- Type
- Object | null
(private) parseXMLToJSON(xmlString) → {Object|null}
Parse XML string to JSON object
Parameters:
| Name | Type | Description |
|---|---|---|
xmlString |
string | XML string to parse |
- Source:
Returns:
Parsed JSON object or null if parsing fails
- Type
- Object | null
(private) processDataForXML(data) → {any}
Recursively process data to parse XML strings
Parameters:
| Name | Type | Description |
|---|---|---|
data |
any | Data to process |
- Source:
Returns:
Processed data with XML strings converted to JSON
- Type
- any
(async, private) reassembleChunksFromStore(result, store) → {Promise.<any>}
Reassemble chunks for partitioned files
Parameters:
| Name | Type | Description |
|---|---|---|
result |
Object | The main record with isPartitioned: true |
store |
IDBObjectStore | The IndexedDB object store |
- Source:
Returns:
Promise resolving to the reassembled data
- Type
- Promise.<any>
(private) storeExistsInSchema(storeName) → {boolean}
Check if store exists in schema
Parameters:
| Name | Type | Description |
|---|---|---|
storeName |
string | Name of store to check |
- Source:
Returns:
True if store exists in schema
- Type
- boolean
storeExistsInSchema(storeName) → {boolean}
Check if store exists in schema
Parameters:
| Name | Type | Description |
|---|---|---|
storeName |
string | Name of store to check |
- Source:
Returns:
True if store exists in schema
- Type
- boolean
storeExistsInSchema(storeName) → {boolean}
Check if store exists in schema
Parameters:
| Name | Type | Description |
|---|---|---|
storeName |
string | Name of store to check |
- Source:
Returns:
True if store exists in schema
- Type
- boolean
(private) storeResultInIndexedDB(databaseName, storeName, data) → {Promise.<void>}
Store result in IndexedDB
Parameters:
| Name | Type | Description |
|---|---|---|
databaseName |
string | Database name |
storeName |
string | Object store name |
data |
Object | Data object to store (must have 'id' field) |
- Source:
Returns:
Promise resolving when data is stored
- Type
- Promise.<void>
(private) verifyDatabaseAccess(databaseName, storeName) → {Promise.<boolean>}
Verify database accessibility
Parameters:
| Name | Type | Description |
|---|---|---|
databaseName |
string | Name of the database |
storeName |
string | Name of the object store |
- Source:
Returns:
Promise resolving to true if accessible
- Type
- Promise.<boolean>