Skip to content

Allow NULLs in location and country and remove dead code#93

Merged
rasifr merged 1 commit intomainfrom
fix/variable-and-dead-code
Mar 19, 2026
Merged

Allow NULLs in location and country and remove dead code#93
rasifr merged 1 commit intomainfrom
fix/variable-and-dead-code

Conversation

@mason-sharp
Copy link
Member

Some cleanup that Claude noticed while doing other work

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a151d9c8-9e9b-4000-a414-0d44ece40b7e

📥 Commits

Reviewing files that changed from the base of the PR and between 0a2edff and aad8918.

📒 Files selected for processing (3)
  • db/queries/queries.go
  • db/queries/templates.go
  • pkg/types/types.go
💤 Files with no reviewable changes (1)
  • db/queries/queries.go

📝 Walkthrough

Walkthrough

This pull request removes three database query helper functions and their corresponding SQL template definitions from the query package, while updating the SpockNodeAndSubInfo type to use nullable string pointers for location and country fields.

Changes

Cohort / File(s) Summary
Query Functions Removal
db/queries/queries.go
Removed three public functions: GetBlockRanges, GetSplitPointSimple, and GetSplitPointComposite. These functions handled SQL rendering and direct database querying logic. Callers will require refactoring to compile.
Template Fields Removal
db/queries/templates.go
Removed four public template fields (GetBlockRanges, GetSplitPointComposite, GetSplitPointSimple, CompareBlocksSQL) and their initializations from the global SQLTemplates instance, eliminating precompiled SQL template definitions.
Type Structure Update
pkg/types/types.go
Changed Location and Country fields in SpockNodeAndSubInfo from string to *string, introducing nullability while preserving existing database tags.

Poem

🐰 Hopping through the codebase with glee,
Removing queries that no longer need to be,
Templates are cleaner, pointers more fair,
What once was required now floats in the air!
✨ Refactoring magic, the rabbit's delight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes both main changes: allowing NULLs in location/country fields and removing dead code (three functions and four template fields).
Description check ✅ Passed The description relates to the changeset as cleanup work, though it lacks specific details about the changes being made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/variable-and-dead-code
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rasifr rasifr merged commit 558926b into main Mar 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants