Replaced Update*() with Edit*().
This commit is contained in:
parent
32c1fa6aa1
commit
f602dddff3
@ -205,8 +205,7 @@ func (d *SQLiteDatabase) NewEntry(entry *guestbook.Entry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateEntry
|
||||
func (d *SQLiteDatabase) UpdateEntry(entry *guestbook.Entry) error {
|
||||
func (d *SQLiteDatabase) EditEntry(entry *guestbook.Entry) error {
|
||||
tx, err := d.db.Begin()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -261,7 +260,7 @@ func (d *SQLiteDatabase) NewReply(reply *guestbook.Reply) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *SQLiteDatabase) UpdateReply(reply *guestbook.Reply) error {
|
||||
func (d *SQLiteDatabase) EditReply(reply *guestbook.Reply) error {
|
||||
tx, err := d.db.Begin()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -6,10 +6,10 @@ type Guestbook interface {
|
||||
Entries(page, pageSize int64) ([]*Entry, error)
|
||||
Count() (int64, error)
|
||||
NewEntry(entry *Entry) error
|
||||
UpdateEntry(entry *Entry) error
|
||||
DeleteEntry(entryID int64) (int64, error)
|
||||
EditEntry(entry *Entry) error
|
||||
DeleteEntry(entryID int64) error
|
||||
NewReply(reply *Reply) error
|
||||
UpdateReply(reply *Reply) error
|
||||
DeleteReply(entryID int64) (int64, error)
|
||||
EditReply(reply *Reply) error
|
||||
DeleteReply(entryID int64) error
|
||||
Close() error
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user