• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

saygoweb / anorm / 18485748311
84%

Build:
DEFAULT BRANCH: master
Ran 14 Oct 2025 04:44AM UTC
Jobs 1
Files 33
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Oct 2025 04:44AM UTC coverage: 84.373% (+3.9%) from 80.483%
18485748311

push

github

web-flow
Implement comprehensive join optimization system to solve N+1 query problem (#42)

* ai: optimize join plan

* Phase 1: Core Infrastructure Setup - Batch Loading Interfaces and Strategy Components

- Created BatchLoaderInterface for batch relationship loading
- Created QueryStrategyInterface for strategy selection
- Extended abstract Relationship class with batch loading methods
- Implemented DataSizeEstimator for data transfer optimization
- Implemented QueryStrategySelector with decision logic
- Implemented FieldSelectionParser for field selection syntax
- Updated plan document to track progress

This establishes the foundation for optimizing N+1 query problems
in relationship loading through intelligent batch loading strategies.

* Phase 2: IN Clause Batch Loading Implementation

- Created OneHasManyBatchLoader for hasMany relationships
- Created ManyHasOneBatchLoader for belongsTo relationships
- Created ManyHasManyBatchLoader for many-to-many relationships
- Extended all relationship classes with batch loading methods
- Added estimateDataSize() and getCardinality() methods
- Fixed RelationshipManager duplicate method issues
- All tests passing - backward compatibility maintained

This implements the core batch loading functionality that reduces
N+1 queries to single IN clause queries for each relationship type.

* Phase 4: QueryBuilder Integration - Batch Loading Orchestration

- Created BatchLoadingOrchestrator for coordinating batch loading
- Modified QueryBuilder.some() to use batch loading when relationships are specified
- Added configuration options for batch loading behavior
- Implemented strategy selection and fallback mechanisms
- Added comprehensive batch loading tests
- All 157 tests passing with backward compatibility maintained

The QueryBuilder now automatically uses batch loading for eager relationships,
reducing N+1 queries to O(1) queries per relationship type. The system
intelligently selects between batch loading and individual... (continued)

848 of 963 new or added lines in 19 files covered. (88.06%)

1636 of 1939 relevant lines covered (84.37%)

15.71 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
97.83
src/Relationship/BatchLoader/OneHasManyBatchLoader.php
1
98.31
src/Relationship/Strategy/DataSizeEstimator.php
3
72.73
17.17% src/Relationship/OneHasMany.php
3
98.06
src/Relationship/Performance/PerformanceMonitor.php
4
93.22
src/Relationship/BatchLoader/ManyHasOneBatchLoader.php
6
92.21
src/Relationship/Strategy/QueryStrategySelector.php
10
84.85
src/Relationship/BatchLoadingOrchestrator.php
10
53.85
-9.12% src/Relationship/ManyHasMany.php
10
88.51
src/Relationship/Strategy/NestedRelationshipParser.php
13
85.71
src/Relationship/Strategy/JoinWithSelectionLoader.php
18
80.5
-6.75% src/QueryBuilder.php
36
41.94
src/Relationship/BatchLoader/ManyHasManyBatchLoader.php
Jobs
ID Job ID Ran Files Coverage
1 18485748311.1 14 Oct 2025 04:44AM UTC 33
84.37
GitHub Action Run
Source Files on build 18485748311
  • Tree
  • List 33
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • abc802a5 on github
  • Prev Build on master (#18464592014)
  • Next Build on master (#19203298968)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc