The Unofficial pop Book

A collection of recipes and how-to's that will result into a deep dive of the popular and useful Golang package pop. So what is pop? pop provides mechanisms for interacting with database in an ORM-like way:

  • CRUD operations
  • migrations
  • models
  • transaction handling

The pop documentation intentionally doesn't label itself as an ORM, but there's enough ORM functionality there I don't see where applying the term to the project would be incorrect.

Assumptions

  • You have a working understanding of Golang. You don't need to be an expert but you've at least written a few programs and know your way around.
  • You have an understanding of what CRUD operations are, what a database migration is, and what database modeling is.
  • You know how to set up the standard Golang workspace, and know how to fetch remote packages.

Why pop?

pop offers several advantages:

  • CRUD operations
  • Code-defined models
  • Migrations tool for creating, dropping, and modifying
  • Database support:
    • PostgreSQL (>= 9.3)
    • MySQL (>= 5.7)
    • SQLite (>= 3.x)
  • ActiveRecord UUID pattern
  • YAML configuration
  • Easy environment variable usage
  • Create and update timestamps per record

results matching ""

    No results matching ""