Next: , Previous: , Up: Query Construction   [Contents][Index]


9.3 Lookup Tables Extension

During tree construction, internal lookup tables control the rendering transformations. You can add to them using procedure qcons-declare!.

Procedure: qcons-declare! category x [extra…]

Declare as part of category (a keyword) the symbol x. extra information may be required for the particular category. Currently, these categories are recognized:

#:infix

Render (x A B ...) as ( A x B x ...).

#:postfix

Render (x A) as ( A x ).

#:display-alias

Render x as something else. extra is a string that specifies what to display instead of x. For example, null? and not-null? are pre-declared to render as IS NULL and IS NOT NULL, respectively.

#:keyword-args-ok

Render (x A B ...) as x (A, B, ...) if none of A, B, … are keywords. In the presence of keywords, render it as x (A B ...), without any commas in the argument list.

The rest of this section presents various lists of built-in declarations. Using qcons-declare! on a built-in symbol overwrites the associated value (if any). There is no undeclare support.

These are the infix operators.

||   ||/   |/   /   !!   %   ^   
*   -   +   @   &   |   <<   >>   
&&   &<   &>   <->   <^   >^   ?-   
?-|   @-@   ?|   ?||   @@   ~=   
<<=   >>=   #   ##   ?#   =   <   
<=   >   >=   <>   !=   all   any   
in   like   not-like   ilike   
not-ilike   ~~   !~~   ~~*   !~~*   
similar   not-similar   ~   ~*   !~   
!~*   

These are the postfix operators.

!   null?   not-null?   true?   
not-true?   false?   not-false?   
unknown?   not-unknown?   

Display aliases exist for these symbols.

null?   not-null?   true?   
not-true?   false?   not-false?   
unknown?   not-unknown?   not-like   
not-ilike   similar   not-similar   

These functions render differently depending on the presence of keyword args.

substring   trim   extract   
convert   overlay   position   

Next: Quoting, Previous: Special Operators, Up: Query Construction   [Contents][Index]