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

Function getItem

app/src/persistence/mysql.js:77–90  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

75}
76
77async function getItem(id) {
78 return new Promise((acc, rej) => {
79 pool.query('SELECT * FROM todo_items WHERE id=?', [id], (err, rows) => {
80 if (err) return rej(err);
81 acc(
82 rows.map(item =>
83 Object.assign({}, item, {
84 completed: item.completed === 1,
85 }),
86 )[0],
87 );
88 });
89 });
90}
91
92async function storeItem(item) {
93 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…