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

refactor: deduplicate query blocks in Network.java - #109

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

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

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

Extracts shared SQL templates and helper methods to eliminate 5 nearly identical query execution blocks in generateFile(). Also parameterizes the location value (was previously hardcoded in SQL strings).

… in Network.java

The generateFile method had 5 nearly identical query execution blocks
(friends, study-groups, classmates, strangers, familiar-strangers) that
differed only in SQL template, edge label, and threshold values.

Changes:
- Extract LOCATION_MATCH_TEMPLATE and LOCATION_EXCLUDE_TEMPLATE as shared
  SQL templates with operator placeholders
- Add executeLocationMatchQuery() for parameterized location queries
- Add executeEdgeQuery() for location-exclusion queries
- Parameterize the location value (was previously hardcoded in SQL strings)
- Improve Javadoc and parameter naming conventions
@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/l labels Mar 22, 2026
@sauravbhattacharya001

Copy link
Copy Markdown
Owner Author

Closing: superseded or conflicting with newer changes already on main/master.

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

Labels

database Database queries and schema size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant