bulk-ops

command
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 7 Imported by: 0

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 .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL