()
| 87 | } |
| 88 | |
| 89 | func ExampleInsertStmt_Record() { |
| 90 | type Suggestion struct { |
| 91 | ID int64 |
| 92 | Title NullString |
| 93 | CreatedAt time.Time |
| 94 | } |
| 95 | sugg := &Suggestion{ |
| 96 | Title: NewNullString("Gopher"), |
| 97 | CreatedAt: time.Now(), |
| 98 | } |
| 99 | sess := mysqlSession |
| 100 | sess.InsertInto("suggestions"). |
| 101 | Columns("title"). |
| 102 | Record(&sugg). |
| 103 | Exec() |
| 104 | |
| 105 | // id is set automatically |
| 106 | fmt.Println(sugg.ID) |
| 107 | } |
| 108 | |
| 109 | func ExampleUpdateStmt() { |
| 110 | sess := mysqlSession |
nothing calls this directly
no test coverage detected
searching dependent graphs…