You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%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 10169 results for "database"(841ms)
4import type { Place } from "../models/place-models.ts";
5import { processCheckinEvent as _processCheckinEvent } from "../ingestion/record-processor.ts";
6import { db } from "../database/db.ts";
7import { checkinsTable } from "../database/schema.ts";
8import { eq } from "https://esm.sh/drizzle-orm";
9import type { OAuthSessionsInterface } from "jsr:@tijs/atproto-oauth-hono@^0.2.6";
429console.log(`โ Created checkin record: ${checkinResult.uri}`);
430431// IMMEDIATELY save to local database for instant feed updates
432try {
433const rkey = extractRkey(checkinResult.uri);
443},
444});
445console.log(`โ Saved checkin to local database: ${rkey}`);
446} catch (localSaveError) {
447console.error(
448"Failed to save checkin to local database:",
449localSaveError,
450);
198```
199โโโ backend/
200โ โโโ database/
201โ โ โโโ migrations.ts # Schema definitions
202โ โ โโโ queries.ts # DB query functions
257```
258259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering