Implemented adding/renaming of areas and sections
This commit is contained in:
parent
d935eb282b
commit
62405c3138
13 changed files with 175 additions and 13 deletions
|
|
@ -21,3 +21,12 @@ func (s *Section) SortedTriggers() []Trigger {
|
|||
|
||||
return s.Triggers
|
||||
}
|
||||
|
||||
func SectionCreate(areaID int, name string) (err error) {// {{{
|
||||
_, err = service.Db.Conn.Exec(`INSERT INTO section(area_id, name) VALUES($1, $2)`, areaID, name)
|
||||
return
|
||||
}// }}}
|
||||
func SectionRename(id int, name string) (err error) {// {{{
|
||||
_, err = service.Db.Conn.Exec(`UPDATE section SET name=$2 WHERE id=$1`, id, name)
|
||||
return
|
||||
}// }}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue