예제 #1
0
 public Function(StmtType returnType, Token token, List <InputVar> input, List <Stmt> body)
 {
     this.returnType = returnType;
     this.token      = token;
     this.input      = input;
     this.body       = body;
 }
예제 #2
0
 public For(Token forKeyword, StmtType iteratorType, Token iterator, Expr condition, List <Stmt> body)
 {
     token             = forKeyword;
     this.iteratorType = iteratorType;
     this.iterator     = iterator;
     this.condition    = condition;
     this.body         = body;
 }
예제 #3
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="CUBRIDCommand" /> class.
        /// </summary>
        public CUBRIDCommand()
        {
            paramCollection = new CUBRIDParameterCollection();
            isPrepared      = false;

            cmdType  = CommandType.Text;
            cmdText  = String.Empty;
            stmtType = StmtType.NORMAL;
        }
예제 #4
0
    /// <summary>
    ///   Initializes a new instance of the <see cref="CUBRIDCommand" /> class.
    /// </summary>
    public CUBRIDCommand()
    {
      paramCollection = new CUBRIDParameterCollection();
      isPrepared = false;

      cmdType = CommandType.Text;
      cmdText = String.Empty;
      stmtType = StmtType.NORMAL;
    }
예제 #5
0
 public Var(Token typeToken, Token token, Expr initialiser)
 {
     stmtType = new StmtType(new List <Token>()
     {
         typeToken
     });
     this.token       = token;
     this.initialiser = initialiser;
 }
예제 #6
0
 private static StatementType ConvertStmtType(StmtType stmtType)
 {
     if (stmtType == StmtType.Select)
     {
         return(StatementType.Select);
     }
     else if (stmtType == StmtType.Update)
     {
         return(StatementType.Update);
     }
     else if (stmtType == StmtType.InsertValue)
     {
         return(StatementType.InsertValue);
     }
     else if (stmtType == StmtType.InsertSelect)
     {
         return(StatementType.InsertSelect);
     }
     else if (stmtType == StmtType.Delete)
     {
         return(StatementType.Delete);
     }
     else if (stmtType == StmtType.Merge)
     {
         return(StatementType.Merge);
     }
     else if (stmtType == StmtType.Call)
     {
         return(StatementType.Call);
     }
     else if (stmtType == StmtType.Truncate)
     {
         return(StatementType.Truncate);
     }
     else if (stmtType == StmtType.If)
     {
         return(StatementType.If);
     }
     else if (stmtType == StmtType.SqlitePragma)
     {
         return(StatementType.SqlitePragma);
     }
     else if (stmtType == StmtType.Null)
     {
         return(StatementType.Null);
     }
     else
     {
         return(StatementType.Unknown);
     }
 }
예제 #7
0
 public BaseSQLStmt(StmtType type, List <string> stmt)
 {
     StmtType   = type;
     RawContent = stmt;
 }
예제 #8
0
 public InputVar(StmtType type, Token token)
 {
     this.type  = type;
     this.token = token;
 }