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/image-url.jpg?q=database&page=350&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 4198 results for "database"(1106ms)

nextgenddb.ts1 match

@maxmโ€ขUpdated 1 month ago
1async function ddb() {
2 const duckdb = await import("npm:duckdb-async");
3 const db = await duckdb.default.Database.create(":memory:");
4 const conn = await db.connect();
5

cerebras_coderindex2 matches

@webrixoโ€ขUpdated 1 month ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

OpenTownieNormalsystem_prompt.txt2 matches

@dcm31โ€ขUpdated 1 month ago
166```
167โ”œโ”€โ”€ backend/
168โ”‚ โ”œโ”€โ”€ database/
169โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
170โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
228- Handle API calls properly with proper error catching
229
230### Database Patterns
231- Run migrations on startup or comment out for performance
232- Change table names when modifying schemas rather than altering

OpenTownieNormalindex.ts1 match

@dcm31โ€ขUpdated 1 month ago
20export const thinkTool = tool({
21 description:
22 "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.",
23 parameters: z.object({
24 thought: z.string().describe("A thought to think about."),

cerebras_coderindex2 matches

@shubhamvavdiโ€ขUpdated 1 month ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

MiniAppStarterREADME.md1 match

@codybโ€ขUpdated 1 month ago
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

SchoolListingWebsitemain.tsx1 match

@kamorudeenaloโ€ขUpdated 1 month ago
531 const imageUrl = `/blob/${imageKey}`;
532
533 // Insert school into database
534 await sqlite.execute(`
535 INSERT INTO ${KEY}_schools

openTownieMadeThis1README.md1 match

@charmaineโ€ขUpdated 1 month ago
60
61- Add proper authentication
62- Implement a real database for hotel and offer data
63- Use a more robust date picker library
64- Add form validation

sympatheticCoralCricketmain.tsx1 match

@Habibtiโ€ขUpdated 1 month ago
242 };
243
244 // In a real app, this would be a server-side database operation
245 setStories(prev => [storyToSubmit, ...prev]);
246

bedtimeStoriesChatRoommain.tsx1 match

@Precious37โ€ขUpdated 1 month ago
128 `);
129 } catch (error) {
130 console.error("Database initialization error:", error);
131 }
132

bookmarksDatabase

@s3thiโ€ขUpdated 2 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 5 months ago