n39librarian/middleware/queries/editBook.ts

11 lines
306 B
TypeScript
Raw Permalink Normal View History

import { Book } from "../types/Book";
export const editBook = ({
uuid,
isbn,
title,
published,
shelf,
}: Pick<Book, "uuid" | "isbn" | "title" | "published" | "shelf">) =>
`UPDATE bookData SET shelf='${shelf}', isbn='${isbn}', title='${title}', published='${published}' WHERE uuid='${uuid}';`;