1
0
Fork 0
mirror of synced 2024-07-16 11:45:47 +12:00

Move utils to backend-core

This commit is contained in:
Adria Navarro 2024-05-23 13:51:49 +02:00
parent 402426a5f3
commit e169454490
2 changed files with 9 additions and 1 deletions

View file

@ -18,6 +18,14 @@ export const generateAppID = (tenantId?: string | null) => {
return `${id}${newid()}`
}
/**
* Generates a new table ID.
* @returns The new table ID which the table doc can be stored under.
*/
export function generateTableID() {
return `${DocumentType.TABLE}${SEPARATOR}${newid()}`
}
/**
* Gets a new row ID for the specified table.
* @param tableId The table which the row is being created for.

View file

@ -77,7 +77,7 @@ export function getTableParams(tableId?: Optional, otherProps = {}) {
* @returns The new table ID which the table doc can be stored under.
*/
export function generateTableID() {
return `${DocumentType.TABLE}${SEPARATOR}${newid()}`
return dbCore.generateTableID()
}
/**