01: /*
02: * WbListProcedures.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.sql.wbcommands;
13:
14: import java.sql.SQLException;
15:
16: import workbench.sql.SqlCommand;
17: import workbench.sql.StatementRunnerResult;
18: import workbench.storage.DataStore;
19:
20: /**
21: *
22: * @author support@sql-workbench.net
23: */
24: public class WbListProcedures extends SqlCommand {
25: public static final String VERB = "WBLISTPROCS";
26:
27: public WbListProcedures() {
28: }
29:
30: public String getVerb() {
31: return VERB;
32: }
33:
34: public StatementRunnerResult execute(String aSql)
35: throws SQLException {
36: StatementRunnerResult result = new StatementRunnerResult();
37: DataStore ds = currentConnection.getMetadata().getProcedures(
38: null, null);
39: result.addDataStore(ds);
40: result.setSuccess();
41: return result;
42: }
43:
44: }
|