Sub-issue of #9
Scaffold db.gleam with shared infrastructure before the CRUD functions:
AppError custom type — NotFound | DatabaseError(String)
book_decoder() — decodes (id, title, author, status) row tuple into a Book using gleam/dynamic/decode, converts status string via status_from_string
map_error() — converts pog.QueryError → AppError via string.inspect
Imports: gleam/dynamic/decode, gleam/result, gleam/string, models, pog
Sub-issue of #9
Scaffold
db.gleamwith shared infrastructure before the CRUD functions:AppErrorcustom type —NotFound|DatabaseError(String)book_decoder()— decodes(id, title, author, status)row tuple into aBookusinggleam/dynamic/decode, converts status string viastatus_from_stringmap_error()— convertspog.QueryError→AppErrorviastring.inspectImports:
gleam/dynamic/decode,gleam/result,gleam/string,models,pog