01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.command.ddl;
07:
08: import java.sql.SQLException;
09:
10: import org.h2.engine.Right;
11: import org.h2.engine.Session;
12: import org.h2.table.TableView;
13:
14: /**
15: * This class represents the statement
16: * ALTER VIEW
17: */
18: public 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: public int update() throws SQLException {
31: session.commit(true);
32: session.getUser().checkRight(view, Right.ALL);
33: view.recompile(session);
34: return 0;
35: }
36:
37: }
|