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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateEntry
|
func (d *SQLiteDatabase) EditEntry(entry *guestbook.Entry) error {
|
||||||
func (d *SQLiteDatabase) UpdateEntry(entry *guestbook.Entry) error {
|
|
||||||
tx, err := d.db.Begin()
|
tx, err := d.db.Begin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -261,7 +260,7 @@ func (d *SQLiteDatabase) NewReply(reply *guestbook.Reply) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *SQLiteDatabase) UpdateReply(reply *guestbook.Reply) error {
|
func (d *SQLiteDatabase) EditReply(reply *guestbook.Reply) error {
|
||||||
tx, err := d.db.Begin()
|
tx, err := d.db.Begin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -6,10 +6,10 @@ type Guestbook interface {
|
|||||||
Entries(page, pageSize int64) ([]*Entry, error)
|
Entries(page, pageSize int64) ([]*Entry, error)
|
||||||
Count() (int64, error)
|
Count() (int64, error)
|
||||||
NewEntry(entry *Entry) error
|
NewEntry(entry *Entry) error
|
||||||
UpdateEntry(entry *Entry) error
|
EditEntry(entry *Entry) error
|
||||||
DeleteEntry(entryID int64) (int64, error)
|
DeleteEntry(entryID int64) error
|
||||||
NewReply(reply *Reply) error
|
NewReply(reply *Reply) error
|
||||||
UpdateReply(reply *Reply) error
|
EditReply(reply *Reply) error
|
||||||
DeleteReply(entryID int64) (int64, error)
|
DeleteReply(entryID int64) error
|
||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user