demo

command
v0.0.0-...-e974cb4 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Demonstration of ALL go-sqlkit features. Run: go run ./cmd/demo

Sections:

  1. Basic CRUD — Open, Register, Create, Insert, Query, Update, Delete, Replace
  2. Expressions — all expr constructors with execution
  3. GroupBy / Having / Distinct / Limit / Offset / Cap
  4. Builder Nuances — state accumulation, All() vs Where(), reuse
  5. Explicit JOIN: Inner / Left / Right / Full
  6. Auto-Join FromAuto
  7. Many-to-Many Through
  8. Composite PK & Composite Indexes
  9. Field & Tag Mechanics — default, check, fk with actions, old>new, IdentSQL, SQLType
  10. Upsert — OnConflictDoNothing / OnConflictDoUpdate
  11. Set Operations — Union / UnionAll / Intersect / Except
  12. Lock Modes — ForUpdate / ForShare / Nowait / SkipLocked
  13. Nested Transactions — savepoints, rollback, double commit
  14. Migration — column rename, risky change, dry-run, down
  15. Custom Types — RegisterCustomType, type=, driver.Valuer / sql.Scanner
  16. RETURNING (Postgres-only, show SQL)
  17. Database Reflection — TableFor, TableByName, Tables, GetTable
  18. Dialect Features — cross-dialect SQL generation
  19. Error Handling — ErrNoRows, ErrMoreThanRequested, ErrTableNotFound
  20. Database Options

Jump to

Keyboard shortcuts

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