mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
#752 - Refactor: SQL generation for @History support with Postgres, MySql (views/triggers based) such that it more closely aligns with SQL 2011 based SQL
This commit is contained in:
1 parent
f8bda05b37
commit
2185c8a886
17 files changed
+148
-103
No files matched your search
@@ -144,10 +144,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
|
||||
private DefaultExpressionList<T> havingExpressions;
|
||||
|
||||
/**
|
||||
* The list of table alias associated with @History entity beans.
|
||||
*/
|
||||
private List<String> asOfTableAlias;
|
||||
private int asOfTableCount;
|
||||
|
||||
/**
|
||||
* Set for flashback style 'as of' query.
|
||||
@@ -281,21 +278,14 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return softDeletePredicates;
|
||||
}
|
||||
|
||||
/**
|
||||
* This table alias is for a @History entity involved in the query and as
|
||||
* such we need to add a 'as of predicate' to the query using this alias.
|
||||
*/
|
||||
@Override
|
||||
public void addAsOfTableAlias(String tableAlias) {
|
||||
if (asOfTableAlias == null) {
|
||||
asOfTableAlias = new ArrayList<String>();
|
||||
}
|
||||
asOfTableAlias.add(tableAlias);
|
||||
public void incrementAsOfTableCount() {
|
||||
asOfTableCount++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAsOfTableAlias() {
|
||||
return asOfTableAlias;
|
||||
public int getAsOfTableCount() {
|
||||
return asOfTableCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user