Add Inline Documentation for adding Custom Extension Functions in `sqlite3-binding.c`
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
Background
We are using mattn/go-sqlite3 in stackql/stackql; we need to add custom extension functions specific to our program. We wouldn't expect these to be committed to this project, but we want an easy, repeatable, automated method to add our functions in a fork via a make target (like make amalgamate). We believe other developers would benefit from this capability as well.
Proposal
Inline documentation is proposed to facilitate developers' addition of custom extension functions. My approach would be to add comments within the sqlite3-binding.c file that serve as placeholders for adding custom extension functions. This would help external developers understand where to include their extension functions without requiring the maintainers of matte/go-sqlite3 to verify, test, or maintain those external functions.
Proposed Changes
1. Forward Declarations
// CUSTOM_EXTENSIONS
// 1. Add custom extension initializer function declarations here...
// End CUSTOM_EXTENSIONS
2. Extension Initializer Array
// CUSTOM_EXTENSIONS
// 2. Include custom extension initializer functions here...
// End CUSTOM_EXTENSIONS
3. Extension Initializer Functions
// CUSTOM_EXTENSIONS
// 3. Add custom extension initializer functions here...
// End CUSTOM_EXTENSIONS
Benefit
These comments will provide clear guidance to developers looking to add custom extensions, helping them to understand the appropriate sections in the sqlite3-binding.c file where they should include their code.
Request
I would like to open a pull request to add these comments and would appreciate any feedback or suggestions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open sqlite3-binding.c and locate the forward declarations, extension initializer array, and extension initializer function sections described in the issue. Add the proposed CUSTOM_EXTENSIONS guidance comments at those three locations, then inspect the resulting file to confirm the placeholders clearly identify where external developers should add their code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, go, sqlite
- Domain
- database, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100