com.appland.appmap.output.v1.SqlQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appmap-agent Show documentation
Show all versions of appmap-agent Show documentation
Inspect and record the execution of Java for use with App Land
The newest version!
package com.appland.appmap.output.v1;
import com.alibaba.fastjson.annotation.JSONField;
/**
* Represents a snapshot of a SQL query issued at runtime. Embedded within an {@link Event}.
* @see Event
* @see GitHub: AppMap - SQL query attributes
*/
public class SqlQuery {
public String sql;
@JSONField(name = "database_type")
public String databaseType;
@JSONField(name = "explain_sql")
public String explainSql;
@JSONField(name = "server_version")
public String serverVersion;
public SqlQuery(String databaseType, String sql) {
this.databaseType = databaseType;
this.sql = sql;
}
/**
* Sets the "sql" field.
* @param sql A SQL query string
* @return {@code this}
*/
public SqlQuery setSql(String sql) {
this.sql = sql;
return this;
}
/**
* Sets the "database_type" field.
* @param databaseType A database type
* @return {@code this}
*/
public SqlQuery setDatabaseType(String databaseType) {
this.databaseType = databaseType;
return this;
}
}