ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB Sphinx Theme Examples API Documentation Doxygen

Caution

You're viewing documentation for an unstable version of ScyllaDB Sphinx Theme. Switch to the latest stable version.

Doxygen¶

The Breathe extension integrates Doxygen-generated documentation into Sphinx.

Supported languages¶

Breathe supports any language that Doxygen can parse:

  • C

  • C++

  • C#

  • Objective-C

  • PHP

  • Java

  • Python (limited)

  • Fortran

  • VHDL

Setup¶

Install Breathe:

pip install breathe

Configure Doxygen to generate XML output in your Doxyfile:

GENERATE_XML = YES
XML_OUTPUT = xml

Add Breathe to your conf.py:

extensions = ['breathe']

breathe_projects = {
    'myproject': './doxygen/xml/'
}
breathe_default_project = 'myproject'

Basic usage¶

Document a class¶

.. doxygenclass:: DatabaseConnection
   :members:
class DatabaseConnection¶

Manages database connections.

This class provides methods for connecting to, querying, and disconnecting from a database.

Public Functions

DatabaseConnection(const std::string &host, int port = 9042, const std::string &username = "")¶

Construct a new Database Connection object.

Parameters:
  • host – The database host address

  • port – The database port number (default: 9042)

  • username – Optional username for authentication

bool connect()¶

Establish a connection to the database.

Throws:

ConnectionError – if connection fails after retries

Returns:

true if connection was successful

Returns:

false if connection failed

std::string execute(const std::string &query)¶

Execute a query on the database.

Parameters:

query – The SQL query string to execute

Throws:

RuntimeError – if not connected to database

Returns:

Query results as a string

void disconnect()¶

Close the database connection.

Document a function¶

.. doxygenfunction:: format_query
std::string format_query(const std::string &query, int indent = 4)¶

Format a SQL query string.

Parameters:
  • query – The SQL query template

  • indent – Number of spaces for indentation (default: 4)

Returns:

Formatted SQL query string

Common options¶

Select specific members¶

.. doxygenclass:: DatabaseConnection
   :members: connect, disconnect

Include private members¶

.. doxygenclass:: DatabaseConnection
   :members:
   :private-members:

Include undocumented members¶

.. doxygenclass:: DatabaseConnection
   :members:
   :undoc-members:

Doxygen comment syntax¶

C++ example¶

/**
 * @brief Establishes a connection
 * @param host The database host address
 * @param port The database port number
 * @return true if connection successful
 * @throw ConnectionError if connection fails
 */
bool connect(const std::string& host, int port);

C example¶

/**
 * @brief Connect to database
 * @param[in] config Connection configuration
 * @return Connection handle or NULL on failure
 */
connection_t* db_connect(const connection_config_t* config);

Configuration¶

Common settings in conf.py:

breathe_default_members = ('members', 'undoc-members')
breathe_show_define_initializer = True

Automatic API generation¶

For large projects, use Exhale to automatically generate API documentation pages:

pip install exhale

Configure in conf.py:

extensions = ['breathe', 'exhale']

exhale_args = {
    'containmentFolder': './api',
    'rootFileName': 'library_root.rst',
    'rootFileTitle': 'API Reference',
    'doxygenStripFromPath': '..',
}

Exhale will automatically create a page for each class, function, and file in your project.

Was this page helpful?

PREVIOUS
Python
NEXT
REST API (Redocly)
  • Create an issue
  • Edit this page

On this page

  • Doxygen
    • Supported languages
    • Setup
    • Basic usage
      • Document a class
        • DatabaseConnection
          • DatabaseConnection()
          • connect()
          • execute()
          • disconnect()
      • Document a function
        • format_query()
    • Common options
      • Select specific members
      • Include private members
      • Include undocumented members
    • Doxygen comment syntax
      • C++ example
      • C example
    • Configuration
    • Automatic API generation
ScyllaDB Sphinx Theme
  • master
    • 1.8
    • 1.7
    • 1.6
    • 1.5
    • 1.4
    • 1.3
    • 1.2
    • 1.1
  • Getting started
    • Toolchain
    • Installation
    • Quickstart
  • Configuration
    • Template options
    • Page options
    • Multiversion options
    • Markdown support
    • Redirects support
    • AI chatbot support (beta)
    • Search support
    • Dependabot support
  • Commands
  • Deployment
    • Production deployment
    • Pull requests previews
    • Centralized publication
  • Examples
    • Admonitions
    • Alert
    • API Documentation
      • Python
      • Doxygen
      • REST API (Redocly)
    • Collapse
    • Code blocks
    • Diagrams
    • Grid
    • Glossary
    • Headings
    • Hero box
    • Icons
    • Images
    • Includes
    • Labels
    • Links
    • Lists
    • Mascots
    • Panel box
    • Substitutions
    • Tables
    • Tabs
    • Text
    • TOC
    • Tooltips
    • Topic box
    • Versions
    • Videos
  • Upgrade guides
    • Upgrading from 1.7 to 1.8
    • Upgrading from 1.6 to 1.7
    • Upgrading from 1.5 to 1.6
    • Upgrading from 1.4 to 1.5
    • Upgrading from 1.3 to 1.4
    • Upgrading from 1.2 to 1.3
    • Upgrading from 1.1 to 1.2
    • Upgrading from 1.0 to 1.1
    • Upgrading from 0.x to 1.0
    • Changelog
  • Contribute
    • Contribute to the documentation
    • Contribute to the theme
    • Source Code
Docs Tutorials University Contact Us About Us
© 2025 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 24 Nov 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.9
Ask AI