use of org.firebirdsql.gds.ng.fields.RowValueBuilder in project jaybird by FirebirdSQL.
the class FBDatabaseMetaData method processTablePrivileges.
protected final FBResultSet processTablePrivileges(final RowDescriptor rowDescriptor, final ResultSet fbTablePrivileges) throws SQLException {
final List<RowValue> rows = new ArrayList<>();
final RowValueBuilder valueBuilder = new RowValueBuilder(rowDescriptor);
do {
rows.add(valueBuilder.at(2).set(getBytes(fbTablePrivileges.getString("TABLE_NAME"))).at(3).set(getBytes(fbTablePrivileges.getString("GRANTOR"))).at(4).set(getBytes(fbTablePrivileges.getString("GRANTEE"))).at(5).set(mapPrivilege(fbTablePrivileges.getString("PRIVILEGE"))).at(6).set(fbTablePrivileges.getShort("IS_GRANTABLE") == 0 ? NO_BYTES : YES_BYTES).toRowValue(true));
} while (fbTablePrivileges.next());
return new FBResultSet(rowDescriptor, rows);
}
Aggregations