Search in sources :

Example 1 with ParameterMetadata

use of org.hibernate.query.ParameterMetadata in project hibernate-reactive by hibernate.

the class ReactiveSessionImpl method createReactiveNativeQuery.

@Override
public <T> ReactiveNativeQueryImpl<T> createReactiveNativeQuery(String sqlString) {
    checkOpen();
    pulseTransactionCoordinator();
    delayedAfterCompletion();
    try {
        ParameterMetadata params = getFactory().getQueryPlanCache().getSQLParameterMetadata(sqlString, false);
        ReactiveNativeQueryImpl<T> query = new ReactiveNativeQueryImpl<>(sqlString, false, this, params);
        query.setComment("dynamic native SQL query");
        applyQuerySettingsAndHints(query);
        return query;
    } catch (RuntimeException he) {
        throw getExceptionConverter().convert(he);
    }
}
Also used : ParameterMetadata(org.hibernate.query.ParameterMetadata)

Example 2 with ParameterMetadata

use of org.hibernate.query.ParameterMetadata in project hibernate-reactive by hibernate.

the class ReactiveStatelessSessionImpl method createReactiveNativeQuery.

@Override
public <T> ReactiveNativeQuery<T> createReactiveNativeQuery(String sqlString) {
    checkOpen();
    try {
        ParameterMetadata params = getFactory().getQueryPlanCache().getSQLParameterMetadata(sqlString, false);
        ReactiveNativeQueryImpl<T> query = new ReactiveNativeQueryImpl<>(sqlString, false, this, params);
        query.setComment("dynamic native SQL query");
        applyQuerySettingsAndHints(query);
        return query;
    } catch (RuntimeException he) {
        throw getExceptionConverter().convert(he);
    }
}
Also used : ParameterMetadata(org.hibernate.query.ParameterMetadata)

Aggregations

ParameterMetadata (org.hibernate.query.ParameterMetadata)2