Skip to content

Commit e22e87a

Browse files
authored
Merge pull request #84 from js-ojus/js
Fix two incorrect column name references in `document.go`
2 parents af1685e + 33cc771 commit e22e87a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

document.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ func (_Documents) SetTitle(otx *sql.Tx, dtype DocTypeID, id DocumentID, title st
499499
tx = otx
500500
}
501501

502-
q = `UPDATE ` + tbl + ` SET title = ? WHERE doc_id = ?`
502+
q = `UPDATE ` + tbl + ` SET title = ? WHERE id = ?`
503503
_, err = tx.Exec(q, title, id)
504504
if err != nil {
505505
return err
@@ -533,7 +533,7 @@ func (_Documents) SetData(otx *sql.Tx, dtype DocTypeID, id DocumentID, data stri
533533
tx = otx
534534
}
535535

536-
q := `UPDATE ` + tbl + ` SET data = ? WHERE doc_id = ?`
536+
q := `UPDATE ` + tbl + ` SET data = ? WHERE id = ?`
537537
_, err := tx.Exec(q, data, id)
538538
if err != nil {
539539
return err

0 commit comments

Comments
 (0)