Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7BsvgDataUrl%7D?q=database&page=1&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=database

Returns an array of strings in format "username" or "username/projectName"

Found 7464 results for "database"(4464ms)

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago

yc_database

@stevekrouseโ€ขUpdated 6 months ago

notionGetDatabase2 file matches

@junhocaโ€ขUpdated 9 months ago

notionGetDatabase2 file matches

@ttodosiโ€ขUpdated 10 months ago

databaseRunner1 file match

@nicosuaveโ€ขUpdated 11 months ago

dateMeNotionDatabase2 file matches

@stevekrouseโ€ขUpdated 1 year ago

notionGetDatabaseEditedAfter2 file matches

@stevekrouseโ€ขUpdated 1 year ago

databaseVal2 file matches

@stevekrouseโ€ขUpdated 1 year ago

getDateMeDatabase2 file matches

@stevekrouseโ€ขUpdated 1 year ago

cardamonval-town.mdc2 matches

@connnollyโ€ขUpdated 2 hours ago
179```
180โ”œโ”€โ”€ backend/
181โ”‚ โ”œโ”€โ”€ database/
182โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
183โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
239 ```
240
241### Database Patterns
242- Run migrations on startup or comment out for performance
243- Change table names when modifying schemas rather than altering

GlancerdemoCache.ts7 matches

@lightweightโ€ขUpdated 6 hours ago
2import { Client } from "npm:@notionhq/client";
3import { blobKeyForDemoCache } from "../../shared/utils/blobKeyForDemoCache.ts";
4import { getRelatedPagesFromDatabase } from "../controllers/relatedPages.controller.ts";
5
6// Initialize Notion client
11export default async function (interval: Interval) {
12 // this cron runs every minute
13 // it saves a blob for every page in the "Glancer demos" database
14 // that holds the Notion data and markup needed for every demo
15 // this way, to build a demo in the browser (ie., when /demo/:id is called),
18 const twoDaysAgo = new Date(Date.now() - 48 * 60 * 60 * 1000).toISOString();
19 try {
20 const pages = await notion.databases.query({
21 database_id: Deno.env.get("GLANCE_DEMOS_DB_ID"),
22 filter: {
23 // only get recently edited demos; we don't need to keep stale demos in the cache
29 });
30 console.log("pages to cache: ", pages.results.length);
31 // for each page in the demo database, save a blob
32 for (const page of pages.results) {
33 // remove properties that are not used in the demo and don't need to be saved to the blob
48 page.properties = scrubbed;
49
50 // get "Glancer content" database pages added to the demo page
51 const relatedPages = await getRelatedPagesFromDatabase(page.id);
52
53 // use the same blob key that /views/demo/demo.ts calls to build the page