MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / insertVote

Function insertVote

cloud-sql/postgres/knex/index.js:174–180  ·  view source on GitHub ↗
(pool, vote)

Source from the content-addressed store, hash-verified

172 * @returns {Promise}
173 */
174const insertVote = async (pool, vote) => {
175 try {
176 return await pool('votes').insert(vote);
177 } catch (err) {
178 throw Error(err);
179 }
180};
181// [END cloud_sql_postgres_knex_connection]
182
183/**

Callers 1

httpPostFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected