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 | */ |
6 | package org.h2.command.ddl; |
7 | |
8 | import org.h2.command.CommandInterface; |
9 | import org.h2.engine.Session; |
10 | |
11 | /** |
12 | * This class represents the statement |
13 | * DEALLOCATE |
14 | */ |
15 | public class DeallocateProcedure extends DefineCommand { |
16 | |
17 | private String procedureName; |
18 | |
19 | public DeallocateProcedure(Session session) { |
20 | super(session); |
21 | } |
22 | |
23 | @Override |
24 | public int update() { |
25 | session.removeProcedure(procedureName); |
26 | return 0; |
27 | } |
28 | |
29 | public void setProcedureName(String name) { |
30 | this.procedureName = name; |
31 | } |
32 | |
33 | @Override |
34 | public int getType() { |
35 | return CommandInterface.DEALLOCATE; |
36 | } |
37 | |
38 | } |