mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-21 03:29:31 +00:00
Add usingMaster() to SqlQuery.TypeQuery (#3744)
This commit is contained in:
@@ -367,6 +367,14 @@ public interface SqlQuery extends Serializable, CancelableQuery {
|
||||
*/
|
||||
interface TypeQuery<T> {
|
||||
|
||||
/**
|
||||
* Ensure the master DataSource is used when useMaster is true. Otherwise, the read only
|
||||
* data source can be used if defined.
|
||||
*
|
||||
* @see SqlQuery#usingMaster(boolean)
|
||||
*/
|
||||
TypeQuery<T> usingMaster(boolean useMaster);
|
||||
|
||||
/**
|
||||
* Execute the query using the given transaction.
|
||||
*/
|
||||
|
||||
+12
@@ -269,6 +269,12 @@ public final class DefaultRelationalQuery extends AbstractQuery implements SpiSq
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeQuery<T> usingMaster(boolean useMaster) {
|
||||
DefaultRelationalQuery.this.usingMaster(useMaster);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeQuery<T> usingTransaction(Transaction transaction) {
|
||||
transaction(transaction);
|
||||
@@ -308,6 +314,12 @@ public final class DefaultRelationalQuery extends AbstractQuery implements SpiSq
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeQuery<T> usingMaster(boolean useMaster) {
|
||||
DefaultRelationalQuery.this.usingMaster(useMaster);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeQuery<T> usingTransaction(Transaction transaction) {
|
||||
transaction(transaction);
|
||||
|
||||
Reference in New Issue
Block a user