Skip to content

gleam db: update_book (Update) #20

@HeyItWorked

Description

@HeyItWorked

Sub-issue of #9, depends on #9a (shared helpers)

pub fn update_book(conn, id, title, author, status) -> Result(Book, AppError)
  • UPDATE books SET title=$1, author=$2, status=$3 WHERE id=$4 RETURNING id, title, author, status
  • Empty rows → Error(NotFound)

Metadata

Metadata

Assignees

No one assigned

    Labels

    db-layerDatabase/query layergleamGleam implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions