stable

Clone or download

Read-only

refactor: Report monstro query goes EasyDB

Well, I was too naive when I started to convert TQL queries to EasyDB. The string I pulled was in fact a big ball of mud, forcing me to convert everything (or nothing). Sorry about the big changeset. There should be no functional changes: * In TQL queries (every fields, every logical operators, every comparisons) * In standard queries (advanced or not, every fields) This includes REST queries. Note: There is nothing preventing us to group field->getCriteriaFrom & field->getCriteriaWhere. To not clutter too much (sic) the review I sugget to do it in a dedicated changeset. Part of story #32281: Search artifacts with/without parents via TQL Change-Id: If4934d59cd58d7865545ffe7ded5f8c72ec31a6f

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/FormElement/Burnup.php +8 −2 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Kanban/TrackerReport/ReportFilterFromWhereBuilder.php +9 −13 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/CrossTrackerExpertQueryReportDao.php +2 −29 Go to diff View file
M plugins/testmanagement/include/TestManagement/Step/Definition/Field/StepDefinition.php +8 −10 Go to diff View file
M plugins/testmanagement/include/TestManagement/Step/Execution/Field/StepExecution.php +8 −4 Go to diff View file
M plugins/tracker/include/REST/v1/ReportArtifactFactory.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.php +10 −6 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Alphanum.php +13 −12 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactId.php +8 −4 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php +43 −46 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Burndown.php +7 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Computed.php +7 −4 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_CrossReferences.php +18 −12 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Date.php +39 −39 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_File.php +23 −11 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Float.php +28 −13 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Integer.php +33 −10 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_LastModifiedBy.php +11 −6 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_LastUpdateDate.php +17 −11 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List.php +7 −22 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_Bind.php +58 −30 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_Bind_Null.php +8 −17 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Numeric.php +26 −12 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_OpenList.php +29 −35 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_PerTrackerArtifactIdclass.php +4 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_PermissionsOnArtifact.php +16 −19 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Priority.php +13 −4 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_SubmittedBy.php +16 −8 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_SubmittedOn.php +15 −10 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Text.php +48 −21 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/FieldFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/ArtifactLink/ArtifactLinkFromWhereBuilder.php +37 −23 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/BetweenComparison/ForDateTime.php +8 −21 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/BetweenComparison/ForFloat.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/BetweenComparison/ForInteger.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/BetweenComparison/ForLastUpdateDate.php +9 −20 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/BetweenComparison/ForSubmittedOn.php +9 −20 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/DateTimeConditionBuilder.php +3 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/DateTimeFieldFromWhereBuilder.php +4 −3 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/DateTimeReadOnlyConditionBuilder.php +3 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/DateTimeReadOnlyFieldFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForDateTime.php +13 −22 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForFile.php +23 −13 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForFloat.php +8 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForInteger.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForLastUpdateDate.php +8 −21 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForLastUpdatedBy.php +6 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForListBindStatic.php +8 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForListBindUgroups.php +8 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForListBindUsers.php +9 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForSubmittedBy.php +6 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForSubmittedOn.php +8 −21 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualComparison/ForText.php +14 −9 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualFieldComparisonVisitor.php +8 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereComparisonFieldBuilder.php +12 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereComparisonFieldReadOnlyBuilder.php +7 −7 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereComparisonListFieldBindUgroupsBuilder.php +5 −5 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereComparisonListFieldBuilder.php +5 −5 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereEmptyComparisonListFieldBuilder.php +10 −5 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereEmptyNotEqualComparisonFieldBuilder.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereNotEqualComparisonListFieldBindUgroupsBuilder.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereNotEqualComparisonListFieldBuilder.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/FromWhereSearchableVisitor.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanComparison/ForDateTime.php +7 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanComparison/ForFloat.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanComparison/ForInteger.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanComparison/ForLastUpdateDate.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanComparison/ForSubmittedOn.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanOrEqualComparison/ForDateTime.php +7 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanOrEqualComparison/ForFloat.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanOrEqualComparison/ForInteger.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanOrEqualComparison/ForLastUpdateDate.php +4 −16 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/GreaterThanOrEqualComparison/ForSubmittedOn.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/InComparison/ForLastUpdatedBy.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/InComparison/ForListBindStatic.php +8 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/InComparison/ForListBindUGroups.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/InComparison/ForListBindUsers.php +8 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/InComparison/ForSubmittedBy.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanComparison/ForDateTime.php +7 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanComparison/ForFloat.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanComparison/ForInteger.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanComparison/ForLastUpdateDate.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanComparison/ForSubmittedOn.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanOrEqualComparison/ForDateTime.php +7 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanOrEqualComparison/ForFloat.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanOrEqualComparison/ForInteger.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanOrEqualComparison/ForLastUpdateDate.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/LesserThanOrEqualComparison/ForSubmittedOn.php +5 −17 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/ListReadOnlyConditionBuilder.php +3 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/ListReadOnlyFieldFromWhereBuilder.php +5 −23 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataBetweenComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataEqualComparisonFromWhereBuilder.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataGreaterThanComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataGreaterThanOrEqualComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataInComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataLesserThanComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataLesserThanOrEqualComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataNotEqualComparisonFromWhereBuilder.php +10 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/MetadataNotInComparisonFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForDateTime.php +11 −24 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForFile.php +18 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForFloat.php +5 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForInteger.php +8 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForLastUpdateDate.php +8 −21 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForLastUpdatedBy.php +6 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForListBindStatic.php +9 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForListBindUgroups.php +8 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForListBindUsers.php +9 −18 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForSubmittedBy.php +6 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForSubmittedOn.php +8 −21 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualComparison/ForText.php +14 −8 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualFieldComparisonVisitor.php +8 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotInComparison/ForLastUpdatedBy.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotInComparison/ForListBindStatic.php +8 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotInComparison/ForListBindUGroups.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotInComparison/ForListBindUsers.php +8 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotInComparison/ForSubmittedBy.php +7 −10 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/QueryListFieldPresenter.php +19 −11 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilderVisitor.php +7 −7 Go to diff View file
D plugins/tracker/include/Tracker/Report/Query/AndFromWhere.php +0 −53 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/CommentFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/CommentWithPrivateCheckFromWhereBuilder.php +13 −34 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/CommentWithoutPrivateCheckFromWhereBuilder.php +7 −16 Go to diff View file
D plugins/tracker/include/Tracker/Report/Query/FromWhere.php +0 −59 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/IProvideParametrizedFromAndWhereSQLFragments.php +4 −0 Go to diff View file
D plugins/tracker/include/Tracker/Report/Query/OrFromWhere.php +0 −53 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/ParametrizedAndFromWhere.php +2 −2 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/ParametrizedBase.php +54 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/ParametrizedFromWhere.php +6 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/ParametrizedOrFromWhere.php +2 −2 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/ParametrizedQuery.php +47 −0 Go to diff View file
R plugins/tracker/include/Tracker/Report/Query/IProvideFromAndWhereSQLFragments.php Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/QueryDao.php +457 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Tracker_Report.class.php +90 −56 Go to diff View file
M plugins/tracker/include/Tracker/Report/Tracker_Report_Criteria.class.php +12 −2 Go to diff View file
M plugins/tracker/include/Tracker/Report/dao/Tracker_ReportDao.class.php +0 −281 Go to diff View file
M plugins/tracker/tests/unit/REST/ReportArtifactFactoryTest.php +4 −4 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_CriteriaTest.php +7 −2 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_DateTest.php +16 −25 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_FloatTest.php +2 −2 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_IntegerTest.php +26 −10 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_TextTest.php +40 −6 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Report/Query/Advanced/QueryBuilder/EqualExpectation/ForTextTest.php +7 −14 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Report/Query/Advanced/QueryBuilderVisitorTest.php +44 −50 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Report/Query/ParametrizedAndFromWhereTest.php +140 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Report/Query/ParametrizedOrFromWhereTest.php +140 −0 Go to diff View file
M plugins/tracker_encryption/include/Tracker_FormElement_Field_Encrypted.class.php +7 −15 Go to diff View file
M src/common/Option/Option.php +14 −0 Go to diff View file