service.database.command.QueryDatabase Maven / Gradle / Ivy
package service.database.command;
import com.google.gson.stream.JsonWriter;
import databaseconnector.api.DatabaseConnection;
import databaseconnector.api.sql.SQLDatabaseConnection;
import databaseconnector.api.sql.SQLSchema;
import databaseconnector.api.sql.SQLTable;
import service.database.SQLDatabaseService;
import service.database.exception.DatabaseNotInitiatedException;
import service.database.exception.DatabaseRoleNotActivatedException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
public class QueryDatabase extends AbstractDatabaseCommand {
public static class ResponseEntry {
public static class ColumnEntry {
private String name;
private String type;
public String getName() {
return name;
}
public String getType() {
return type;
}
}
private String table;
private List columns;
private BigInteger rows;
private List