11 lines
318 B
TypeScript
11 lines
318 B
TypeScript
|
import { Book } from "../types/Book";
|
||
|
|
||
|
export const createBook = ({
|
||
|
uuid,
|
||
|
title,
|
||
|
isbn,
|
||
|
shelf,
|
||
|
published,
|
||
|
}: Pick<Book, "uuid" | "title" | "isbn" | "shelf" | "published">) =>
|
||
|
`INSERT INTO bookData SET uuid = '${uuid}', title = '${title}', isbn = '${isbn}', shelf = '${shelf}', published = '${published}';`;
|