MCPcopy Index your code
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / getVisits

Function getVisits

appengine/datastore/app.js:51–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 * Retrieve the latest 10 visit records from the database.
50 */
51const getVisits = () => {
52 const query = datastore
53 .createQuery('visit')
54 .order('timestamp', {descending: true})
55 .limit(10);
56
57 return datastore.runQuery(query);
58};
59
60app.get('/', async (req, res, next) => {
61 // Create a visit record to be stored in the database

Callers 1

app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected