WebSession

The web session keeps all data of a user session. This class is used by the H2 Console.

Methods
void addCommand(String sql)
Add a SQL statement to the history.
void addCommand(String sql)
Add a SQL statement to the history.
Parameters:
sql - the SQL statement
void close()
Close the connection and stop the statement if one is currently executing.
void close()
Close the connection and stop the statement if one is currently executing.
Object get(String key)
Get the value for the given key.
Object get(String key)
Get the value for the given key.
Parameters:
key - the key
Returns:
the value
Bnf getBnf()
Get the BNF object.
Bnf getBnf()
Get the BNF object.
Returns:
the BNF object
String getCommand(int id)
Get the SQL statement from history.
String getCommand(int id)
Get the SQL statement from history.
Parameters:
id - the history id
Returns:
the SQL statement
ArrayList getCommandHistory()
Get the list of SQL statements in the history.
ArrayList getCommandHistory()
Get the list of SQL statements in the history.
Returns:
the commands
Connection getConnection()
Connection getConnection()
DbContents getContents()
DbContents getContents()
HashMap getInfo()
Update session meta data information and get the information in a map.
HashMap getInfo()
Update session meta data information and get the information in a map.
Returns:
a map containing the session meta data
DatabaseMetaData getMetaData()
DatabaseMetaData getMetaData()
boolean getShutdownServerOnDisconnect()
boolean getShutdownServerOnDisconnect()
void loadBnf()
Load the SQL grammar BNF.
void loadBnf()
Load the SQL grammar BNF.
void put(String key, Object value)
Put an attribute value in the map.
void put(String key, Object value)
Put an attribute value in the map.
Parameters:
key - the key
value - the new value
void remove(String key)
Remove a session attribute from the map.
void remove(String key)
Remove a session attribute from the map.
Parameters:
key - the key
void setConnection(Connection conn)
void setConnection(Connection conn) throws SQLException
void setShutdownServerOnDisconnect()
Shutdown the server when disconnecting.
void setShutdownServerOnDisconnect()
Shutdown the server when disconnecting.

Fields
static Statement executingStatement
static long lastAccess
static Locale locale
static HashMap map
static ResultSet result

executingStatement

The currently executing statement.

lastAccess

The last time this client sent a request.

locale

The current locale.

map

The session attribute map.

result

The current updatable result set.