Deprecate database indexes used only by SqlRewriterImpl
These methods are only invoked by SqlRewriterImpl. A server relying on secondary indexing does not need these indexes to be present in the database. Mark the methods deprecated to discourage new uses. Change-Id: Ia9eea39a994abc20e2c9735b6a98c028a86bbc53
This commit is contained in:
@@ -42,12 +42,11 @@ public interface ChangeAccess extends Access<Change, Change.Id> {
|
||||
@Query("WHERE dest.projectName = ?")
|
||||
ResultSet<Change> byProject(Project.NameKey p) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE owner = ? AND open = true ORDER BY createdOn, changeId")
|
||||
ResultSet<Change> byOwnerOpen(Account.Id id) throws OrmException;
|
||||
|
||||
@Query("WHERE owner = ? AND open = false ORDER BY lastUpdatedOn DESC LIMIT 5")
|
||||
ResultSet<Change> byOwnerClosed(Account.Id id) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE owner = ? AND open = false ORDER BY lastUpdatedOn")
|
||||
ResultSet<Change> byOwnerClosedAll(Account.Id id) throws OrmException;
|
||||
|
||||
@@ -58,9 +57,11 @@ public interface ChangeAccess extends Access<Change, Change.Id> {
|
||||
@Query("WHERE status = '" + Change.STATUS_SUBMITTED + "'")
|
||||
ResultSet<Change> allSubmitted() throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = true AND sortKey > ? ORDER BY sortKey LIMIT ?")
|
||||
ResultSet<Change> allOpenPrev(String sortKey, int limit) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = true AND sortKey < ? ORDER BY sortKey DESC LIMIT ?")
|
||||
ResultSet<Change> allOpenNext(String sortKey, int limit) throws OrmException;
|
||||
|
||||
@@ -70,6 +71,7 @@ public interface ChangeAccess extends Access<Change, Change.Id> {
|
||||
@Query("WHERE open = true AND dest = ?")
|
||||
ResultSet<Change> byBranchOpenAll(Branch.NameKey p) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = true AND dest.projectName = ? AND sortKey > ?"
|
||||
+ " ORDER BY sortKey LIMIT ?")
|
||||
ResultSet<Change> byProjectOpenPrev(Project.NameKey p, String sortKey,
|
||||
@@ -80,29 +82,35 @@ public interface ChangeAccess extends Access<Change, Change.Id> {
|
||||
ResultSet<Change> byProjectOpenNext(Project.NameKey p, String sortKey,
|
||||
int limit) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = false AND status = ? AND dest.projectName = ? AND sortKey > ?"
|
||||
+ " ORDER BY sortKey LIMIT ?")
|
||||
ResultSet<Change> byProjectClosedPrev(char status, Project.NameKey p,
|
||||
String sortKey, int limit) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = false AND status = ? AND dest.projectName = ? AND sortKey < ?"
|
||||
+ " ORDER BY sortKey DESC LIMIT ?")
|
||||
ResultSet<Change> byProjectClosedNext(char status, Project.NameKey p,
|
||||
String sortKey, int limit) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = false AND status = ? AND sortKey > ? ORDER BY sortKey LIMIT ?")
|
||||
ResultSet<Change> allClosedPrev(char status, String sortKey, int limit)
|
||||
throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = false AND status = ? AND sortKey < ? ORDER BY sortKey DESC LIMIT ?")
|
||||
ResultSet<Change> allClosedNext(char status, String sortKey, int limit)
|
||||
throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = false AND status = ? AND dest = ? AND sortKey > ?"
|
||||
+ " ORDER BY sortKey LIMIT ?")
|
||||
ResultSet<Change> byBranchClosedPrev(char status, Branch.NameKey p,
|
||||
String sortKey, int limit) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE open = false AND status = ? AND dest = ? AND sortKey < ?"
|
||||
+ " ORDER BY sortKey DESC LIMIT ?")
|
||||
ResultSet<Change> byBranchClosedNext(char status, Branch.NameKey p,
|
||||
|
||||
@@ -39,15 +39,12 @@ public interface PatchSetApprovalAccess extends
|
||||
ResultSet<PatchSetApproval> byPatchSetUser(PatchSet.Id patchSet,
|
||||
Account.Id account) throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE changeOpen = true AND key.accountId = ?")
|
||||
ResultSet<PatchSetApproval> openByUser(Account.Id account)
|
||||
throws OrmException;
|
||||
|
||||
@Query("WHERE changeOpen = false AND key.accountId = ?"
|
||||
+ " ORDER BY changeSortKey DESC LIMIT 10")
|
||||
ResultSet<PatchSetApproval> closedByUser(Account.Id account)
|
||||
throws OrmException;
|
||||
|
||||
@Deprecated
|
||||
@Query("WHERE changeOpen = false AND key.accountId = ? ORDER BY changeSortKey")
|
||||
ResultSet<PatchSetApproval> closedByUserAll(Account.Id account)
|
||||
throws OrmException;
|
||||
|
||||
Reference in New Issue
Block a user