Package org.pjdbc.annotations


package org.pjdbc.annotations
Annotations for declaring PJDBC driver capabilities.

These annotations are used to generate the pjdbc.capabilities.json manifest at compile time, ensuring the manifest stays in sync with the actual driver implementations.

Core Annotations

Example Usage


 @DriverCapability(
     prefix = "cache",
     description = "Caches SELECT query results in memory",
     capabilities = {"caching"}
 )
 @DriverParameter(name = "ttl", type = ParameterType.INTEGER,
     description = "Time-to-live in seconds", defaultValue = "60")
 @DriverParameter(name = "maxSize", type = ParameterType.INTEGER,
     description = "Maximum cached entries", defaultValue = "1000")
 @DriverSideEffects(stateful = true)
 public class CachingDriver extends AbstractProxyDriver {
     // ...
 }
 

Manifest Generation

An annotation processor scans for these annotations during compilation and generates the pjdbc.capabilities.json manifest. This ensures:

  • Single source of truth (the code itself)
  • No manual manifest updates required
  • Build fails if annotations are missing or invalid
See Also: