forked from mirror/gorm
add toc to documentation
This commit is contained in:
parent
1d5f5f43f3
commit
fc8f0e53c8
55
README.md
55
README.md
|
@ -38,6 +38,61 @@ go get -u github.com/jinzhu/gorm
|
|||
installing the package by using the GoDoc page at:
|
||||
http://godoc.org/github.com/jinzhu/gorm
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Define Models (Structs)](#define-models-structs)
|
||||
- [Conventions](#conventions)
|
||||
- [Initialize Database](#initialize-database)
|
||||
- [Migration](#migration)
|
||||
- [Basic CRUD](#basic-crud)
|
||||
- [Create Record](#create-record)
|
||||
- [Query](#query)
|
||||
- [Query With Where (Plain SQL)](#query-with-where-plain-sql)
|
||||
- [Query With Where (Struct & Map)](#query-with-where-struct--map)
|
||||
- [Query With Not](#query-with-not)
|
||||
- [Query With Inline Condition](#query-with-inline-condition)
|
||||
- [Query With Or](#query-with-or)
|
||||
- [Query Chains](#query-chains)
|
||||
- [Preloading (Eager loading)](#preloading-eager-loading)
|
||||
- [Update](#update)
|
||||
- [Update Without Callbacks](#update-without-callbacks)
|
||||
- [Batch Updates](#batch-updates)
|
||||
- [Update with SQL Expression](#update-with-sql-expression)
|
||||
- [Delete](#delete)
|
||||
- [Batch Delete](#batch-delete)
|
||||
- [Soft Delete](#soft-delete)
|
||||
- [Associations](#associations)
|
||||
- [Has One](#has-one)
|
||||
- [Belongs To](#belongs-to)
|
||||
- [Has Many](#has-many)
|
||||
- [Many To Many](#many-to-many)
|
||||
- [Polymorphism](#polymorphism)
|
||||
- [Advanced Usage](#advanced-usage)
|
||||
- [FirstOrInit](#firstorinit)
|
||||
- [FirstOrCreate](#firstorcreate)
|
||||
- [Select](#select)
|
||||
- [Order](#order)
|
||||
- [Limit](#limit)
|
||||
- [Offset](#offset)
|
||||
- [Count](#count)
|
||||
- [Pluck](#pluck)
|
||||
- [Raw SQL](#raw-sql)
|
||||
- [Row & Rows](#row--rows)
|
||||
- [Scan](#scan)
|
||||
- [Group & Having](#group--having)
|
||||
- [Joins](#joins)
|
||||
- [Transactions](#transactions)
|
||||
- [Scopes](#scopes)
|
||||
- [Callbacks](#callbacks)
|
||||
- [Specifying The Table Name](#specifying-the-table-name)
|
||||
- [Error Handling](#error-handling)
|
||||
- [Logger](#logger)
|
||||
- [Existing Schema](#existing-schema)
|
||||
- [Composite Primary Key](#composite-primary-key)
|
||||
- [Database Indexes & Foreign Key](#database-indexes--foreign-key)
|
||||
- [Default values](#default-values)
|
||||
- [More examples with query chain](#more-examples-with-query-chain)
|
||||
|
||||
## Define Models (Structs)
|
||||
|
||||
```go
|
||||
|
|
Loading…
Reference in New Issue