Skip to main content

%SYSTEM.TSQL

abstract class %SYSTEM.TSQL extends %SYSTEM.Help

The %SYSTEM.TSQL class provides an interface for managing InterSystems IRIS TSQL configurations.

You can use it via the special $SYSTEM object:

  Do $SYSTEM.TSQL.SetAnsiNulls("Sybase","on")
  

You can call help to get a list of all entry points:

Do $SYSTEM.TSQL.Help()

Method Inventory

Methods

classmethod CurrentSettings()
This method will return the current setting that are defined for InterSystems TSQL compatibility features.
classmethod GetAnsiNulls() as %String
This method returns the current default TSQL dialect and the value for TSQL Ansi Null behavior. valid values are ON or OFF
classmethod GetCaseInsCompare() as %String
This method returns the current default TSQL dialect and the value for TSQL non-case-sensitive equality comparison behavior. valid values are ON or OFF
classmethod GetDialect() as %String
This method returns the current default TSQL Dialect for the System. The two options are Sybase and MSSQL
classmethod GetEqualLiteralReplacement() as %String
This method returns the current default TSQL dialect and the value for TSQL equal literal replacement ( = conditions and IN clause) behavior. valid values are ON or OFF
classmethod GetOwnerAsSchema() as %String
This method takes no arguments and returns the current setting for TSQL OWNER_AS_SCHEMA
classmethod GetQuotedIdentifier() as %String
This method returns the current default TSQL dialect and the value for TSQL Quoted Identifier behavior. valid values are ON or OFF
classmethod GetTrace() as %String
This method takes no arguments and returns the current setting for TSQL TRACE.
classmethod SetAnsiNulls(Dialect, flag) as %String
This method sets the current default TSQL dialect and the value for TSQL Ansi Null behavior.

Parameters:
Dialect
Name of the TSQL dialect: Sybase or MSSQL
flag
Value for TSQL Ansi NULL behavior: ON or OFF

Returns: The previous default TSQL dialect value and Ansi Null behavior
classmethod SetCaseInsCompare(Dialect, flag) as %String
This method sets the current default TSQL dialect and the value for TSQL non-case-sensitive equality comparison behavior.

Parameters:
Dialect
Name of the TSQL dialect: Sybase or MSSQL
flag
Value for TSQL non-case-sensitive equality comparison behavior: ON or OFF

Returns: The previous default TSQL dialect value and TSQL non-case-sensitive equality comparison behavior.
classmethod SetDialect(Dialect) as %String
This method sets the default TSQL Dialect for the System.

Parameter:
Dialect
Name of the TSQL dialect: Sybase or MSSQL. The Default is SQL

Returns: The previous default TSQL Dialect value or an invalid error message
classmethod SetEqualLiteralReplacement(Dialect, flag) as %String
This method sets the current default TSQL dialect and the value for TSQL equal literal replacement ( = conditions and IN clause) behavior.

Parameters:
Dialect
Name of the TSQL dialect: Sybase or MSSQL
flag
Value for TSQL equal literal replacement ( = conditions and IN clause) behavior: ON or OFF

Returns: The previous default TSQL dialect value and TSQL equal literal replacement ( = conditions and IN clause) behavior.
classmethod SetOwnerAsSchema(flag) as %String
This method sets the TSQL OWNER_AS_SCHEMA behavior to ON or OFF. When OWNER_AS_SCHEMA=ON, TSQL will convert database.owner.table to database_owner.table. If owner is missing, say database..table, $username will be used for the owner resulting in database_$$$LOWER($username).table Changing the OWNER_AS_SCHEMA setting only takes effect when the TSQL procedure class is [re]compiled or cached queries compiled in a TSQL dialect are purged and recreated.

Parameters:
flag
Value for TSQL OWNER_AS_SCHEMA setting: ON or OFF

Returns: The previous TSQL OWNER_AS_SCHEMA setting or an error message
classmethod SetQuotedIdentifier(Dialect, flag) as %String
This method sets the current default TSQL dialect and the value for TSQL Quoted Identifier behavior.

Parameters:
Dialect
Name of the TSQL dialect: Sybase or MSSQL
flag
Value for TSQL Quoted Identifier behavior: ON or OFF

Returns: The previous default TSQL dialect value and TSQL Quoted Identifier behavior.
classmethod SetTrace(flag) as %String
This method sets the TSQL TRACE behavior to ON or OFF. When TRACE=ON, a TSQL procedure will create a log file in the current namespace's directory named "tsql"_$j_".log" that contains the statements executed when the procedure is run. Changing the TRACE setting only takes effect when the class is recompiled or the TSQL procedure is [re]created.

Parameters:
flag
Value for TSQL TRACE setting: ON or OFF

Returns: The previous TSQL TRACE setting or an error message

Inherited Members

Inherited Methods

FeedbackOpens in a new tab