AST - com.strumenta.sas.ast.sql
com.strumenta.sas.ast.sql
Expressions
AllColumnsExpressionClass
"All columns", that is, `*` as in `select * from customers`
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
CaseExpressionClass
A case...when... expression.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| conditions | ExpressionA |
| elseResult | ExpressionA |
| expression | ExpressionA |
| results | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
CastExpressionClass
A cast expression, such as `CAST (a + b) AS FLOAT`
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| expression | ExpressionA |
| type | TypeSpec |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
ColumnExpressionClass
An expression referring to a column, like `a.b` in `a.b + 1`
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| column | ColumnRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
ExistsExpressionClass
(not) exists (select ...)
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| negated | Boolean |
| query | Query |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
NoJoinConditionClass
Super Classes
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
NullConstantExpressionClass
A literal NULL
Super Classes
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
QueryExpressionClass
Select query expression, as in `where foo = (select foo from bar)`
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| query | Query |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
RowExpressionClass
A single row in a values expression. see ValuesExpression
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| values | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
SetExpressionClass
Set membership expression such as `x IN ...`
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| element | ExpressionA |
| op | String |
| query | Query |
| values | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
SqlFunctionCallExpressionClass
A function call such as `MIN(foo)`.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| arguments | ExpressionA |
| function | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
TrimFunctionCallExpressionClass
A call to the TRIM function using specialized syntax, such as `TRIM(LEADING FROM foo)`.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| leading | Boolean |
| trailing | Boolean |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| arguments | ExpressionA |
| function | String |
ValuesExpressionClass
Values expression (`values (a, b, c, ...)`). In general, it can contain multiple rows, although the typical case is with a single row.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| rows | RowExpression |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
Classes
AlterTableSqlStatementClass (Abstract)
A SQL ALTER TABLE statement.
Super Classes
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
AnalyzeSqlStatementClass
A SQL ANALYZE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| statisticClause | StatisticClauseA |
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
ColumnDefinitionClass
The definition of a single column in a CREATE TABLE statement.
Local Features
| Name | Type and Description |
|---|---|
| constraints | ConstraintA |
| name | String |
| type | TypeSpec |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
ColumnRefClass
A (possibly scoped) reference to a column.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| calculated | Boolean |
| column | String |
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
CommentSqlStatementClass
A SQL COMMENT statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| comment | String |
| ref | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
CommitSqlStatementClass
A SQL COMMIT statement.
Super Classes
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
ConnectOptionClass
Local Features
| Name | Type and Description |
|---|---|
| name | Identifier |
| value | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
ConnectSqlStatementClass
A connect statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| connection | Identifier |
| kind | Identifier |
| options | ConnectOption |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
ConstraintClass (Abstract)
A SQL constraint.
Local Features
| Name | Type and Description |
|---|---|
| name | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
CreateIndexClauseClass (Abstract)
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
CreateIndexClusterClauseClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| cluster | Identifier |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
CreateIndexSqlStatementClass
A SQL CREATE INDEX statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| clause | CreateIndexClauseA |
| index | ColumnRef |
| unique | Boolean |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
CreateIndexTableClauseClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| indexes | ExpressionA |
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
CreateTableSqlStatementClass
A SQL CREATE TABLE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| columnDefinitions | ColumnDefinition |
| constraints | ConstraintA |
| ifNotExists | Boolean |
| on | String |
| query | Query |
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
CreateViewSqlStatementClass
A SQL CREATE VIEW statement.
Super Classes
Local Features
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
DescribeSqlStatementClass
A SQL DESCRIBE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
DisconnectSqlStatementClass
A disconnect statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| connection | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
ExecuteSqlStatementClass
An execute statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| by | String |
| nativeSQL | NativeSQL |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
GroupingClass (Abstract)
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
IdentityConstraintClass
An identity constraint.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| increment | Integer |
| seed | Integer |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| name | String |
InsertSqlStatementClass
A SQL INSERT statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| columns | ColumnRef |
| hints | SASStringConstant |
| query | Query |
| table | TableRef |
| values | ValuesExpression |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
JoinRelationClass
A join relation, as in `SELECT * FROM foo JOIN bar...`.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| conditions | ExpressionA |
| joinTypes | JoinTypeValue |
| relations | RelationA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
JoinTypeValueClass
Local Features
| Name | Type and Description |
|---|---|
| value | JoinTypeE |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
MacroSqlStatementClass
A macro statement inside PROC SQL.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| statement | ASTNode |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
NativeQueryRelationClass
A native subquery relation, as in `SELECT * FROM CONNECTION TO ... (SELECT ...)`.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| alias | String |
| connection | Identifier |
| query | NativeSQL |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
NativeSQLClass
A node representing a native SQL query or statement. Initially, the native SQL is not parsed and is kept as text. By invoking the [attemptParse] method, we can try to interpret it as SQL code. If successful, the parsed SQL will become a child node of this node.
Local Features
| Name | Type and Description |
|---|---|
| parsed | ASTNode |
| text | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
NullabilityConstraintClass
A NULL/NOT NULL constraint.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| nullsAllowed | Boolean |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| name | String |
PartitionClauseNameClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| name | Identifier |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
PartitionClauseValueClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| expression | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
PartitionExtensionClauseClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| partitions | PartitionExtensionRefA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
PartitionExtensionOptionClass (Abstract)
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
PartitionExtensionRefClass (Abstract)
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
PrimaryKeyConstraintClass
A primary key constraint.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| columns | SASStringConstant |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| name | String |
ProjectionClass
A projection is any expression that can be returned by a SELECT query.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| alias | Identifier |
| expression | ExpressionA |
| format | String |
| label | String |
| length | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
QueryClass
A SQL SELECT query.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| condition | ExpressionA |
| distinct | Boolean |
| groupings | GroupingA |
| havingCondition | ExpressionA |
| orderings | Ordering |
| projections | Projection |
| relations | RelationA |
| resultsStore | QueryResultsStore |
| union | Query |
| unionAll | Boolean |
| unique | Boolean |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
Used In
QueryRelationClass
A subquery relation, as in `SELECT * FROM (SELECT ...)`.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| alias | String |
| connection | Identifier |
| query | Query |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
QueryResultsStoreClass
The target of a SELECT INTO clause.
Local Features
| Name | Type and Description |
|---|---|
| separatedBy | String |
| toVariable | String |
| variable | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
RelationClass (Abstract)
A relation is anything that can go in a SELECT FROM clause.
Super Classes
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
RelationErrorClass
An invalid relation, due to some error in the source code.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| message | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
SQLCommentClass
Local Features
| Name | Type and Description |
|---|---|
| text | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
SchemaRefClass
A (possibly scoped) reference to a schema.
Local Features
| Name | Type and Description |
|---|---|
| catalog | String |
| schema | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
SqlDeleteSqlStatementClass
A SQL DELETE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| condition | ExpressionA |
| hints | SASStringConstant |
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
SqlDropSqlStatementClass
A SQL DROP TABLE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
SqlEmptySqlStatementClass
An empty statement, i.e. a lone semicolon.
Super Classes
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
SqlMergeSqlStatementClass
A MERGE statement (MS SQL Server only).
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| hints | SASStringConstant |
| into | TableRelation |
| on | ExpressionA |
| using | RelationA |
| whenMatched | SqlStatementA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
SqlProcedureClass
PROC SQL.
Local Features
| Name | Type and Description |
|---|---|
| feedback | Boolean |
| noPrint | Boolean |
| sqlStatements | SqlStatementA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
SqlRenameSqlStatementClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| from | Identifier |
| to | Identifier |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
SqlStatementClass (Abstract)
A SQL statement or query.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| comments | SQLComment |
| replacedVariables | Boolean |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
SqlUpdateSqlStatementClass
A SQL UPDATE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| condition | ExpressionA |
| table | TableRelation |
| updates | UpdateA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
StatisticClauseClass (Abstract)
A STATISTIC clause.
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
SubpartitionExtensionClauseClass
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| subpartitions | PartitionExtensionRefA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
TableRefClass
A (possibly scoped) reference to a table or view.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| schema | SchemaRef |
| table | String |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
TableRelationClass
A single table relation, as in `SELECT * FROM foo`.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| alias | String |
| link | String |
| partition | PartitionExtensionOptionA |
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Used In
TruncateSqlStatementClass
A SQL TRUNCATE TABLE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| table | TableRef |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| comments | SQLComment |
| replacedVariables | Boolean |
UniqueConstraintClass
A UNIQUE constraint.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| columns | SASStringConstant |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
| name | String |
UpdateClass (Abstract)
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Subclasses
Used In
UpdateColumnClass
The update of a single column as part of a SQL UPDATE statement.
Super Classes
Local Features
| Name | Type and Description |
|---|---|
| column | ColumnRef |
| expression | ExpressionA |
Inherited Features
| Name | Type and Description |
|---|---|
| position | Position |
| origin | Origin |
| destination | Destination |
Data Types
Class
Types of SQL join.
Values
INNERCROSSOUTER_FULLOUTER_LEFTOUTER_RIGHT