Ejemplo n.º 1
0
        protected override void VisitPrepareStatement(IExecutableStatement statement)
        {
            State.Write(Symbols.PREPARE);
            if (statement.Name == null)
            {
                statement.Name = Sql.Name(this.TempExecute);
            }
            VisitNameToken(statement.Name);
            string separator = Symbols.OpenParenthesis;

            foreach (var p in ((PrepareStatement)statement).Parameters)
            {
                State.Write(separator);
                State.Write(String.Empty);
                separator = Symbols.Comma;
                VisitType(p);
            }
            if (separator == Symbols.Comma)
            {
                State.Write(Symbols.CloseParenthesis);
            }
            State.Write(Symbols.AS);
            if (statement.Target.Target != null)
            {
                VisitStatement(statement.Target.Target);
            }
            State.WriteStatementTerminator();
        }
Ejemplo n.º 2
0
    private void OnTargetReached()
    {
        IExecutableStatement targetExecutableStatement = currentTarget.GetComponent <IExecutableStatement>();

        if (targetExecutableStatement == null)
        {
            Debug.LogError("Error: target does not have <IExecutableStatement> component... Stopping runner");
            running = false;
            return;
        }

        targetExecutableStatement.ExecuteStatement();
        currentTarget = targetExecutableStatement.GetNextExecutableStatement();
    }
Ejemplo n.º 3
0
        protected override void VisitPrepareStatement(IExecutableStatement statement)
        {
            State.Write(Symbols.PREPARE);
            VisitNameToken(statement.Name);
            State.Write(Symbols.FROM);

            if (statement.Target.Name != null)
            {
                VisitNameToken(statement.Target.Name);
            }
            else if (statement.Target.Target != null)
            {
                State.Write(String.Empty);
                this.Stringify(statement.Target.Target, true);
            }
            State.WriteStatementTerminator();
        }
Ejemplo n.º 4
0
 protected abstract void VisitPrepareStatement(IExecutableStatement statement);
Ejemplo n.º 5
0
 protected override void VisitPrepareStatement(IExecutableStatement statement)
 {
     throw new NotImplementedException();
 }