Sqlitecpp Coding Standards
Developmentsqlitecpp-coding-standardsSqlitecpp Coding Standards is an Agent Skill for development published in the SRombauts/SQLiteCpp repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
SQLiteCpp coding standards and API rules for core edits, public headers, style, and Doxygen.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/SRombauts/SQLiteCpp/blob/HEAD/.claude/skills/sqlitecpp-coding-standards/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/sqlitecpp-coding-standards, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
SQLiteCpp Coding Standards
Non-negotiables
- RAII only: acquire in constructors, release in destructors.
- Never throw in destructors; use
SQLITECPP_ASSERT()instead. - C++11 only in core library (C++14 only in
VariadicBind.handExecuteMany.h). - Public API headers must not include
sqlite3.h. - Public API must use
SQLITECPP_APIfromSQLiteCppExport.h. - One
Database/Statement/Columnper thread.
Error handling
- Throw
SQLite::Exceptionfor errors in throwing APIs. - Use
tryExec(),tryExecuteStep(),tryReset()for error codes.
Documentation and style
- Doxygen required for public API (
@brief,@param,@return,@throw). - ASCII only, 4 spaces, Allman braces, max 120 chars, LF line endings, final newline.
- LF line endings are enforced repo-wide by
.gitattributes(* text=auto eol=lf), matching.editorconfig(end_of_line = lf); never commit CRLF. Rungit add --renormalize .if a file drifts. - Use
#pragma oncein headers.
Naming conventions
- Types: PascalCase (
Database,Statement). - Functions/vars: camelCase (
executeStep(),getColumn()). - Members:
mprefix (mDatabase). - Args:
aprefix (aDatabase). - Booleans:
b/mbprefix (bExists,mbDone). - Pointers:
p/mpprefix (pValue,mpSQLite).