@servicenow/sdk - v4.4.1
    Preparing search index...
    Index

    Properties

    sanitizeSqlIdentifier: SanitizeSqlIdentifier

    Returns a String with escaped special characters or injected values for SQL identifiers (such as table, view, and column names). Wraps the input String in database-specific quotes.

    The string

    One of: 'MYSQL', 'ORACLE', 'POSTGRES', or 'MSSQL'

    Escaped String - SQL identifiers properly escaped based on selected Database

    sanitizeSqlIdentifier("simple_column", 'MySQL'); // → "`simple_column`"
    

    Don't enclose the input data pill in quotes. The system automatically wraps the input value with the type of quotes or backticks that apply to your database type. If your input String contains a period character, Sanitize SQL Identifier returns an error. To join SQL identifiers using a period, use two data pills concatenated with a period and apply Sanitize SQL Identifier to both pills. If input data type is not String, the data is not transformed at runtime.

    sanitizeSqlValue: SanitizeSqlValue

    Returns a String with escaped special characters/injected values for SQL values. Wraps the input String in database-specific quotes.

    The string

    One of: 'MYSQL', 'ORACLE', 'POSTGRES', or 'MSSQL'

    Escaped String - SQL values properly escaped based on selected Database

    sanitizeSqlValue("'Georgi' OR '1'='1'", 'MySQL'); // → ""'Georgi'' OR ''1''=''1'""
    

    Don't enclose the input data pill in quotes. The system automatically wraps the input value with the type of quotes or backticks that apply to your database type. If your input String contains a period character, Sanitize SQL Value returns an error. To join SQL values using a period, use two data pills concatenated with a period and apply Sanitize SQL Value to both pills. If input data type is not String, the data is not transformed at runtime.