EMMA Coverage Report (generated Sun Mar 01 22:06:14 CET 2015)
[all classes][org.h2.command.ddl]

COVERAGE SUMMARY FOR SOURCE FILE [AlterView.java]

nameclass, %method, %block, %line, %
AlterView.java100% (1/1)100% (4/4)94%  (32/34)91%  (10/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AlterView100% (1/1)100% (4/4)94%  (32/34)91%  (10/11)
update (): int 100% (1/1)92%  (22/24)83%  (5/6)
AlterView (Session): void 100% (1/1)100% (4/4)100% (2/2)
getType (): int 100% (1/1)100% (2/2)100% (1/1)
setView (TableView): void 100% (1/1)100% (4/4)100% (2/2)

1/*
2 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (http://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6package org.h2.command.ddl;
7 
8import org.h2.command.CommandInterface;
9import org.h2.engine.Right;
10import org.h2.engine.Session;
11import org.h2.message.DbException;
12import org.h2.table.TableView;
13 
14/**
15 * This class represents the statement
16 * ALTER VIEW
17 */
18public class AlterView extends DefineCommand {
19 
20    private TableView view;
21 
22    public AlterView(Session session) {
23        super(session);
24    }
25 
26    public void setView(TableView view) {
27        this.view = view;
28    }
29 
30    @Override
31    public int update() {
32        session.commit(true);
33        session.getUser().checkRight(view, Right.ALL);
34        DbException e = view.recompile(session, false);
35        if (e != null) {
36            throw e;
37        }
38        return 0;
39    }
40 
41    @Override
42    public int getType() {
43        return CommandInterface.ALTER_VIEW;
44    }
45 
46}

[all classes][org.h2.command.ddl]
EMMA 2.0.5312 (C) Vladimir Roubtsov