Package org.partiql.ast.sql

Types

Link copied to clipboard
abstract class BlockBaseVisitor<R, C> : BlockVisitor<R, C>
Link copied to clipboard
interface BlockVisitor<R, C>
Link copied to clipboard
interface SqlBlock

Representation of some textual corpus; akin to Wadler's "A prettier printer" Document type.

Link copied to clipboard
abstract class SqlDialect : AstBaseVisitor<SqlBlock, SqlBlock>

SqlDialect represents the base behavior for transforming an AstNode tree into a SqlBlock tree.

Link copied to clipboard
abstract class SqlLayout

SqlLayout determines how an SqlBlock tree is transformed in SQL text.

Functions

Link copied to clipboard
fun SqlBlock.sql(layout: SqlLayout = SqlLayout.DEFAULT): String

Write this SqlBlock tree as SQL text with the given SqlLayout.

fun AstNode.sql(layout: SqlLayout = SqlLayout.DEFAULT, dialect: SqlDialect = SqlDialect.PARTIQL): String

Pretty-print this AstNode as SQL text with the given SqlLayout