(ctx context.Context, arg CreateBookParams)
| 157 | } |
| 158 | |
| 159 | func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (Book, error) { |
| 160 | row := q.db.QueryRowContext(ctx, createBook, |
| 161 | arg.AuthorID, |
| 162 | arg.Isbn, |
| 163 | arg.BookType, |
| 164 | arg.Title, |
| 165 | arg.Yr, |
| 166 | arg.Available, |
| 167 | arg.Tag, |
| 168 | ) |
| 169 | var i Book |
| 170 | err := row.Scan( |
| 171 | &i.BookID, |
| 172 | &i.AuthorID, |
| 173 | &i.Isbn, |
| 174 | &i.BookType, |
| 175 | &i.Title, |
| 176 | &i.Yr, |
| 177 | &i.Available, |
| 178 | &i.Tag, |
| 179 | ) |
| 180 | return i, err |
| 181 | } |
| 182 | |
| 183 | const deleteAuthorBeforeYear = `-- name: DeleteAuthorBeforeYear :exec |
| 184 | DELETE FROM books |
nothing calls this directly
no test coverage detected