public static ResultBearing createResultBearing(Supplier<PreparedStatement> preparedStatementSupplier, ResultSetCreator resultSetCreator, StatementContext ctx) {
        return ResultBearing.of(() -> {
            try {
                ResultSet resultSet = resultSetCreator.createResultSet(preparedStatementSupplier.get());

                if (resultSet == null) {
                    if (ctx.getConfig(ResultProducers.class).allowNoResults) {
                        return new EmptyResultSet();
                    }
                    throw new NoResultsException("Statement returned no results", ctx);
                }

                ctx.addCleanable(resultSet::close);

                return resultSet;
            } catch (SQLException e) {
                throw new ResultSetException("Could not process result set", e, ctx);
            }
        }, ctx);
    }
Create a {@link ResultBearing} instance backed by a {@link ResultSet}. This method can be used to create other {@link ResultProducer} instances
that manage a {@link ResultBearing} instance.

@param preparedStatementSupplier Provides the {@link PreparedStatement} to obtain the {@link ResultSet}.
@param resultSetCreator Creates a {@link ResultSet} from a {@link Statement}.
@param ctx The statement context.
@return An instance of {@link ResultBearing} that is backed by the {@link ResultSet}.
core/src/main/java/org/jdbi/v3/core/result/ResultProducers.java