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/$%7Burl%7D?q=database&page=331&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 4142 results for "database"(1788ms)

visionaryCoffeeMarsupialREADME.md1 match

@geoffreylittโ€ขUpdated 1 month 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

hello-worldindex.http.tsx2 matches

@maxmโ€ขUpdated 1 month ago
9const app = new Hono();
10
11// Initialize database before handling any requests
12app.use('*', async (c, next) => {
13 await db.initializeDatabase();
14 await db.cleanupExpiredData();
15 await next();

hello-worlddb.ts3 matches

@maxmโ€ขUpdated 1 month ago
1import { sqlite } from "https://esm.town/v/std/sqlite";
2
3// Database initialization
4export async function initializeDatabase() {
5 try {
6 // Check schemas of existing tables
39 `);
40 } catch (error) {
41 console.error("Database initialization error:", error);
42 }
43}

stevensgenerateFunFacts.ts2 matches

@geoffreylittโ€ขUpdated 1 month ago
8
9/**
10 * Retrieves previously generated fun facts from the memories database
11 * @returns Array of previous fun facts
12 */
47
48/**
49 * Inserts a fun fact into the memories database
50 * @param date Date for the fun fact in ISO format
51 * @param factText The fun fact text
1import { LoaderFunctionArgs } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
2import { getTopicById, getMessageById, getMessagesByTopicId } from "../backend/database/queries.ts";
3
4export async function loader({ params }: LoaderFunctionArgs) {

reactRouter7ExampleTopic.loader.ts1 match

@stevekrouseโ€ขUpdated 1 month ago
1import { LoaderFunctionArgs } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
2import { getTopicById, getMessagesByTopicId } from "../backend/database/queries.ts";
3
4export async function loader({ params }: LoaderFunctionArgs) {

reactRouter7ExampleSearch.loader.ts1 match

@stevekrouseโ€ขUpdated 1 month ago
1import { LoaderFunctionArgs } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
2import { search } from "../backend/database/queries.ts";
3
4export async function loader({ request }: LoaderFunctionArgs) {

reactRouter7ExampleHome.loader.ts1 match

@stevekrouseโ€ขUpdated 1 month ago
1import { LoaderFunctionArgs } from "https://esm.sh/react-router@7.5.0?deps=react@18.2.0,react-dom@18.2.0";
2import { getAllTopics } from "../backend/database/queries.ts";
3
4export async function loader() {

stevens.cursorrules2 matches

@geoffreylittโ€ขUpdated 1 month ago
208```
209โ”œโ”€โ”€ backend/
210โ”‚ โ”œโ”€โ”€ database/
211โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
212โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
270- Handle API calls properly with proper error catching
271
272### Database Patterns
273- Run migrations on startup or comment out for performance
274- Change table names when modifying schemas rather than altering

stevensgetWeather.ts1 match

@geoffreylittโ€ขUpdated 1 month ago
130 }
131
132 console.log(`Weather forecast updated in the database.`);
133 return summary;
134}

bookmarksDatabase

@s3thiโ€ขUpdated 2 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 5 months ago