Skip to main content

sqlitecpp-coding-standards

SQLiteCpp coding standards and API rules for core edits, public headers, style, and Doxygen.

معلومات المصدر

المستودع
SRombauts/SQLiteCpp
آخر نشاط في المصدر
١ أكتوبر ٢٠٢٦ في ٠٨:٤٨
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٢٬٧٨٩
التفرعات
٥٧٥

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
sqlitecpp-coding-standards
description
SQLiteCpp coding standards and API rules for core edits, public headers, style, and Doxygen.
# SQLiteCpp Coding Standards ## Non-negotiables - RAII only: acquire in constructors, release in destructors. - Never throw in destructors; use `SQLITECPP_ASSERT()` instead. - C++17 is the project minimum. Do not require C++20 without an explicit baseline change. - Public API headers must not include `sqlite3.h`. - Include the standard headers that declare the facilities a public header uses; do not rely on transitive includes. - 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`).
عرض على GitHub