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/$%7Bart_info.art.src%7D?q=database&page=169&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 7182 results for "database"(3228ms)

blog-3get-old-posts.ts1 match

@jxnblk•Updated 1 week ago
46 "slug": "codegen",
47 "link": "/blog/codegen",
48 "description": "Like Claude Artifacts, but with a backend and database",
49 "pubDate": "Thu, 22 Aug 2024 00:00:00 GMT",
50 "author": "JP Posma",

blog-32025-04-02-post-mortem-db-migration.md5 matches

@jxnblk•Updated 1 week ago
1---
2title: "Post-mortem: A Backward Incompatible Database Migration"
3description: Val runs failed due to a database migration that was not backward compatible
4pubDate: 2025-04-02T00:00:00.000Z
5author: Sophie Houser
6---
7
8Today at 10:11am we experienced a 12-minute outage, which caused HTTP vals to return 503 errors and other types of vals to fail. In the end, the root cause was a deployment timing issue where database migrations were deployed successfully, but our application code deployment hung for several minutes. The new database migrations were incompatible with the old application code and crashed the process.
9
10We aim to make all database migrations maintain backward compatibility, but in this case, we only discovered through the delayed deployment feedback that the new migrations were not compatible with previous versions.
11
12## Timeline
27## Next Steps
28
29Reliability is important to us and we’ve taken steps to make sure this doesn’t happen again. We’ve added a test to ensure database migrations are backward compatible, which we’ll run before we deploy any new code that includes database migrations.

ProtoSharestatic.ts1 match

@c15r•Updated 1 week ago
2import { getCookie } from "https://esm.sh/hono@3.11.7/cookie";
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { getUserById } from "../database/queries.ts";
5
6const staticRoutes = new Hono();

ProtoShareadmin.ts1 match

@c15r•Updated 1 week ago
6 getContentItemById,
7 makeUserAdmin,
8} from "../database/queries.ts";
9import { requireAuth } from "./auth.ts";
10

sqliteExplorerAppREADME.md1 match

@bgschiller•Updated 1 week ago
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable

pixeltrackerREADME.md2 matches

@orjpap•Updated 1 week ago
17- **Method**: GET
18- **Response**: 1x1 transparent PNG image
19- **Side Effect**: Logs visitor information to database
20
21### Admin Dashboard
57- **Request Path**: Always `/sparkle.png`
58
59## Database Schema
60
61```sql

pixeltrackermain.tsx4 matches

@orjpap•Updated 1 week ago
12const TRACKING_TABLE = 'pixel_tracking_logs';
13
14// Initialize database table
15async function initDatabase() {
16 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${TRACKING_TABLE} (
17 id INTEGER PRIMARY KEY AUTOINCREMENT,
24}
25
26// Initialize database on startup
27await initDatabase();
28
29// 1x1 transparent PNG pixel (base64 encoded)

Glancer-backup-as-of-5-31healthCheck.ts3 matches

@lightweight•Updated 1 week ago
12 status: "connected",
13 message: "Successfully connected to Notion API",
14 databases: response.results.map((db) => ({
15 title: db.title?.[0]?.plain_text || "Untitled",
16 id: db.id,
20
21// update the cache
22// this cron updates a blob that stores the JSON that shows the databases that val.town is connected to
23// we present that at root and embed that into Notion
24// to show everyone that the connection is healthy btw Notion and val.town
29 filter: {
30 property: "object",
31 value: "database",
32 },
33 });

Glancer-backup-as-of-5-31README.md10 matches

@lightweight•Updated 1 week ago
221```typescript
222export default async function (interval: Interval) {
223 const pages = await notion.databases.query({
224 database_id: Deno.env.get("GLANCE_DEMOS_DB_ID"),
225 });
226
244});
245
246const databaseId = Deno.env.get("GLANCE_DEMOS_DB_ID");
247```
248
250
251- `NOTION_API_KEY`: Notion integration token
252- `GLANCE_DEMOS_DB_ID`: Notion database ID for demo pages
253- `GLANCE_INTERACTIONS_DB_ID`: Notion database ID for interaction tracking
254
255## Project Conventions
291- `/api/*`: JSON data endpoints for frontend consumption
292- `/demo/*`: Personalized demo page serving with data injection
293- `/tasks/*`: Notion webhook processing and database updates
294
295## External Dependencies
300
301- **Email and Alerting**: Slack notifications and email alerts are configured within Notion
302- **Database Management**: Three core Notion databases power the application:
303 - **Glancer Demos Database**: Stores demo configurations, visitor information, and personalization data
304 - **Glancer Interactions Database**: Warehouses demo events, clicks, and user behavior analytics
305 - **Glancer Agents Database**: Manages agent assignments, availability, and contact information
306
307The Val Town application serves as an automation and presentation layer that extends Notion's native capabilities, providing real-time cobrowsing experiences while maintaining all data persistence and workflow management within the Notion ecosystem.

Glancer3RemixsetAction.ts1 match

@stevekrouse•Updated 1 week ago
12 console.log(data);
13 try {
14 // create a database page in the interactions database
15 const page = await setAction(data);
16 // console.log(page);

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago