com.esri.arcgis.geodatabase
Interface ISQLSyntax

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ISQLSyntaxProxy, Sde3Workspace, Sde4Workspace, VersionedWorkspace, Workspace

public interface ISQLSyntax
extends java.io.Serializable

Provides access to members that supply information about SQL functionality.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Description

ISQLSyntax is an interface that when given a Workspace returns whether specific SQL predicates, clauses, and other database specific constraints exist.

Remarks

Applications should use the ISQLSyntax interface to help them construct SQL queries and where clauses against ArcSDE Geodatabases that are database system independent.


Method Summary
 boolean getDelimitedIdentifierCase()
          True if DBMS's quoted identifiers are case sensitive.
 java.lang.String getFunctionName(int sqlFunc)
          DBMS dependent SQL function names.
 boolean getIdentifierCase()
          True if DBMS's identifiers are case sensitive.
 java.lang.String getInvalidCharacters()
          The list of invalid characters used in literals (if any).
 java.lang.String getInvalidStartingCharacters()
          The list of invalid characters used in literals (if any).
 IEnumBSTR getKeywords()
          The list of DBMS specific reserved keywords.
 java.lang.String getSpecialCharacter(int sqlSC)
          Special DBMS dependent SQL characters.
 boolean getStringComparisonCase()
          True if string comparisons are case sensitive.
 int getSupportedClauses()
          Supported SQL clauses.
 int getSupportedPredicates()
          Supported SQL predicates.
 void parseColumnName(java.lang.String fullName, java.lang.String[] dbName, java.lang.String[] ownerName, java.lang.String[] tableName, java.lang.String[] columnName)
          Given a column name, determine its qualification parts.
 void parseTableName(java.lang.String fullName, java.lang.String[] dbName, java.lang.String[] ownerName, java.lang.String[] tableName)
          Given a table name, determine its qualification parts.
 java.lang.String qualifyColumnName(java.lang.String tableName, java.lang.String columnName)
          Given a table name and column name, returns its fully qualified name.
 java.lang.String qualifyTableName(java.lang.String dbName, java.lang.String ownerName, java.lang.String tableName)
          Given a database, owner, and table name, return its fully qualified name.
 

Method Detail

qualifyTableName

public java.lang.String qualifyTableName(java.lang.String dbName,
                                         java.lang.String ownerName,
                                         java.lang.String tableName)
                                  throws java.io.IOException,
                                         AutomationException
Given a database, owner, and table name, return its fully qualified name.

Supported Platforms

Windows, Solaris, Linux

Remarks

Applications should use the QualifyTableName and QualifyColumnName methods to construct fully qualified dataset and column names.

Parameters:
dbName - The dbName (in)
ownerName - The ownerName (in)
tableName - The tableName (in)
Returns:
The fullName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

qualifyColumnName

public java.lang.String qualifyColumnName(java.lang.String tableName,
                                          java.lang.String columnName)
                                   throws java.io.IOException,
                                          AutomationException
Given a table name and column name, returns its fully qualified name.

Supported Platforms

Windows, Solaris, Linux

Remarks

Applications should use the QualifyTableName and QualifyColumnName methods to construct fully qualified dataset and column names.

Parameters:
tableName - The tableName (in)
columnName - The columnName (in)
Returns:
The fullName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseTableName

public void parseTableName(java.lang.String fullName,
                           java.lang.String[] dbName,
                           java.lang.String[] ownerName,
                           java.lang.String[] tableName)
                    throws java.io.IOException,
                           AutomationException
Given a table name, determine its qualification parts.

Supported Platforms

Windows, Solaris, Linux

Remarks

Applications should use the ParseTableName method to split the fully qualified name of a table into its components (database, owner, table).  ParseTableName can also be used to return the components of any fully qualified name of a dataset such as feature classes, feature datasets, geometric networks and topologies.

Applications that wish to be RDBMS independent should not assume that ‘.’ is the delimiter used to separate the components of a fully qualified dataset name. Use the QualifyTableName method to determine the qualified name of a dataset for a given workspace.

The FullName parameter refers to the fully qualified name of the dataset and is returned by the  IDataset::Name property for a dataset in a geodatabase and the IDatasetName::Name property for a dataset name object. Both methods return the fully qualified name for the dataset.

Empty strings will be returned for arguments that do not apply to the underlying DBMS. For example, supplying a FullName parameter of "MyTable" to a Personal or File Geodatabase will result in:

dbName = ""

ownerName = ""

TableName = "MyTable"

While supplying a FullName parameter of "gdb.MyTable" to an ArcSDE Geodatabase on Oracle will result in:

dbName = ""

ownerName = "gdb"

TableName = "MyTable"

