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/$%7Bsuccess?q=database&page=228&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 7086 results for "database"(1671ms)

Towniesystem_prompt.txt2 matches

@maxmโ€ขUpdated 2 weeks ago
192```
193โ”œโ”€โ”€ backend/
194โ”‚ โ”œโ”€โ”€ database/
195โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
196โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
252 ```
253
254### Database Patterns
255- Run migrations on startup or comment out for performance
256- Change table names when modifying schemas rather than altering

Towniesend-message.ts1 match

@maxmโ€ขUpdated 2 weeks ago
10 overLimit,
11 startTrackingUsage,
12} from "../database/queries.tsx";
13import {
14 getTextEditorTool,

Towniequeries.tsx1 match

@maxmโ€ขUpdated 2 weeks ago
4import { INFERENCE_CALLS_TABLE, USAGE_TABLE } from "./schema.tsx";
5
6// Eventually we'll have a user database,
7// but in the meantime, we can cache user info in memory
8const userIdCache: { [key: string]: any } = {};

Townie.cursorrules2 matches

@maxmโ€ขUpdated 2 weeks 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

TastkItauth.ts1 match

@diegoivoโ€ขUpdated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { create, decode, verify } from "https://deno.land/x/djwt@v2.8/mod.ts";
3import { createUser, getUserByUsername, getUserByEmail, verifyPassword } from "../database/queries.ts";
4import { formatApiResponse } from "../../shared/utils.ts";
5import { CreateUserInput, LoginInput, User } from "../../shared/types.ts";

BookClubVoterindex.ts9 matches

@td0034โ€ขUpdated 2 weeks ago
15app.use("*", cors());
16
17// Database setup
18const BOOKS_TABLE = "book_club_books";
19const VOTES_TABLE = "book_club_votes";
20
21async function setupDatabase() {
22 // Create books table
23 await sqlite.execute(`
44}
45
46// Run database setup
47// Make sure database is set up before handling requests
48let dbInitialized = false;
49setupDatabase()
50 .then(() => {
51 dbInitialized = true;
52 console.log("Database initialized successfully");
53 })
54 .catch(error => {
55 console.error("Database initialization failed:", error);
56 throw error; // Re-throw to see the error in logs
57 });
58
59// Middleware to check if database is initialized
60app.use("*", async (c, next) => {
61 if (!dbInitialized && !c.req.path.includes("frontend/")) {
62 return c.json({ error: "Database is initializing, please try again in a moment" }, 503);
63 }
64 return await next();

Property_ListingREADME.md1 match

@oolufolabiiโ€ขUpdated 2 weeks ago
6
7- `index.ts` - Main entry point for the API
8- `/database` - Database schema and queries
9- `/routes` - API routes for properties and admin functionality
10

Property_Listingadmin.ts1 match

@oolufolabiiโ€ขUpdated 2 weeks ago
7 deletePropertyImage,
8 verifyAdminCredentials
9} from "../database/queries.ts";
10import { ApiResponse, PropertyFormData } from "../../shared/types.ts";
11import { blob } from "https://esm.town/v/std/blob";

Property_Listingproperties.ts1 match

@oolufolabiiโ€ขUpdated 2 weeks ago
7 getPropertiesWithImages,
8 getPropertyWithImages
9} from "../database/queries.ts";
10import { ApiResponse, Property, PropertyWithImages } from "../../shared/types.ts";
11

Property_ListingREADME.md2 matches

@oolufolabiiโ€ขUpdated 2 weeks ago
14
15- `/backend` - API and server-side code
16 - `/database` - Database schema and queries
17 - `/routes` - API endpoints
18- `/frontend` - Client-side code and assets
31- Hono (Backend API)
32- React (Frontend)
33- SQLite (Database)
34- TailwindCSS (Styling)

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago