private void InterpretTableValuedFunctionCall(TableValuedFunctionCall tvf) { var fi = tvf.FindDescendant <FunctionIdentifier>(); var udfi = fi.FindDescendant <UdfIdentifier>(); if (udfi != null) { var ds = udfi.FindDescendant <DatasetName>(); DatasetName = (ds != null) ? Util.RemoveIdentifierQuotes(ds.Value) : null; var dbn = udfi.FindDescendant <DatabaseName>(); DatabaseName = (dbn != null) ? Util.RemoveIdentifierQuotes(dbn.Value) : null; var sn = udfi.FindDescendant <SchemaName>(); SchemaName = (sn != null) ? Util.RemoveIdentifierQuotes(sn.Value) : null; var tn = udfi.FindDescendant <FunctionName>(); DatabaseObjectName = (tn != null) ? Util.RemoveIdentifierQuotes(tn.Value) : null; isUdf = true; } else { throw new NameResolverException(ExceptionMessages.FunctionCallNotAllowed); } }
public TableReference(TableValuedFunctionCall tvf) : this() { InitializeMembers(); InterpretTableValuedFunctionCall(tvf); }
private void InterpretTableValuedFunctionCall(TableValuedFunctionCall tvf) { var fi = tvf.FindDescendant<FunctionIdentifier>(); var udfi = fi.FindDescendant<UdfIdentifier>(); if (udfi != null) { var ds = udfi.FindDescendant<DatasetName>(); datasetName = (ds != null) ? Util.RemoveIdentifierQuotes(ds.Value) : null; var dbn = udfi.FindDescendant<DatabaseName>(); databaseName = (dbn != null) ? Util.RemoveIdentifierQuotes(dbn.Value) : null; var sn = udfi.FindDescendant<SchemaName>(); schemaName = (sn != null) ? Util.RemoveIdentifierQuotes(sn.Value) : null; var tn = udfi.FindDescendant<FunctionName>(); databaseObjectName = (tn != null) ? Util.RemoveIdentifierQuotes(tn.Value) : null; isUdf = true; } else { throw new NameResolverException(ExceptionMessages.FunctionCallNotAllowed); } }
public TableReference(TableValuedFunctionCall tvf) : this() { InitializeMembers(); InterpretTableValuedFunctionCall(tvf); }
public abstract bool WriteTableValuedFunctionCall(TableValuedFunctionCall node);