Updated all code examples to reflect the new generator API that accepts
a BeginTX function instead of managing database connections directly.
Changes include:
- Updated Basic Setup example with txGetter function
- Updated Without Database example
- Updated GORM integration example
- Updated Bun integration example
- Updated Complete Example
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add DBTransaction interface documentation for ORM support
Updated JWT documentation to reflect the new DBTransaction interface
that allows ORM transactions to be used directly with the JWT package.
Changes:
- Added explanation of DBTransaction interface
- Documented that *sql.Tx automatically implements the interface
- Added examples showing GORM transaction usage (tx.Statement.ConnPool)
- Added examples showing Bun transaction usage (bunDB.BeginTx)
- Updated validation and revocation sections with ORM examples
- Clarified that users can choose between ORM or standard transactions
Benefits:
- GORM users can use gormDB.Begin() and pass tx.Statement.ConnPool
- Bun users can use bunDB.BeginTx() and pass tx directly
- Standard library users continue using db.Begin() as before
- No need to extract/manage separate transactions for different libraries
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update JWT documentation for new database interface
Updated all examples to reflect the simplified database API that uses
*sql.DB and *sql.Tx directly instead of custom wrapper interfaces.
Changes:
- Changed GeneratorConfig.DBConn to GeneratorConfig.DB (*sql.DB)
- Updated all transaction examples to use db.Begin() directly
- Removed references to jwt.NewDBConnection() wrapper
- Fixed GORM example to show correct usage with sqlDB
- Corrected Bun example - sql.DB should be created first, then passed
to both Bun and JWT generator (previously showed incorrect usage)
- Updated complete example with proper transaction handling
- Simplified API makes it clearer how to integrate with ORMs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Updated all examples to use jwt.NewDBConnection() wrapper
- Fixed transaction handling to use gen.dbConn.BeginTx()
- Removed references to obsolete jwt.NewSQLExecutor()
- Added missing context imports
- Fixed variable naming in complete example
- Corrected DBConn type from *sql.DB to DBConnection interface
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>