01: /*
02: * WbListTables.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 WbListTables extends SqlCommand {
25: public static final String VERB = "WBLIST";
26:
27: /** Creates a new instance of WbListTables */
28: public WbListTables() {
29: }
30:
31: public String getVerb() {
32: return VERB;
33: }
34:
35: public StatementRunnerResult execute(String aSql)
36: throws SQLException {
37: StatementRunnerResult result = new StatementRunnerResult();
38: DataStore ds = currentConnection.getMetadata().getTables();
39: result.addDataStore(ds);
40: return result;
41: }
42:
43: }
|