module documentation

Base SQL and DDL compiler implementations. Classes provided include: :class:`.compiler.SQLCompiler` - renders SQL strings :class:`.compiler.DDLCompiler` - renders DDL (data definition language) strings :class:`.compiler.GenericTypeCompiler` - renders type specification strings. To generate user-defined SQL strings, see :doc:`/ext/compiler`.

Class Compiled Represent a compiled SQL or DDL expression.
Class CompilerState No class docstring; 3/3 constants documented
Class DDLCompiler No class docstring; 0/2 property, 0/1 class variable, 1/42 method documented
Class ExpandedState represents state to use when producing "expanded" and "post compile" bound parameters for a statement.
Class FromLinter represents current state for the "cartesian product" detection feature.
Class GenericTypeCompiler Undocumented
Class IdentifierPreparer Handle quoting and case-folding of identifiers based on options.
Class ilike_case_insensitive produce a wrapping element for a case-insensitive portion of an ILIKE construct.
Class Linting represent preferences for the 'SQL linting' feature.
Class ResultColumnsEntry Tracks a column expression that is expected to be represented in the result rows for this statement.
Class SQLCompiler Default implementation of :class:`.Compiled`.
Class StrSQLCompiler A :class:`.SQLCompiler` subclass which allows a small selection of non-standard SQL features to render into a string value.
Class StrSQLTypeCompiler Undocumented
Class TypeCompiler Produces DDL specification for TypeEngine objects.
Constant BIND_PARAMS Undocumented
Constant BIND_PARAMS_ESC Undocumented
Constant BIND_TEMPLATES Undocumented
Constant COLLECT_CARTESIAN_PRODUCTS Undocumented
Constant COMPOUND_KEYWORDS Undocumented
Constant EXTRACT_MAP Undocumented
Constant FK_INITIALLY Undocumented
Constant FK_ON_DELETE Undocumented
Constant FK_ON_UPDATE Undocumented
Constant FROM_LINTING Undocumented
Constant FUNCTIONS Undocumented
Constant ILLEGAL_INITIAL_CHARACTERS Undocumented
Constant LEGAL_CHARACTERS Undocumented
Constant LEGAL_CHARACTERS_PLUS_SPACE Undocumented
Constant NO_LINTING Undocumented
Constant OPERATORS Undocumented
Constant RESERVED_WORDS Undocumented
Constant RM_NAME Undocumented
Constant RM_OBJECTS Undocumented
Constant RM_RENDERED_NAME Undocumented
Constant RM_TYPE Undocumented
Constant WARN_LINTING Undocumented
Class _BaseCompilerStackEntry Undocumented
Class _BindNameForColProtocol Undocumented
Class _CompileLabel lightweight label object which acts as an expression.Label.
Class _CompilerStackEntry Undocumented
Class _InsertManyValues represents state to use for executing an "insertmanyvalues" statement
Class _ResultMapAppender Undocumented
Class _SchemaForObjectCallable Undocumented
Type Alias _FromHintsType Undocumented
Variable _pyformat_template Undocumented
BIND_PARAMS = (source)

Undocumented

Value
re.compile(r'(?<![:\w\$\\]):([\w\$]+)(?![:\w\$])',
           re.UNICODE)
BIND_PARAMS_ESC = (source)

Undocumented

Value
re.compile(r'\\(:[\w\$]*)(?![:\w\$])',
           re.UNICODE)
BIND_TEMPLATES = (source)

Undocumented

Value
{'pyformat': _pyformat_template,
 'qmark': '?',
 'format': '%%s',
 'numeric': ':[_POSITION]',
 'numeric_dollar': '$[_POSITION]',
 'named': ':%(name)s'}
COLLECT_CARTESIAN_PRODUCTS = (source)

Undocumented

EXTRACT_MAP: dict[str, str] = (source)

Undocumented

Value
{'month': 'month',
 'day': 'day',
 'year': 'year',
 'second': 'second',
 'hour': 'hour',
 'doy': 'doy',
 'minute': 'minute',
...
FK_INITIALLY = (source)

Undocumented

Value
re.compile(r'^(?:DEFERRED|IMMEDIATE)$',
           re.I)
FK_ON_DELETE = (source)

Undocumented

Value
re.compile(r'^(?:RESTRICT|CASCADE|SET NULL|NO ACTION|SET DEFAULT)$',
           re.I)
FK_ON_UPDATE = (source)

Undocumented

Value
re.compile(r'^(?:RESTRICT|CASCADE|SET NULL|NO ACTION|SET DEFAULT)$',
           re.I)
FROM_LINTING = (source)

Undocumented

Undocumented

Value
{functions.coalesce: 'coalesce',
 functions.current_date: 'CURRENT_DATE',
 functions.current_time: 'CURRENT_TIME',
 functions.current_timestamp: 'CURRENT_TIMESTAMP',
 functions.current_user: 'CURRENT_USER',
 functions.localtime: 'LOCALTIME',
 functions.localtimestamp: 'LOCALTIMESTAMP',
...
ILLEGAL_INITIAL_CHARACTERS = (source)

Undocumented

Value
{str(x) for x in range(0, 10)}.union(['$'])
LEGAL_CHARACTERS = (source)

Undocumented

Value
re.compile(r'^[A-Z0-9_\$]+$',
           re.I)
LEGAL_CHARACTERS_PLUS_SPACE = (source)

Undocumented

Value
re.compile(r'^[A-Z0-9_ \$]+$',
           re.I)
NO_LINTING = (source)

Undocumented

OPERATORS = (source)

Undocumented

Value
{operators.and_: ' AND ',
 operators.or_: ' OR ',
 operators.add: ' + ',
 operators.mul: ' * ',
 operators.sub: ' - ',
 operators.mod: ' % ',
 operators.neg: '-',
...
RESERVED_WORDS: set[str] = (source)

Undocumented

Value
set(['all',
     'analyse',
     'analyze',
     'and',
     'any',
     'array',
     'as',
...
RM_NAME: Literal[1] = (source)

Undocumented

Value
1
RM_OBJECTS: Literal[2] = (source)

Undocumented

Value
2
RM_RENDERED_NAME: Literal[0] = (source)

Undocumented

Value
0
RM_TYPE: Literal[3] = (source)

Undocumented

Value
3
WARN_LINTING = (source)

Undocumented

_FromHintsType = (source)

Undocumented

Value
Dict['FromClause', str]
_pyformat_template: str = (source)

Undocumented