LOCALLY-ENABLE-SQL-READER-SYNTAX — Locally enable square bracket reader syntax.Macro
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.
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)
Modifies the default readtable.
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.