top
(Readme.md)
# model [![GoDoc](https://godoc.org/github.com/nucleartide/go-model?status.svg)][1]

An experiment in avoiding CRUD method duplication. View the [docs][1].

*Note: you should probably just use [jinzhu/gorm][2] or [jmoiron/sqlx][3].*

## API

```go
var b Burger
db.Create(&b)
db.Read(&b)
db.Update(&b)
db.Destroy(&b)

var bs Burgers
db.Where("cheese = ?", "swiss").Read(bs)

// Execute callbacks.
db.WithCreate(&b).Exec()
db.WithUpdate(&b).Exec()
```

## License

MIT

[1]: https://godoc.org/github.com/nucleartide/go-model
[2]: https://github.com/jinzhu/gorm
[3]: https://github.com/jmoiron/sqlx

Imported by 3 package(s)

  1. github.com/nucleardump/go-wires/models
  2. github.com/nucleartide/go-wires/models
  3. github.com/nucleartide/mango/models

Imported only in test by 3 package(s)

  1. github.com/nucleardump/go-wires/routes
  2. github.com/nucleartide/go-wires/routes
  3. github.com/nucleartide/mango/routes

Imports 1 package(s)

  1. github.com/jmoiron/sqlx

Test imports 3 package(s)

  1. github.com/lib/pq
  2. github.com/nucleartide/go-wires/model
  3. github.com/stretchr/testify/assert