OpenParable
Skip to content
← Back to skills

Sqlitecpp Coding Standards

Development
sqlitecpp-coding-standards

Sqlitecpp 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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. 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.h and ExecuteMany.h).
  • Public API headers must not include sqlite3.h.
  • Public API must use SQLITECPP_API from SQLiteCppExport.h.
  • One Database/Statement/Column per thread.

Error handling

  • Throw SQLite::Exception for 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. Run git add --renormalize . if a file drifts.
  • Use #pragma once in headers.

Naming conventions

  • Types: PascalCase (Database, Statement).
  • Functions/vars: camelCase (executeStep(), getColumn()).
  • Members: m prefix (mDatabase).
  • Args: a prefix (aDatabase).
  • Booleans: b/mb prefix (bExists, mbDone).
  • Pointers: p/mp prefix (pValue, mpSQLite).