top

So what does Pop do exactly? Well, it wraps the absolutely amazing https://github.com/jmoiron/sqlx library. It cleans up some of the common patterns and workflows usually associated with dealing with databases in Go.

Pop makes it easy to do CRUD operations, run migrations, and build/execute queries. Is Pop an ORM? I'll leave that up to you, the reader, to decide.

Pop, by default, follows conventions that were defined by the ActiveRecord Ruby gem, http://www.rubyonrails.org. What does this mean?

* Tables must have an "id" column and a corresponding "ID" field on the `struct` being used. * If there is a timestamp column named "created_at", "CreatedAt" on the `struct`, it will be set with the current time when the record is created. * If there is a timestamp column named "updated_at", "UpdatedAt" on the `struct`, it will be set with the current time when the record is updated. * Default databases are lowercase, underscored versions of the `struct` name. Examples: User{} is "users", FooBar{} is "foo_bars", etc...

Imports 14 package(s)

  1. github.com/markbates/going/defaults
  2. github.com/markbates/inflect
  3. github.com/markbates/pop/columns
  4. gopkg.in/yaml.v2
  5. github.com/lib/pq
  6. github.com/markbates/validate
  7. github.com/jmoiron/sqlx
  8. github.com/fatih/color
  9. github.com/satori/go.uuid
  10. github.com/markbates/pop/fizz/translators
  11. github.com/markbates/pop/fizz
  12. github.com/go-sql-driver/mysql
  13. github.com/markbates/going/randx
  14. github.com/pkg/errors

Test imports 7 package(s)

  1. github.com/mattn/go-sqlite3
  2. github.com/markbates/pop
  3. github.com/stretchr/testify/suite
  4. github.com/markbates/validate/validators
  5. github.com/markbates/pop/nulls
  6. github.com/stretchr/testify/require
  7. github.com/markbates/pop/slices