[#6372] Add DSLContext Configuration.dsl()

This commit is contained in:
lukaseder 2017-07-03 13:36:04 +02:00
parent d3d66edacf
commit f8191d8390
2 changed files with 20 additions and 0 deletions

View File

@ -164,6 +164,17 @@ import org.jooq.tools.StopWatchListener;
*/
public interface Configuration extends Serializable {
// -------------------------------------------------------------------------
// Wrap this Configuration
// -------------------------------------------------------------------------
/**
* Wrap this <code>Configuration</code> in a {@link DSLContext}, providing
* access to the configuration-contextual DSL to construct executable
* queries.
*/
DSLContext dsl();
// -------------------------------------------------------------------------
// Custom data
// -------------------------------------------------------------------------

View File

@ -497,6 +497,15 @@ public class DefaultConfiguration implements Configuration {
: new ConcurrentHashMap<Object, Object>();
}
// -------------------------------------------------------------------------
// XXX: Wrap this Configuration
// -------------------------------------------------------------------------
@Override
public final DSLContext dsl() {
return DSL.using(this);
}
// -------------------------------------------------------------------------
// XXX: Deriving configurations
// -------------------------------------------------------------------------