MCPcopy Create free account
hub / github.com/docker/getting-started / getItem

Function getItem

app/src/persistence/sqlite.js:55–68  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

53}
54
55async function getItem(id) {
56 return new Promise((acc, rej) => {
57 db.all('SELECT * FROM todo_items WHERE id=?', [id], (err, rows) => {
58 if (err) return rej(err);
59 acc(
60 rows.map(item =>
61 Object.assign({}, item, {
62 completed: item.completed === 1,
63 }),
64 )[0],
65 );
66 });
67 });
68}
69
70async function storeItem(item) {
71 return new Promise((acc, rej) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…