Skip to content

refactor: fix extracted_statements.c naming to follow HACKING.md conventions#1325

Merged
suketa merged 1 commit intomainfrom
refactor/extracted-statements-naming
Apr 18, 2026
Merged

refactor: fix extracted_statements.c naming to follow HACKING.md conventions#1325
suketa merged 1 commit intomainfrom
refactor/extracted-statements-naming

Conversation

@suketa
Copy link
Copy Markdown
Owner

@suketa suketa commented Apr 18, 2026

Summary

  • Rename duckdb_extracted_statements__initializeextracted_statements__initialize (Rule 2)
  • Rename duckdb_extracted_statements_destroyextracted_statements_destroy (Rule 1)
  • Rename duckdb_extracted_statements_sizeextracted_statements_size (Rule 1)
  • Rename duckdb_extracted_statements_prepared_statementextracted_statements_prepared_statement (Rule 1)
  • Rename rbduckdb_init_duckdb_extracted_statementsrbduckdb_init_extracted_statements (Rule 10)
  • Update extracted_statements.h and duckdb.c caller accordingly

Test plan

  • bundle exec rake test — 1102 runs, 0 failures, 0 errors

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Streamlined internal naming conventions for extracted statements handling to improve code maintainability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e23c5d11-29fa-4b71-bac6-166e3a97a74d

📥 Commits

Reviewing files that changed from the base of the PR and between 821c032 and aa4b67f.

📒 Files selected for processing (3)
  • ext/duckdb/duckdb.c
  • ext/duckdb/extracted_statements.c
  • ext/duckdb/extracted_statements.h

📝 Walkthrough

Walkthrough

The PR refactors the DuckDB extracted statements extension by renaming internal C functions and the module initialization entry point, removing the redundant "duckdb_" prefix from function names across three files.

Changes

Cohort / File(s) Summary
Extracted Statements Extension
ext/duckdb/duckdb.c, ext/duckdb/extracted_statements.c, ext/duckdb/extracted_statements.h
Refactored function naming by removing redundant "duckdb_" prefix: renamed rbduckdb_init_duckdb_extracted_statements() to rbduckdb_init_extracted_statements() and updated all C function bindings (_initialize, destroy, size, prepared_statement) to use the shortened names (extracted_statements_* instead of duckdb_extracted_statements_*).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A hop, a skip, the prefixes gone,
Simpler names now carry on,
DuckDB statements dance with glee,
Cleaner code for all to see!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: renaming functions in extracted_statements.c to follow HACKING.md naming conventions, which is directly supported by all three modified files.

✏️ 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 refactor/extracted-statements-naming

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.

@suketa suketa merged commit bcf2bf2 into main Apr 18, 2026
45 checks passed
@suketa suketa deleted the refactor/extracted-statements-naming branch April 18, 2026 12:30
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.

1 participant