public void Visit(TruncateTableStatement statement)
        {
            var variableArgs = VisitChild(statement.Variable);

            var expression = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression(variableArgs.CodeExpression, "Truncate"));

            _codeStack.Peek().ParentStatements.Add(expression);
            _codeStack.Peek().CodeExpression = expression;
        }
Beispiel #2
0
        public void Visit(TruncateTableStatement statement)
        {
            var variableArgs = VisitChild(statement.Variable);

            var expression = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression(variableArgs.CodeExpression, "Truncate"));

            _codeStack.Peek().ParentStatements.Add(expression);
            _codeStack.Peek().CodeExpression = expression;
        }
Beispiel #3
0
        public static EngineResult Evaluate(TruncateTableStatement truncate, Scope scope)
        {
            // TODO: partition ranges
            var table    = scope.Env.Tables[truncate.TableName.BaseIdentifier.Value];
            var rowCount = table.Rows.Count;

            table.Rows.Clear();
            scope.Env.RowCount = rowCount;
            return(new EngineResult(rowCount));
        }
Beispiel #4
0
 public void Visit(TruncateTableStatement statement, CommonTree tree)
 {
     Parent(tree).Children.Add(statement);
     SetLine(statement, tree);
     VisitChildren(tree);
 }
Beispiel #5
0
 public override void Visit(TruncateTableStatement node)
 {
     DDLStatementFound = true;
 }
Beispiel #6
0
 public override void Visit(TruncateTableStatement node) { this.action(node); }
Beispiel #7
0
        public override void Visit(TruncateTableStatement node)
        {
            var tableName = GetVal(node?.TableName);

            TruncateTables.Add(tableName);
        }
 public override void ExplicitVisit(TruncateTableStatement fragment)
 {
     _fragments.Add(fragment);
 }
Beispiel #9
0
 public override void Visit(TruncateTableStatement node)
 {
     Traverse(node);
 }
Beispiel #10
0
 public void Visit(TruncateTableStatement statement, CommonTree tree)
 {
     Parent(tree).Children.Add(statement);
     SetLine(statement, tree);
     VisitChildren(tree);
 }