MySql.Data.Entity.ColumnFragment.PushInput C# (CSharp) Method

PushInput() public method

public PushInput ( string inputName ) : void
inputName string
return void
    public void PushInput(string inputName)
    {
      if (PropertyFragment == null)
        PropertyFragment = new PropertyFragment();
      PropertyFragment.PushProperty(inputName);
    }

Usage Example

        public override SqlFragment Visit(DbApplyExpression expression)
        {
            DbExpressionBinding inputBinding = expression.Input;
            InputFragment       input        = VisitInputExpression(inputBinding.Expression, inputBinding.VariableName, inputBinding.VariableType);
            DbExpressionBinding applyBinding = expression.Apply;
            InputFragment       apply        = VisitInputExpression(applyBinding.Expression, applyBinding.VariableName, applyBinding.VariableType);
            SelectStatement     select       = new SelectStatement();
            bool isInputSelect = false;

            if (!(input is TableFragment))
            {
                input.Wrap(scope);
                isInputSelect = true;
            }
            apply.Wrap(scope);
            select.From = input;
            select.Wrap(scope);
            if (apply is SelectStatement)
            {
                SelectStatement applySel = apply as SelectStatement;
                foreach (ColumnFragment f in applySel.Columns)
                {
                    SelectStatement newColSelect = new SelectStatement();
                    newColSelect.From  = applySel.From;
                    newColSelect.Where = applySel.Where;
                    if (isInputSelect)
                    {
                        VisitAndReplaceTableName(newColSelect.Where, (input as SelectStatement).From.Name, input.Name);
                    }
                    newColSelect.Limit = applySel.Limit;
                    newColSelect.Columns.Add(f);

                    newColSelect.Wrap(scope);
                    scope.Add(applySel.From.Name, applySel.From);

                    ColumnFragment newCol = new ColumnFragment(apply.Name, f.ColumnName);
                    newCol.Literal = newColSelect;
                    newCol.PushInput(newCol.ColumnName);
                    newCol.PushInput(apply.Name);
                    select.AddColumn(newCol, scope);
                    if (string.IsNullOrEmpty(newCol.ColumnAlias))
                    {
                        newColSelect.Name  = newCol.ColumnName;
                        newCol.ColumnAlias = newCol.ColumnName;
                    }
                    scope.Remove(newColSelect);
                }
                scope.Remove(applySel.From);
                scope.Remove(apply);
            }
            return(select);
        }
All Usage Examples Of MySql.Data.Entity.ColumnFragment::PushInput