Skip to content

Commit 8e4f1e8

Browse files
committed
Bug fix: Command line interface (CLI): Fixed UnsupportedOperationException when executing SQL statements.
1 parent c8dbbaf commit 8e4f1e8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

sql12/core/doc/changes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ Table cell data popup now offers find, Xml/Json-reformatting and export function
244244

245245
Bug fixes:
246246

247+
Command line interface (CLI): Fixed UnsupportedOperationException when executing SQL statements.
248+
247249
When the database connection of a Session is broken the possible log message
248250
"Failed to read database meta data. Connection may have been closed by reconnect (Ctrl+T)"
249251
was corrected to

sql12/core/src/net/sourceforge/squirrel_sql/client/cli/CliSession.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ public class CliSession extends CliSessionAdapter
2222
private final SQLConnection _sqlConnection;
2323
private final QueryTokenizer _tokenizer;
2424
private final SessionProperties _sessionProperties;
25+
private final SQLAlias _aliasToConnectTo;
2526

2627
public CliSession(SQLAlias aliasToConnectTo)
2728
{
2829
try
2930
{
31+
_aliasToConnectTo = aliasToConnectTo;
32+
3033
IIdentifier driverID = aliasToConnectTo.getDriverIdentifier();
3134
ISQLDriver sqlDriver = Main.getApplication().getAliasesAndDriversManager().getDriver(driverID);
3235

@@ -95,4 +98,10 @@ public void close() throws SQLException
9598
// that will prevent ending the process when in Batch mode.
9699
_sqlConnection.getConnection().close();
97100
}
101+
102+
@Override
103+
public SQLAlias getAlias()
104+
{
105+
return _aliasToConnectTo;
106+
}
98107
}

0 commit comments

Comments
 (0)