Documentation
¶
Overview ¶
Example: bulk-ops
Demonstrates bulk operations that bypass change tracking for efficient batch processing. Uses BulkInsert, BulkUpdate, and BulkDelete to operate on many rows without the overhead of snapshot diffing.
Key concepts shown:
- BulkInsert inserts 100 log entries in a single batch
- BulkUpdate changes all INFO entries to WARN using Set clauses
- BulkDelete removes all DEBUG entries
- All bulk ops return affected row counts
Usage:
cd examples/bulk-ops go run ../../cmd/drel generate # generates logs/logentry_drel.go + db/drel_gen.go export DATABASE_URL="postgres://localhost:5432/drelexample?sslmode=disable" go run .
Click to show internal directories.
Click to hide internal directories.