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=149&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 7122 results for "database"(1446ms)

Townie.cursorrules2 matches

@chadparkerβ€’Updated 1 week ago
198```
199β”œβ”€β”€ backend/
200β”‚ β”œβ”€β”€ database/
201β”‚ β”‚ β”œβ”€β”€ migrations.ts # Schema definitions
202β”‚ β”‚ β”œβ”€β”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

Okmigrations.ts3 matches

@oknareshmeenaβ€’Updated 1 week ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema for Kids Phone Safety App
4// Note: Change table names when modifying schemas (add _2, _3, etc.)
5
14
15/**
16 * Initialize all database tables
17 */
18export async function initializeDatabase(): Promise<void> {
19 await createParentsTable();
20 await createDevicesTable();

OkREADME.md3 matches

@oknareshmeenaβ€’Updated 1 week ago
16β”œβ”€β”€ backend/
17β”‚ β”œβ”€β”€ index.ts # Main Hono server
18β”‚ β”œβ”€β”€ database/
19β”‚ β”‚ β”œβ”€β”€ migrations.ts # Database schema
20β”‚ β”‚ └── queries.ts # Database operations
21β”‚ └── routes/
22β”‚ β”œβ”€β”€ auth.ts # Authentication routes

Upworkindex.ts1 match

@PortfolioFreelanceβ€’Updated 1 week ago
39 // 1. Validate the form data
40 // 2. Send an email notification
41 // 3. Store the message in a database
42 // 4. Return a success response
43

blogget-old-posts.ts1 match

@charmaineβ€’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",
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.

Towniesend-message.ts1 match

@charmaineβ€’Updated 1 week ago
12 overLimit,
13 startTrackingUsage,
14} from "../database/queries.tsx";
15import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool } from "../tools/index.ts";
16import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

makemeavalindex.ts1 match

@charmaineβ€’Updated 1 week ago
11});
12
13// Inspirational quotes database
14const quotes: Quote[] = [
15 {

Aiytapp.tsx2 matches

@shaileshahndleβ€’Updated 1 week ago
225 } : null);
226
227 // Update in database
228 const selectedClipData = updatedClips.find(c => c.id === selectedClip);
229 if (selectedClipData) {
294 } : null);
295
296 // Update positions in database
297 try {
298 for (const clip of updatedClips) {

Aiytindex.ts5 matches

@shaileshahndleβ€’Updated 1 week ago
11});
12
13// Database setup
14const PROJECTS_TABLE = 'video_editor_projects_v1';
15const CLIPS_TABLE = 'video_editor_clips_v1';
16
17// Initialize database tables
18async function initDatabase() {
19 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${PROJECTS_TABLE} (
20 id TEXT PRIMARY KEY,
43}
44
45// Initialize database on startup
46initDatabase().catch(console.error);
47
48// Serve static files

bookmarksDatabase

@s3thiβ€’Updated 3 months ago

sqLiteDatabase1 file match

@ideofunkβ€’Updated 6 months ago