01: /*
02: * WbListVars.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.db.WbConnection;
17: import workbench.sql.SqlCommand;
18: import workbench.sql.VariablePool;
19: import workbench.sql.StatementRunnerResult;
20:
21: /**
22: *
23: * @author support@sql-workbench.net
24: */
25: public class WbListVars extends SqlCommand {
26: public static final String VERB = "WBVARLIST";
27:
28: public WbListVars() {
29: }
30:
31: public String getVerb() {
32: return VERB;
33: }
34:
35: protected boolean isConnectionRequired() {
36: return false;
37: }
38:
39: public StatementRunnerResult execute(String aSql)
40: throws SQLException {
41: StatementRunnerResult result = new StatementRunnerResult();
42: result.addDataStore(VariablePool.getInstance()
43: .getVariablesDataStore());
44: result.setSuccess();
45: return result;
46: }
47:
48: }
|