IRISLIB database
TSQL Class Reference

The <class>SYSTEM.TSQL</class> class provides an interface for managing InterSystems IRIS TSQL configurations. More...

Inheritance diagram for TSQL:
Collaboration diagram for TSQL:

Static Public Member Functions

 CurrentSettings ()
 The <class>SYSTEM.TSQL</class> class provides an interface for managing InterSystems IRIS TSQL configurations. More...
 
_.Library.String GetAnsiNulls ()
 This method returns the current default TSQL dialect and the value for TSQL Ansi Null behavior. More...
 
_.Library.String GetCaseInsCompare ()
 This method returns the current default TSQL dialect and the value for TSQL non-case-sensitive equality comparison behavior. More...
 
_.Library.String GetDialect ()
 This method returns the current default TSQL Dialect for the System. More...
 
_.Library.String GetEqualLiteralReplacement ()
 This method returns the current default TSQL dialect and the value for TSQL equal literal replacement ( = conditions and IN clause) behavior. More...
 
_.Library.String GetOwnerAsSchema ()
 This method takes no arguments and returns the current setting for TSQL OWNER_AS_SCHEMA.
 
_.Library.String GetQuotedIdentifier ()
 This method returns the current default TSQL dialect and the value for TSQL Quoted Identifier behavior. More...
 
_.Library.String GetTrace ()
 This method takes no arguments and returns the current setting for TSQL TRACE.
 
_.Library.String SetAnsiNulls (Dialect, flag)
 This method sets the current default TSQL dialect and the value for TSQL Ansi Null behavior. More...
 
_.Library.String SetCaseInsCompare (Dialect, flag)
 This method sets the current default TSQL dialect and the value for TSQL non-case-sensitive equality comparison behavior. More...
 
_.Library.String SetDialect (Dialect)
 This method sets the default TSQL Dialect for the System. More...
 
_.Library.String SetEqualLiteralReplacement (Dialect, flag)
 This method sets the current default TSQL dialect and the value for TSQL equal literal replacement ( = conditions and IN clause) behavior. More...
 
_.Library.String SetOwnerAsSchema (flag)
 This method sets the TSQL OWNER_AS_SCHEMA behavior to ON or OFF. More...
 
_.Library.String SetQuotedIdentifier (Dialect, flag)
 This method sets the current default TSQL dialect and the value for TSQL Quoted Identifier behavior. More...
 
_.Library.String SetTrace (flag)
 This method sets the TSQL TRACE behavior to ON or OFF. More...
 
- Static Public Member Functions inherited from Help
_.Library.String Help (_.Library.String method)
 This is a helper class that is used by the various SYSTEM classes to provide a Help method. More...
 

Detailed Description

The <class>SYSTEM.TSQL</class> 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()

Member Function Documentation

◆ CurrentSettings()

CurrentSettings ( )
static

The <class>SYSTEM.TSQL</class> 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()

This method will return the current setting that are defined for InterSystems TSQL compatibility features.

◆ GetAnsiNulls()

_.Library.String GetAnsiNulls ( )
static

This method returns the current default TSQL dialect and the value for TSQL Ansi Null behavior.

valid values are ON or OFF 

◆ GetCaseInsCompare()

_.Library.String GetCaseInsCompare ( )
static

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

◆ GetDialect()

_.Library.String GetDialect ( )
static

This method returns the current default TSQL Dialect for the System.

The two options are Sybase and MSSQL

◆ GetEqualLiteralReplacement()

_.Library.String GetEqualLiteralReplacement ( )
static

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

◆ GetQuotedIdentifier()

_.Library.String GetQuotedIdentifier ( )
static

This method returns the current default TSQL dialect and the value for TSQL Quoted Identifier behavior.

valid values are ON or OFF

◆ SetAnsiNulls()

_.Library.String SetAnsiNulls (   Dialect,
  flag 
)
static

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

◆ SetCaseInsCompare()

_.Library.String SetCaseInsCompare (   Dialect,
  flag 
)
static

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.

◆ SetDialect()

_.Library.String SetDialect (   Dialect)
static

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

◆ SetEqualLiteralReplacement()

_.Library.String SetEqualLiteralReplacement (   Dialect,
  flag 
)
static

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.

◆ SetOwnerAsSchema()

_.Library.String SetOwnerAsSchema (   flag)
static

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

◆ SetQuotedIdentifier()

_.Library.String SetQuotedIdentifier (   Dialect,
  flag 
)
static

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.

◆ SetTrace()

_.Library.String SetTrace (   flag)
static

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