Parameters:
fullName - The fullName (in)
dbName - The dbName (out: use single element array)
ownerName - The ownerName (out: use single element array)
tableName - The tableName (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseColumnName

public void parseColumnName(java.lang.String fullName,
                            java.lang.String[] dbName,
                            java.lang.String[] ownerName,
                            java.lang.String[] tableName,
                            java.lang.String[] columnName)
                     throws java.io.IOException,
                            AutomationException
Given a column name, determine its qualification parts.

Supported Platforms

Windows, Solaris, Linux

Remarks

Applications should use the ParseColumnName method to split the fully qualified name for a column in a table into its components (database, owner, table, column).

Applications that wish to be RDBMS independent should not assume that ‘.’ is the delimiter used to separate the components of a fully qualified dataset name. Use the QualifyColumnName method to determine the qualified name of a column of a table for a given workspace.

The FullName paramter can be returned from the IDataset::Name property for a dataset in a Geodatabase and the IDatasetName::Name property for a dataset name object. Both methods return the fully qualified name for the dataset (the name object for the dataset is itself obtained using the IDataset::FullName property).

Empty strings will be returned for arguments that do not apply to the underlying DBMS. For example, supplying a FullName parameter of "gdb.Greeley_Parcels_1.AREA" to an ArcSDE Geodatabase on Oracle will result in:

dbName = ""

ownerName = "gdb"

TableName = "Greeley_Parcels_1"

columnName = "AREA"

Parameters:
fullName - The fullName (in)
dbName - The dbName (out: use single element array)
ownerName - The ownerName (out: use single element array)
tableName - The tableName (out: use single element array)
columnName - The columnName (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFunctionName

public java.lang.String getFunctionName(int sqlFunc)
                                 throws java.io.IOException,
                                        AutomationException
DBMS dependent SQL function names.

Supported Platforms

Windows, Solaris, Linux

Parameters:
sqlFunc - A com.esri.arcgis.geodatabase.esriSQLFunctionName constant (in)
Returns:
The pSqlFunctionName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpecialCharacter

public java.lang.String getSpecialCharacter(int sqlSC)
                                     throws java.io.IOException,
                                            AutomationException
Special DBMS dependent SQL characters.

Supported Platforms

Windows, Solaris, Linux

Description

GetSpecialCharacter returns a Long value that indicates which of the esriSQLSpecialCharacters apply to the DBMS that the Workspace object used as the query interface for ISQLSyntax apply.

Remarks

The GetSpecialCharacter can be used to return the DBMS dependent character that represents an SQL special character, including the following:

• esriSQL_WildcardManyMatch ( % in SQL_92, * in Jet 4.0)
• esriSQL_WildcardSingleMatch ( _ in SQL_92, ? in Jet 4.0)
• esriSQL_DelimitedIdentifierPrefix ( " in SQL_92, [ in Jet 4.0)
• esriSQL_DelimitedIdentifierSuffix (" in SQL_92, ] in Jet 4.0)

Parameters:
sqlSC - A com.esri.arcgis.geodatabase.esriSQLSpecialCharacters constant (in)
Returns:
The pSpecialChar
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSupportedPredicates

public int getSupportedPredicates()
                           throws java.io.IOException,
                                  AutomationException
Supported SQL predicates.

Supported Platforms

Windows, Solaris, Linux

Description

GetSupportedPredicates returns a Long value that indicates which of the esriSQLPredicates are supported.

A value of -1 for either Personal or ArcSDE geodatabases, indicates that all predicates are supported for the Workspace object used as the query interface for ISQLSyntax .  A value of 0 indicates that no predicates are supported for the Workspace .

Returns:
The pPredicates
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSupportedClauses

public int getSupportedClauses()
                        throws java.io.IOException,
                               AutomationException
Supported SQL clauses.

Supported Platforms

Windows, Solaris, Linux

Description

GetSupportedClauses returns a Long value that indicates which of the esriSQLClauses are supported.

A value of -1 for either Personal or ArcSDE geodatabases, indicates that all clauses are supported for the Workspace object used as the query interface for ISQLSyntax .  A value of 0 indicates that no clauses are supported for the Workspace .

Returns:
The pClauses
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIdentifierCase

public boolean getIdentifierCase()
                          throws java.io.IOException,
                                 AutomationException
True if DBMS's identifiers are case sensitive.

Supported Platforms

Windows, Solaris, Linux

Description

GetIdentifierCase returns a Boolean indicating whether the identifiers are case sensitive in the DBMS of the Workspace used as a query interface for the ISQLSyntax .

Returns:
The pIsCaseSensitive
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDelimitedIdentifierCase

public boolean getDelimitedIdentifierCase()
                                   throws java.io.IOException,
                                          AutomationException
True if DBMS's quoted identifiers are case sensitive.

Supported Platforms

Windows, Solaris, Linux

Description

GetDelimitedIdentifierCase returns a Boolean that indicates whether the quoted identifiers are case sensitive for the DBMS that the Workspace object used as the query interface for the ISQLSyntax .

Returns:
The pIsCaseSensitive
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStringComparisonCase

public boolean getStringComparisonCase()
                                throws java.io.IOException,
                                       AutomationException
True if string comparisons are case sensitive.

Supported Platforms

Windows, Solaris, Linux

Description

GetStringComparisonCase returns a Boolean indicating whether the comparison strings for the DBMS that Workspace object used as the query interface for the ISQLSyntax are case sensitive.

Returns:
The pIsCaseSensitive
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getKeywords

public IEnumBSTR getKeywords()
                      throws java.io.IOException,
                             AutomationException
The list of DBMS specific reserved keywords.

Supported Platforms

Windows, Solaris, Linux

Description

GetKeywords returns a IEnumBStr list of keywords that are specific to the DBMS of the Workspace object used as the query interface for ISQLSyntax .

Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInvalidCharacters

public java.lang.String getInvalidCharacters()
                                      throws java.io.IOException,
                                             AutomationException
The list of invalid characters used in literals (if any).

Supported Platforms

Windows, Solaris, Linux

Description

GetInvalidCharacters returns a String that contains all the invalid characters for the Workspace object used as the query interface for ISQLSyntax .

Returns:
The pInvalidChars
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInvalidStartingCharacters

public java.lang.String getInvalidStartingCharacters()
                                              throws java.io.IOException,
                                                     AutomationException
The list of invalid characters used in literals (if any).

Supported Platforms

Windows, Solaris, Linux

Description

GetInvalidStartingCharacters returns a String containing all the invalid starting characters for the DBMS that the Workspace object that was used as a query interface for the ISQLSyntax uses.

Returns:
The pInvalidChars
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.