Package org.kawanfw.sql.api.server
Class SqlEvent
java.lang.Object
org.kawanfw.sql.api.server.SqlEvent
public class SqlEvent extends Object
Allows to get all details of a SQL event asked by the client side.
- Since:
- 9.0
- Author:
- Nicolas de Pomereu
-
Method Summary
Modifier and Type Method Description StringgetDatabase()Returns the database name.StringgetIpAddress()Returns the IP address of the client user.List<String>getParameterStringValues()Returns the parameter String values of a prepared statement in the natural order, empty list for a (non prepared) statement.List<Object>getParameterValues()Returns the parameter values of a prepared statement in the natural order, empty list for a (non prepared) statement.StringgetSql()Returns the SQL statement to execute.StringgetUsername()Returns the client username that asked for the SQL request.booleanisMetadataQuery()Says if the SQL event is a special Metadata query.booleanisPreparedStatement()Returnstrueif the statement is aPreparedStatement, elsefalse.StringtoString()
-
Method Details
-
getUsername
Returns the client username that asked for the SQL request.- Returns:
- the client username that asked for the SQL request
-
getDatabase
Returns the database name.- Returns:
- the database name
-
getIpAddress
Returns the IP address of the client user.- Returns:
- the IP address of the client user
-
getSql
Returns the SQL statement to execute.- Returns:
- the SQL statement to execute
-
isPreparedStatement
public boolean isPreparedStatement()Returnstrueif the statement is aPreparedStatement, elsefalse.- Returns:
trueif the statement is aPreparedStatement, elsefalse
-
getParameterValues
Returns the parameter values of a prepared statement in the natural order, empty list for a (non prepared) statement.- Returns:
- the parameter values of a prepared statement in the natural order, empty list for a (non prepared) statement
-
getParameterStringValues
Returns the parameter String values of a prepared statement in the natural order, empty list for a (non prepared) statement.- Returns:
- the parameter String values of a prepared statement in the natural order, empty list for a (non prepared) statement
-
isMetadataQuery
public boolean isMetadataQuery()Says if the SQL event is a special Metadata query.- Returns:
trueif the SQL event is a special Metadata query, elsefalse
-
toString
-