Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public TableReference(TableValuedFunctionCall tvf)
     : this()
 {
     InitializeMembers();
     InterpretTableValuedFunctionCall(tvf);
 }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
 public TableReference(TableValuedFunctionCall tvf)
     : this()
 {
     InitializeMembers();
     InterpretTableValuedFunctionCall(tvf);
 }
Ejemplo n.º 5
0
 public abstract bool WriteTableValuedFunctionCall(TableValuedFunctionCall node);