Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15423198
D7837.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D7837.id.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -676,6 +676,7 @@
'DrydockPHIDTypeLease' => 'applications/drydock/phid/DrydockPHIDTypeLease.php',
'DrydockPHIDTypeResource' => 'applications/drydock/phid/DrydockPHIDTypeResource.php',
'DrydockPreallocatedHostBlueprintImplementation' => 'applications/drydock/blueprint/DrydockPreallocatedHostBlueprintImplementation.php',
+ 'DrydockQuery' => 'applications/drydock/query/DrydockQuery.php',
'DrydockResource' => 'applications/drydock/storage/DrydockResource.php',
'DrydockResourceCloseController' => 'applications/drydock/controller/DrydockResourceCloseController.php',
'DrydockResourceController' => 'applications/drydock/controller/DrydockResourceController.php',
@@ -3055,7 +3056,7 @@
0 => 'DrydockBlueprintController',
1 => 'PhabricatorApplicationSearchResultsControllerInterface',
),
- 'DrydockBlueprintQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+ 'DrydockBlueprintQuery' => 'DrydockQuery',
'DrydockBlueprintSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DrydockBlueprintViewController' => 'DrydockBlueprintController',
'DrydockCommandInterface' => 'DrydockInterface',
@@ -3074,7 +3075,7 @@
0 => 'DrydockLeaseController',
1 => 'PhabricatorApplicationSearchResultsControllerInterface',
),
- 'DrydockLeaseQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+ 'DrydockLeaseQuery' => 'DrydockQuery',
'DrydockLeaseReleaseController' => 'DrydockLeaseController',
'DrydockLeaseSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DrydockLeaseStatus' => 'DrydockConstants',
@@ -3092,7 +3093,7 @@
0 => 'DrydockLogController',
1 => 'PhabricatorApplicationSearchResultsControllerInterface',
),
- 'DrydockLogQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+ 'DrydockLogQuery' => 'DrydockQuery',
'DrydockLogSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DrydockManagementCloseWorkflow' => 'DrydockManagementWorkflow',
'DrydockManagementCreateResourceWorkflow' => 'DrydockManagementWorkflow',
@@ -3103,6 +3104,7 @@
'DrydockPHIDTypeLease' => 'PhabricatorPHIDType',
'DrydockPHIDTypeResource' => 'PhabricatorPHIDType',
'DrydockPreallocatedHostBlueprintImplementation' => 'DrydockBlueprintImplementation',
+ 'DrydockQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'DrydockResource' =>
array(
0 => 'DrydockDAO',
@@ -3115,7 +3117,7 @@
0 => 'DrydockResourceController',
1 => 'PhabricatorApplicationSearchResultsControllerInterface',
),
- 'DrydockResourceQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+ 'DrydockResourceQuery' => 'DrydockQuery',
'DrydockResourceSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DrydockResourceStatus' => 'DrydockConstants',
'DrydockResourceViewController' => 'DrydockResourceController',
Index: src/applications/drydock/query/DrydockBlueprintQuery.php
===================================================================
--- src/applications/drydock/query/DrydockBlueprintQuery.php
+++ src/applications/drydock/query/DrydockBlueprintQuery.php
@@ -1,7 +1,6 @@
<?php
-final class DrydockBlueprintQuery
- extends PhabricatorCursorPagedPolicyAwareQuery {
+final class DrydockBlueprintQuery extends DrydockQuery {
private $ids;
private $phids;
@@ -63,8 +62,4 @@
return $this->formatWhereClause($where);
}
- public function getQueryApplicationClass() {
- return 'PhabricatorApplicationDrydock';
- }
-
}
Index: src/applications/drydock/query/DrydockLeaseQuery.php
===================================================================
--- src/applications/drydock/query/DrydockLeaseQuery.php
+++ src/applications/drydock/query/DrydockLeaseQuery.php
@@ -1,7 +1,6 @@
<?php
-final class DrydockLeaseQuery
- extends PhabricatorCursorPagedPolicyAwareQuery {
+final class DrydockLeaseQuery extends DrydockQuery {
private $ids;
private $phids;
@@ -106,8 +105,4 @@
return $this->formatWhereClause($where);
}
- public function getQueryApplicationClass() {
- return 'PhabricatorApplicationDrydock';
- }
-
}
Index: src/applications/drydock/query/DrydockLogQuery.php
===================================================================
--- src/applications/drydock/query/DrydockLogQuery.php
+++ src/applications/drydock/query/DrydockLogQuery.php
@@ -1,6 +1,6 @@
<?php
-final class DrydockLogQuery extends PhabricatorCursorPagedPolicyAwareQuery {
+final class DrydockLogQuery extends DrydockQuery {
private $resourceIDs;
private $leaseIDs;
@@ -110,8 +110,4 @@
return $this->formatWhereClause($where);
}
- public function getQueryApplicationClass() {
- return 'PhabricatorApplicationDrydock';
- }
-
}
Index: src/applications/drydock/query/DrydockQuery.php
===================================================================
--- /dev/null
+++ src/applications/drydock/query/DrydockQuery.php
@@ -0,0 +1,10 @@
+<?php
+
+abstract class DrydockQuery
+ extends PhabricatorCursorPagedPolicyAwareQuery {
+
+ public function getQueryApplicationClass() {
+ return 'PhabricatorApplicationDrydock';
+ }
+
+}
Index: src/applications/drydock/query/DrydockResourceQuery.php
===================================================================
--- src/applications/drydock/query/DrydockResourceQuery.php
+++ src/applications/drydock/query/DrydockResourceQuery.php
@@ -1,7 +1,6 @@
<?php
-final class DrydockResourceQuery
- extends PhabricatorCursorPagedPolicyAwareQuery {
+final class DrydockResourceQuery extends DrydockQuery {
private $ids;
private $phids;
@@ -94,8 +93,4 @@
return $this->formatWhereClause($where);
}
- public function getQueryApplicationClass() {
- return 'PhabricatorApplicationDrydock';
- }
-
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 1:52 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7376796
Default Alt Text
D7837.id.diff (5 KB)
Attached To
Mode
D7837: Introduce DrydockQuery to slightly reduce code duplication
Attached
Detach File
Event Timeline
Log In to Comment