Native and Refresh escape clauses
- Last Updated: July 25, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- Apache Cassandra 8.0
- Documentation
The driver supports ODBC-native-escape and
ODBC-refresh-schema-escape clauses to embed data
store-specific commands in SQL-92 statements. The ODBC-native-escape clause allows you to execute native commands directly through
the client application, while the ODBC-refresh-schema-escape
clause is used to incorporate any changes introduced by the ODBC-native-escape clause into the driver's relational map of the data.
The ODBC-native-escape clause is defined as
follows:
ODBC-native-escape ::= ODBC-esc-initiator native
(command_text)}
where:
- command_text
- is a data store-specific command.
The ODBC-refresh-schema-escape clause is
defined as follows:
ODBC-refresh-schema-escape ::= ODBC-esc-initiator
refresh ODBC-esc-terminator
The following example shows the execution of two data store-specific commands with a refresh of the driver's relational map of the data. Note that each Native escape clause must have its own execute. The Refresh escape, however, can be used in the same execute statement as the Native escape.
SQLExecDirect(
pstmt,
"{native (CREATE TABLE emp (empid int primary key, title varchar))}",
SQL_NTS);
SQLExecDirect(
pstmt,
"{native (CREATE TABLE dept (deptid int primary key, city varchar))}{refresh}",
SQL_NTS);