Repository navigation
Releases: piyushkumar96/generic-orm
Releases · piyushkumar96/generic-orm
Release list
Release v1.1.1 Batch transaction ops, standalone ORM, Mockery v3
Features
Batch operations in transactions
- ExecuteDBTxn now supports:
- CreateInBatches – insert slices in chunks (configurable
BatchSize, default 1000) - UpsertInBatches – upsert slices in chunks (ON CONFLICT UPDATE)
- DeleteInBatches – soft-delete slices in chunks
- CreateInBatches – insert slices in chunks (configurable
- Chunking avoids PostgreSQL parameter limits (~65k params)
Schema-scoped transaction steps
- Set
DBTxn.SchemaNameso individual transaction steps run in a specific schema (e.g. multi-tenant)
Standalone ORM implementation
- Full in-repo implementation of SQLGORM and helpers (including sqlormHelper with chunking)
- No dependency on AdsCommonPackages/orm
Config and client
- Local GORMConfig and DBConnectionConfigurations (no external config package)
- sqlclient.Init() now returns an error when
db.DB()fails
Documentation
- README: Transaction section documents all supported ops, chunking, and
SchemaName; Quick Start usesDatabaseSchemas; new "Batch and chunked operations" section; API reference updated forExecuteDBTxn - Examples: Transaction demo includes
CreateInBatches,UpsertInBatches, andDeleteInBatches; examples README updated for batch transaction usage
Tooling / Mocks
- Mockery v3: Added
interfaces/.mockery.yaml; regenerated mock_IORMHandler.go;go generateusesmockery --config .mockery.yaml; removed invalidpkgnamefrom config
Breaking changes
- Config: Use
DatabaseSchemas(comma-separated) instead ofDatabaseSchemainDBConnectionConfigurations - Dependencies: No new
go.moddeps; removes need for AdsCommonPackages at runtime
Release v1.1.0 Added multi-schema support, update mocks, and fix examples
feat: Add multi-schema support, update mocks, and fix examples
- Add multi-schema/multi-tenant functionality with context-based schema switching
- Create comprehensive multi-schema example with 6 detailed demos
- Regenerate mocks using mockery v3.2.2 with updated configuration
- Fix compilation errors in examples using build tags
- Add Makefile and documentation for improved developer experience
- Update README with multi-schema API documentation and usage examples
Examples now support PostgreSQL schema-based tenant isolation and can be built independently using make targets.
Generic ORM version v1.0.0
Generic ORM
A comprehensive, high-level ORM wrapper for Go built on top of GORM that provides a generic interface for database operations with PostgreSQL and other SQL databases.
Full Changelog: https://github.com/piyushkumar96/generic-orm/commits/v1.0.0