isSqlIdentifier
isSqlIdentifier(
name,options?):boolean
Defined in: packages/ddd-mikro-orm/src/helpers/sql-identifier.ts:25
Whether name is an unquoted SQL identifier: a letter or underscore, then
letters, digits or underscores. Use it before interpolating a name into SQL
text, where it cannot be passed as a parameter.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”SqlIdentifierOptions = {}
Returns
Section titled “Returns”boolean
Example
Section titled “Example”isSqlIdentifier('tenant_a'); // trueisSqlIdentifier('tenant-a'); // falseisSqlIdentifier('app.cache', { qualified: true }); // true