exosql v0.2.36 ExoSQL.Parser View Source

Parsed an SQL statement into a ExoSQL.Query.

The Query then needs to be planned and executed.

It also resolves partial column and table names using data from the context and its schema functions.

Uses leex and yecc to perform a first phase parsing, and then convert an dprocess the structure using more context knowledge to return a proper Query struct.

Link to this section Summary

Functions

Parses an SQL statement and returns the parsed ExoSQL struct

Calculates the list of all FQcolumns

From the list of tables, and context, and an unknown column, return the FQN of the column

Link to this section Functions

Parses an SQL statement and returns the parsed ExoSQL struct.

Link to this function resolve_all_columns(tables, context) View Source

Calculates the list of all FQcolumns.

This simplifies later the gathering of which table has which column and so on, specially when aliases are taken into account

Link to this function resolve_column(column, schema) View Source

From the list of tables, and context, and an unknown column, return the FQN of the column.

Link to this function resolve_columns(q, context_tables_columns) View Source
Link to this function resolve_table(orig, context) View Source