Query Patterns
Audience
Developers, database engineers, QA engineers, support engineers, security engineers, solution architects, and implementation partners.
Reference Content
This page records source-verified Workforce Scheduling persistence behavior and boundaries.
Summary
Repositories combine purpose-built lookups with exposed queryables. Global filters supply tenant predicates implicitly.
Verified patterns
- Shift lookup by canonical or compatibility identity.
- Active case-insensitive shift-name existence check.
- Weekly-off list ordered by weekday.
- Policy lookup with rules, default-policy lookup, and name existence check.
- Active assignments by employee.
- Assignment lists ordered by newest effective start and joined to shift names.
- Effective-date filtering with inclusive bounds and active state.
- Batch resolver preload of profiles, assignments, shifts, default policy, and weekly offs.
- Audit/timeline filters with descending occurrence order and bounded result size.
- Leave holiday overlap/date lookup and weekly-off day lookup within Leave workflows.
- Legacy shift, weekly-off, and holiday queries through tenant-filtered DbSets.
Reporting
No scheduling-specific reporting projection, materialized view, read replica, or warehouse query was verified. Audit and timeline are the only dedicated diagnostic projections.
Performance evidence
Indexes align with common tenant, active, employee/date, shift-reference, default-policy, and calendar-date access. Production query plans and scale measurements were not available.
Source References
microservices/src/attendance-service/Infrastructure/Persistence.csmicroservices/src/attendance-service/Application/Services/ShiftPolicyQueries.csmicroservices/src/attendance-service/Application/Services/AttendancePolicyResolver.csmicroservices/src/leave-service/Application/LeaveWorkflows.cs
Related Articles
See Also
Keywords
- Workforce Scheduling database
- Shift persistence
- Attendance policy storage
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Next review: 2026-10-20