Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

refactor: extract buildMeetingQuery() to eliminate duplicated SQL templates - #138

Closed
sauravbhattacharya001 wants to merge 1 commit into
masterfrom
refactor/deduplicate-sql-queries
Closed

sauravbhattacharya001 wants to merge 1 commit into
masterfrom
refactor/deduplicate-sql-queries

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

Changes

Extracted a shared \�uildMeetingQuery(locationFilter, durationOp, countOp)\ method in \Network.java\ that generates parameterized SQL queries for all 5 relationship types (friends, study groups, classmates, strangers, familiar strangers).

Before: 5 separate multi-line SQL string constants (~40 lines) with nearly identical structure, differing only in location filter, duration comparison, and count comparison.

After: One reusable method + 5 clean one-liner calls. Reduces duplication and makes it trivial to add new relationship types or modify the query structure.

No behavioral change — generates identical SQL.

…emplates

Network.java had 5 nearly identical SQL query strings that differed only in
location filter, duration operator, and count operator. Extracted a shared
buildMeetingQuery(locationFilter, durationOp, countOp) method that generates
the parameterized SQL, reducing ~40 lines of duplicated query definitions
to 5 clean one-liner calls.

No behavioral change — queries produce identical SQL.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added database Database queries and schema size/m labels Mar 29, 2026
@sauravbhattacharya001

Copy link
Copy Markdown
Owner Author

Closing — changes already landed via direct push or superseded. No longer needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

database Database queries and schema size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant