Please enable JavaScript to view this site.

ESL Documentation

In addition to providing commands for performing retrievals and modifications, EDS supports a set of functions that return information about the data source’s system tables or catalog. These "catalog commands" are from Level 1 and Level 2 and are listed in the following table.

EDS Command

Description

EDSColumnPrivileges

Returns a list of columns and associated privileges for one or more tables.

EDSColumns

Returns the list of column names in specified tables.

EDSForeignKeys

Returns a list of column names that comprise foreign keys, if they exist for a specified table.

EDSPrimaryKeys

Returns a list of column names that are used in a primary key.

EDSProcedureColumns

Returns the list of input and output parameters, as well as the columns that make up the result set for the specified procedures.

EDSProcedures

Returns the list of procedure names stored in a specific data source.

EDSSpecialColumns

Returns information about two sets of columns: the optimal set of columns for unique row identification, or the set of columns that are automatically updated when any value in the row is updated.

EDSStatistics

Returns statistics about a table and its indexes.

EDSTablePrivileges

Returns a list of tables and matching privileges.

EDSTables

Returns a list of table names stored in a specific data source.

Search Patterns

Each catalog command accepts search string patterns in some arguments. The information returned by a command may be constrained by a search pattern passed as an argument to that command. These search patterns can contain the meta characters underscore (_) and percent (%), and a driver-defined escape character, as follows:

The underscore character represents any single character.

The percent character represents any sequence of zero or more characters.

The escape character permits the underscore and percent meta characters to be used as literal characters in search patterns. To use a meta character as a literal character in the search pattern, precede it with the escape character. To use the escape character as a literal character in the search pattern, include it twice. To obtain the escape character for a driver, call EDSGetInfo with the EDS_SEARCH_PATTERN_ESCAPE option.

All other characters represent themselves.

 

For example, if the search pattern for a table name is %A%, the command will return all tables with names that contain the character "A". If the search pattern for a table name is B__ ("B" followed by two underscores), the command will return all tables with names that are three characters long and start with the character "B". If the search pattern for a table name is %, the command will return all tables.

Suppose the search pattern escape character for a driver is a backslash (\). If the search pattern for a table name is ABC\%, the command will return the table named "ABC%". If the search pattern for a table name is \\%, the command will return all tables with names that start with a backslash.

A search pattern that has zero length matches the empty string.

A search pattern argument that is a null pointer means the search will not be constrained for that argument. (A null pointer and a search string of % should return the same values.)