Constructor and Description |
---|
ResultSet()
Default constructor
|
ResultSet(io.vertx.core.json.JsonObject json)
Create a result-set from JSON
|
ResultSet(List<String> columnNames,
List<io.vertx.core.json.JsonArray> results,
ResultSet next)
Create a result-set
|
ResultSet(ResultSet other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<String> |
getColumnNames()
Get the column names
|
ResultSet |
getNext()
Get the next result set
|
int |
getNumColumns()
Return the number of columns in the result set
|
int |
getNumRows()
Return the number of rows in the result set
|
io.vertx.core.json.JsonArray |
getOutput()
Get the registered outputs
|
List<io.vertx.core.json.JsonArray> |
getResults()
Get the results
|
List<io.vertx.core.json.JsonObject> |
getRows()
Get the rows - each row represented as a JsonObject where the keys are the column names and the values are
the column values.
|
int |
hashCode() |
ResultSet |
setColumnNames(List<String> columnNames) |
ResultSet |
setNext(ResultSet next) |
ResultSet |
setOutput(io.vertx.core.json.JsonArray output) |
ResultSet |
setResults(List<io.vertx.core.json.JsonArray> results) |
io.vertx.core.json.JsonObject |
toJson()
Convert to JSON
|
public ResultSet()
public ResultSet(ResultSet other)
other
- result-set to copypublic ResultSet(List<String> columnNames, List<io.vertx.core.json.JsonArray> results, ResultSet next)
columnNames
- the column namesresults
- the resultspublic ResultSet(io.vertx.core.json.JsonObject json)
json
- the jsonpublic io.vertx.core.json.JsonObject toJson()
public List<io.vertx.core.json.JsonArray> getResults()
public io.vertx.core.json.JsonArray getOutput()
public ResultSet setOutput(io.vertx.core.json.JsonArray output)
public ResultSet getNext()
public List<io.vertx.core.json.JsonObject> getRows()
Beware that it's legal for a query result in SQL to contain duplicate column names, in which case one will
overwrite the other if using this method. If that's the case use getResults()
instead.
public int getNumRows()
public int getNumColumns()
Copyright © 2018. All rights reserved.