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%20%22Optional%20title%22?q=database&page=371&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 4145 results for "database"(1092ms)

Windsurfcontextmanager1 match

@toowired•Updated 3 months ago
1import { DB } from "https://esm.town/v/@std/sqlite";
2
3// Initialize SQLite database
4const db = new DB();
5db.execute(`

Windsurfprojectcontext1 match

@toowired•Updated 3 months ago
494 const KEY = new URL(import.meta.url).pathname.split("/").at(-1);
495
496 // Initialize database
497 await sqlite.execute(`
498 CREATE TABLE IF NOT EXISTS ${KEY}_project_state_${SCHEMA_VERSION} (

prolificPinkGullcount.ts1 match

@chris_st•Updated 3 months ago
7export const countPath = (app) => {
8 app.get('/count', async (c) => {
9 const connectionString = Deno.env.get('DATABASE_URL')
10 const supabaseUrl = Deno.env.get('SUPABASE_URL')
11 const supabaseKey = Deno.env.get('SUPABASE_ANON_KEY')

trackESMContentmain.tsx3 matches

@shouser•Updated 3 months ago
15}
16
17async function initializeDatabase() {
18 await sqlite.execute(`
19 CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
27
28export default async function(interval: Interval) {
29 await initializeDatabase();
30
31 for (const url of URLS) {
65
66export async function getAllVersions() {
67 await initializeDatabase();
68 const versions = await sqlite.execute(`SELECT * FROM ${TABLE_NAME} ORDER BY timestamp DESC`);
69 console.log(versions, TABLE_NAME);

memorySampleSummarymain.tsx1 match

@AIWB•Updated 3 months ago
8const openai = new OpenAI();
9
10// Initialize the database
11async function initDB() {
12 await sqlite.execute(`

aiMessengermain.tsx2 matches

@tesla6940•Updated 3 months ago
459 `);
460 } catch (error) {
461 console.error("Database initialization error:", error);
462 return new Response("Database error", { status: 500 });
463 }
464

selfassuredCoralPigmain.tsx2 matches

@tesla6940•Updated 3 months ago
443 `);
444 } catch (error) {
445 console.error("Database initialization error:", error);
446 return new Response("Database error", { status: 500 });
447 }
448

prolificPinkGulltest.ts1 match

@chris_st•Updated 3 months ago
1import { createClient } from "jsr:@supabase/supabase-js@2";
2
3const connectionString = Deno.env.get('DATABASE_URL')
4const supabaseUrl = Deno.env.get('SUPABASE_URL')
5const supabaseKey = Deno.env.get('SUPABASE_ANON_KEY')

prolificPinkGullREADME.md1 match

@chris_st•Updated 3 months ago
1### Example project with Supabase
2
3This is an example ValTown project that uses Supabase both as a database and an authorization service.

sqliteExplorerAppREADME.md1 match

@shouser•Updated 3 months ago
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago