Name

LOCALLY-ENABLE-SQL-READER-SYNTAX — Locally enable square bracket reader syntax.Macro

Syntax

      locally-enable-sql-reader-syntax => 

Arguments and Values

None.

Description

Turns on the SQL reader syntax without changing the syntax state such that restore-sql-reader-syntax-state will re-establish the current syntax state.

Examples

Intended to be used in a file for code which uses the square bracket syntax without changing the global state.

        #.(locally-enable-sql-reader-syntax) 
        
        ... CODE USING SYMBOLIC SQL SYNTAX ... 
        
        #.(restore-sql-reader-syntax-state) 
      

Side Effects

Modifies the default readtable.

Warning

CLSQL tries to keep track of whether the syntax has already been enabled. This can be problematic if the syntax is somehow disabled externally to CLSQL as future attempts to enable the syntax will do nothing--the system thinks it is already enabled. This may happen if there is an enable, but no disable, in a file that is processed with load or compile-file as the lisp implementation will restore the readtable on completion. Or, even if there is a disable but a compiler-error is encountered before running the disable. If you encounter this try running disable-sql-reader-syntax a couple times in the REPL.

See file-enable-sql-reader-syntax for an alternative.

Affected by

None.

Exceptional Situations

None.

See Also

enable-sql-reader-syntax
disable-sql-reader-syntax
locally-disable-sql-reader-syntax
restore-sql-reader-syntax-state
file-enable-sql-reader-syntax

Notes

The symbolic SQL syntax is disabled by default.

CLSQL differs from CommonSQL in that locally-enable-sql-reader-syntax is defined as a macro rather than a function.