-
Notifications
You must be signed in to change notification settings - Fork 3
feat: convert InsightsBookingService to use Prisma.sql raw queries #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: insights-query-foundation
Are you sure you want to change the base?
feat: convert InsightsBookingService to use Prisma.sql raw queries #4
Conversation
…22345) * fix: use raw query at InsightsBookingService * feat: convert InsightsBookingService to use Prisma.sql raw queries - Convert auth conditions from Prisma object notation to Prisma.sql - Convert filter conditions from Prisma object notation to Prisma.sql - Update return types from Prisma.BookingTimeStatusDenormalizedWhereInput to Prisma.Sql - Fix type error in isOrgOwnerOrAdmin method - Follow same pattern as InsightsRoutingService conversion Co-Authored-By: [email protected] <[email protected]> * feat: convert InsightsBookingService to use Prisma.sql raw queries - Convert auth conditions from Prisma object notation to Prisma.sql - Convert filter conditions from Prisma object notation to Prisma.sql - Update return types from Prisma.BookingTimeStatusDenormalizedWhereInput to Prisma.Sql - Fix type error in isOrgOwnerOrAdmin method - Follow same pattern as InsightsRoutingService conversion Co-Authored-By: [email protected] <[email protected]> * fix: update InsightsBookingService integration tests for Prisma.sql format - Replace Prisma object notation expectations with Prisma.sql template literals - Add NOTHING_CONDITION constant for consistency with InsightsRoutingService - Update all test cases to use direct Prisma.sql comparisons - Use $queryRaw for actual database integration testing - Follow same testing patterns as InsightsRoutingService Co-Authored-By: [email protected] <[email protected]> * fix: exclude intentionally skipped jobs from required CI check failure - Remove 'skipped' from failure condition in pr.yml and all-checks.yml - Allow E2E jobs to be skipped without failing the required check - Only actual failures and cancelled jobs will cause required check to fail Co-Authored-By: [email protected] <[email protected]> * fix tests * Revert "fix: exclude intentionally skipped jobs from required CI check failure" This reverts commit 6ff44fc9a8f14ad657f7bba7c2e454e192b66c8f. * clean up tests * address feedback --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
PR #4
PR Type
Enhancement
Description
Convert InsightsBookingService from Prisma object notation to raw SQL queries
Refactor condition building logic for improved performance
Update integration tests to validate Prisma.sql format
Fix type checking in isOrgOwnerOrAdmin method
Diagram Walkthrough
File Walkthrough
insightsBooking.ts
Convert to Prisma.sql raw query formatpackages/lib/server/service/insightsBooking.ts
Prisma.BookingTimeStatusDenormalizedWhereInput to Prisma.Sql
1=0instead of wrapped in AND object
buildTeamAuthorizationCondition to use SQL template literals with ANY
operator for array conditions
pattern for AND operations
auth and filter conditions
array includes
insightsBooking.integration-test.ts
Update tests for Prisma.sql format validationpackages/lib/server/service/tests/insightsBooking.integration-test.ts
1=0for consistencynotation to Prisma.sql template literals
proper column quoting
actual database validation