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/?q=database&page=12&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 7441 results for "database"(3373ms)

Plantfo

Plantfoadmin.html1 match

@Lladโ€ขUpdated 2 days ago
9<body class="bg-gray-50 p-4">
10 <div class="max-w-4xl mx-auto">
11 <h1 class="text-2xl font-bold mb-4">Cache Database</h1>
12 <a href="/" class="text-blue-600 hover:underline mb-4 inline-block">โ† Back to API</a>
13

stevensDemosetupTelegramChatDb.ts2 matches

@sajtosmโ€ขUpdated 2 days ago
1// Script to set up the telegram_chats table in SQLite
2// Run this script manually to create the database table
3
4export default async function setupTelegramChatDb() {
26 console.log("telegram_chats table created successfully.");
27
28 return "Telegram chat database table created successfully.";
29 } catch (error) {
30 console.error("Error setting up telegram_chats table:", error);

stevensDemopopulate.ts4 matches

@sajtosmโ€ขUpdated 2 days ago
385// ];
386
387// Insert memories into the database
388async function insertDemoMemories() {
389 try {
426 await insertDemoMemories();
427
428 console.log("Demo database successfully populated!");
429 return "Demo database successfully populated!";
430 } catch (error) {
431 console.error("Error populating demo database:", error);
432 throw error;
433 }

TownieTODOs.md1 match

@bipin0005โ€ขUpdated 2 days ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

Towniethink.ts1 match

@bipin0005โ€ขUpdated 2 days ago
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),

Towniesystem_prompt.txt2 matches

@bipin0005โ€ขUpdated 2 days ago
174```
175โ”œโ”€โ”€ backend/
176โ”‚ โ”œโ”€โ”€ database/
177โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
178โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
234 ```
235
236### Database Patterns
237- Run migrations on startup or comment out for performance
238- Change table names when modifying schemas rather than altering

Towniestripe-webhook.ts1 match

@bipin0005โ€ขUpdated 2 days ago
1import { Hono } from "npm:hono";
2import Stripe from "npm:stripe";
3import { addCredits } from "../database/queries.tsx";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5

Towniesend-message.ts1 match

@bipin0005โ€ขUpdated 2 days ago
13 finishTrackingUsage,
14 calculatePartialUsageFromInferenceCalls,
15} from "../database/queries.tsx";
16import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool, makeTracesTool } from "../tools/index.ts";
17import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

Towniequeries.tsx1 match

@bipin0005โ€ขUpdated 2 days ago
6const PRICE_MULTIPLIER = 1.5;
7
8// Eventually we'll have a user database,
9// but in the meantime, we can cache user info in memory
10const userIdCache: { [key: string]: any } = {};

Towniepurchase-credits.ts1 match

@bipin0005โ€ขUpdated 2 days ago
1import { Hono } from "npm:hono";
2import Stripe from "npm:stripe";
3import { getUser } from "../database/queries.tsx";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago