[jOOQ/jOOQ#9879] Add explicit DataType::computedOnServer
This commit is contained in:
parent
ddb55b5372
commit
c04fb70369
@ -501,6 +501,19 @@ public interface DataType<T> extends Named {
|
||||
*/
|
||||
boolean computed();
|
||||
|
||||
/**
|
||||
* Whether this column is computed on the server.
|
||||
* <p>
|
||||
* This is true only if all of these hold true:
|
||||
* <ul>
|
||||
* <li>{@link #computed()}</li>
|
||||
* <li>{@link #generationLocation()} ==
|
||||
* {@link GenerationLocation#SERVER}</li>
|
||||
* <p>
|
||||
* This feature is implemented in commercial distributions only.
|
||||
*/
|
||||
boolean computedOnServer();
|
||||
|
||||
/**
|
||||
* Whether this column is computed on the client.
|
||||
* <p>
|
||||
|
||||
@ -170,6 +170,11 @@ implements
|
||||
return generatedAlwaysAsGenerator() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean computedOnServer() {
|
||||
return computed() && generationLocation() == GenerationLocation.SERVER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean computedOnClient() {
|
||||
return computed() && generationLocation() == GenerationLocation.CLIENT;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user