| START (1 byte) | | DATA (1 byte) | size (int, 4 bytes) | byte[] buf | | STOP (1 byte) | | RESULT (1 byte) | total time (long, 8 bytes) | total_bytes (long, 8 bytes)| | REGISTER (1 byte) |
103104105106107108109110111112113114115116
private ResultMessage resultMessage(List<PermissionDetails> details) { if (details.isEmpty()) return new ResultMessage.Void(); ResultSet result = new ResultSet(metadata); for (PermissionDetails pd : details) { result.addColumnValue(UTF8Type.instance.decompose(pd.username)); result.addColumnValue(UTF8Type.instance.decompose(pd.resource.toString())); result.addColumnValue(UTF8Type.instance.decompose(pd.permission.toString())); } return new ResultMessage.Rows(result); }
5657585960616263646566
"query", query, "args", Lists.newArrayList(convertedArgs)); Map<Object, Object> resultAsMap = (Map<Object, Object>) executeMethod.execute(DriverCommand.EXECUTE_SQL, params); ResultSet rs = new ResultSet(((Long) resultAsMap.get("insertId")).intValue(), ((Long) resultAsMap.get("rowsAffected")).intValue(), new ResultSetRows((List<Map<String, Object>>) resultAsMap.get("rows"))); return rs; } };