A Tasty Treat For All Your Database Needs
Branch: master
Clone or download
Latest commit ccc2cf5 Feb 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add contributing guidelines (#227) Aug 29, 2018
associations Fixes beforeSave pointer panics (#322) Nov 30, 2018
columns Fix some code style issues Oct 29, 2018
fix upgrade to packr/v2 (#309) Nov 19, 2018
genny/config Bump version Feb 14, 2019
logging Improve bad configuration file errors reporting (#238) Sep 6, 2018
migrations Fixes beforeSave pointer panics (#322) Nov 30, 2018
nulls Handle nulls.Int Unmarshal errors properly (#349) Feb 14, 2019
packrd Bump version Feb 15, 2019
slices ngerous serialization in slices.Strings, broken behavior fixes #342 (#… Feb 15, 2019
soda Bump version Feb 15, 2019
.gitignore ignore go modules from git (#210) Aug 18, 2018
.golangci.yml Migrate to golangci-lint & fix some lint issues (#310) Nov 17, 2018
.goreleaser.yml Enable sqlite in MacOS build Jan 27, 2019
.goreleaser.yml.plush Enable sqlite in MacOS build Jan 27, 2019
.travis.yml Fix MySQLSuite execution on Travis (#331) Dec 23, 2018
CODE_OF_CONDUCT.md Add code of conduct Aug 9, 2018
Dockerfile Bump go versions (#226) Aug 29, 2018
LICENSE.txt added a whole bunch of documentation Feb 2, 2016
Makefile upgrade to packr/v2 (#309) Nov 19, 2018
README.md Center logo in README Nov 3, 2018
SHOULDERS.md version bump: v4.9.4-rc.2 Dec 22, 2018
belongs_to.go Silence usage on error (#326) Dec 7, 2018
belongs_to_test.go Merge master into development (#211) Aug 19, 2018
bench.sh Add minor changes (#258) Sep 30, 2018
benchmarks_test.go Fix lint issues Aug 22, 2018
callbacks.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
callbacks_test.go Merge master into development (#211) Aug 19, 2018
clause.go Fix some code style issues Oct 29, 2018
commands.go Refactor logger (#186) Aug 7, 2018
config.go Extract config parsing in ParseConfig Dec 28, 2018
config_test.go Fix config test on Travis Dec 28, 2018
connection.go Improving connection (#323) Dec 2, 2018
connection_details.go Fix SQLite URL parsing on Windows (#339) Jan 22, 2019
connection_details_test.go Cleanup dialect for cockroach and postgresql (#324) Dec 7, 2018
connection_test.go Improving connection (#323) Dec 2, 2018
database.yml fixed mysql dialect to use `options` instead of `encoding` and hardco… Nov 8, 2018
db.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
dialect.go Improving connection (#323) Dec 2, 2018
dialect_cockroach.go Add a Windows Travis build (#330) Dec 22, 2018
dialect_cockroach_test.go Cleanup dialect for cockroach and postgresql (#324) Dec 7, 2018
dialect_mysql.go Improving connection (#323) Dec 2, 2018
dialect_mysql_test.go Migrate to golangci-lint & fix some lint issues (#310) Nov 17, 2018
dialect_postgresql.go Cleanup dialect for cockroach and postgresql (#324) Dec 7, 2018
dialect_sqlite.go Fix SQLite URL parsing on Windows (#339) Jan 22, 2019
dialect_sqlite_shim.go removed duplicated codes and hard-coded switching (#294) Nov 24, 2018
dialect_sqlite_test.go Add a Windows Travis build (#330) Dec 22, 2018
dialect_test.go Pop occasionally drops empty schema.sql files fixes #272 (#273) Oct 20, 2018
doc.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
docker-compose.yml Revert "initial port from pop/fizz to fizz" Jun 16, 2018
executors.go Merge flat/eager creates (#315) Dec 13, 2018
executors_test.go Fixes beforeSave pointer panics (#322) Nov 30, 2018
file_migrator.go Refactor logger (#186) Aug 7, 2018
finders.go Fix some code style issues Oct 29, 2018
finders_test.go Migrate to golangci-lint & fix some lint issues (#310) Nov 17, 2018
group.go Fix some code style issues Oct 29, 2018
having.go Fix some code style issues Oct 29, 2018
join.go Fix some code style issues Oct 29, 2018
logger.go improved deprecation warnings (#247) Sep 21, 2018
logo.png adding pop logo (#287) Nov 3, 2018
migration.go Fix some code style issues Oct 29, 2018
migration_box.go use packd interfaces (#278) Oct 29, 2018
migration_box_test.go upgrade to packr/v2 (#309) Nov 19, 2018
migration_info.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
migrator.go Fix empty schema.sql files shouldn't be written (#313) Nov 17, 2018
model.go Refactor whereID to use a tokenized value (#249) Sep 27, 2018
model_test.go Fix a typo Aug 22, 2018
pagination_test.go Merge master into development (#211) Aug 19, 2018
paginator.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
pop.go removed duplicated codes and hard-coded switching (#294) Nov 24, 2018
pop_test.go Fix MySQLSuite execution on Travis (#331) Dec 23, 2018
query.go Add more comments Nov 7, 2018
query_groups.go Refactor logger (#186) Aug 7, 2018
query_having.go Refactor logger (#186) Aug 7, 2018
query_joins.go Deprecate Left and Right InnerJoins in favor of one InnerJoin. (#275) Oct 29, 2018
query_test.go Fix some code style issues Oct 29, 2018
schema_migrations.go Fix version field size in migrations table (#321) Nov 28, 2018
schema_migrations_appengine.go Fix version field size in migrations table (#321) Nov 28, 2018
scopes.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
scopes_test.go Merge master into development (#211) Aug 19, 2018
slices_test.go Merge master into development (#211) Aug 19, 2018
sql_builder.go Query in support with slice args. (#267) Oct 29, 2018
store.go Revert "initial port from pop/fizz to fizz" Jun 16, 2018
test.sh Allow existing models in eager/flat create (#199) Nov 3, 2018
tx.go Fix gometalinter issues (#117) Jun 11, 2018
validations.go Allow existing models in eager/flat create (#199) Nov 3, 2018

README.md

GoDoc Build Status

POP

A Tasty Treat For All Your Database Needs

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 work flows usually associated with dealing with databases in Go.

Pop makes it easy to do CRUD operations, run migrations, and build/execute queries.

Pop, by default, follows conventions that were influenced by the ActiveRecord Ruby gem. 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, and a CreatedAt time.Time attribute 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, and a UpdatedAt time.Time attribute on the struct, it will be set with the current time when the record is updated.
  • Default database table names are lowercase, plural, and underscored versions of the struct name. Examples: User{} is "users", FooBar{} is "foo_bars", etc...

Want to know more? Take a look at the documentation!

Documentation

Please visit http://gobuffalo.io for the latest documentation, examples, and more.

Quick Start

Shoulders of Giants

Pop would not be possible if not for all of the great projects it depends on. Please see SHOULDERS.md to see a list of them.

Contributing

First, thank you so much for wanting to contribute! It means so much that you care enough to want to contribute. We appreciate every PR from the smallest of typos to the be biggest of features.

To contribute, please read the contribution guidelines: CONTRIBUTING