Get the one user table that this row type corresponds to. Not all row types correspond to one user table; a flattened row doesn't, nor does a row type that adds fields. For instance, the final row type for a query {@code SELECT cid FROM customer} may (but does not have to) have a corresponding Table; the row typefor {@code SELECT 1, cid FROM customer} may not, since the first field doesn't correspond to any columnin the {@code customer} table.
If this row type doesn't correspond to a user table, it will throw an exception. You can test for that using {@linkplain #hasTable()}. If that method returns true, this method may not throw an exception.
If this method doesn't throw an exception, several other things must be true:
- {@code fieldHasColumn(n) == true} for {@code 0 <= n < nFields()}
- {@code fieldColumn(n).getTable() == table()} (for same range of {@code n}
@return the user table associated with this row
@throws RowTypeToTableMappingException if there is no user table associated with this row