public static IColumn VisitSelectElement(SelectElementContext context) { switch (context) { case SelectColumnElementContext selectColumnElementContext: return(new PropertyColumn { Name = IdentifierUtility.Parse(selectColumnElementContext.fullColumnName().GetText()), Alias = IdentifierUtility.Unescape(selectColumnElementContext.alias?.GetText()), }); case SelectFunctionElementContext selectFunctionElementContext: { if (selectFunctionElementContext.builtInFunctionCall() is CountFunctionCallContext) { return new CountFunctionColumn { Alias = IdentifierUtility.Unescape(selectFunctionElementContext.alias?.GetText()), } } ; return(VisitorHelper.ThrowNotSupportedFeature <IColumn>("Select Element Function")); } case SelectExpressionElementContext _: return(VisitorHelper.ThrowNotSupportedFeature <IColumn>("Select Element Expression")); } return(VisitorHelper.ThrowNotSupportedContext <IColumn>(context)); }
public static ITableSource VisitTableSourceBase(TableSourceItemContext context) { IPart[] identifiers = IdentifierUtility.Parse(context.tableName().GetText()); ValidateTableWithIndexName(identifiers); return(new AtomTableSource( identifiers[0].ToString(), identifiers.Length == 2 ? identifiers[1].ToString() : string.Empty )); }
public virtual QsiQualifiedIdentifier VisitFunction(Function function) { return(new(IdentifierUtility.Parse(function.getName()))); }
public virtual QsiQualifiedIdentifier VisitNextValExpression(NextValExpression expression) { return(new(IdentifierUtility.Parse(expression.getName()))); }
public virtual QsiQualifiedIdentifier VisitMultiPartName(MultiPartName name) { return(new(IdentifierUtility.Parse(name.getFullyQualifiedName()))); }