StaticidentThis synchronous method returns the input string as Sql validated to be a valid SQL identifier. If needed, it will be enclosed in double quotes to make it valid.
Values will be enquoted if alwaysEnquote is true, or if its a simpleSqlName with capitalize false that doesn't include quotes. If a non quoted value is input with capitalize false, then even if its already a simpleSqlName, it will be enquoted to preserve the intended case.
The default value of capitalize is true, so the input is converted to uppercase using locale-independent Unicode rules before quoting. Set capitalize to false to preserve case. Any input containing a double quote character is rejected.
Uppercasing is done in the Node.js client and can differ from Oracle Database DBMS_ASSERT.ENQUOTE_NAME() behavior for some characters.
NOTE Requires > OracleDB@v7
— The string to be quoted for identifier use.
StaticliteralThis synchronous method returns the input value as a string that can safely be included in a SQL statement as a string literal.
Embedded single quote characters are doubled. Non-string, non number values fail standard parameter validation.
NOTE Requires > OracleDB@v7
— The value to be converted to a SQL string literal.
StaticrawCreate raw SQL statement.
This allows you to turn a variable directly into sql without making it a bind parameter.
Warning This is dangerous and should only be used with trusted input or escaped input.
Use Sql.name or Sql.literal instead whenever possible to ensure proper quoting and escaping.
A SQL instance can be nested within each other to build SQL strings.
Extension: https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit
Extension: https://marketplace.visualstudio.com/items?itemName=frigus02.vscode-sql-tagged-template-literals-syntax-only
Adapted for Oracle from https://github.com/blakeembrey/sql-template-tag