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/$%7Bart_info.art.src%7D?q=database&page=308&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 3961 results for "database"(1475ms)

stevensDemo.cursorrules2 matches

@geoffreylittโ€ขUpdated 3 weeks 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

cerebras_coderindex2 matches

@kamilhussen24โ€ขUpdated 3 weeks 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> {

hn_notifierutils.ts2 matches

@nbbaierโ€ขUpdated 3 weeks ago
71
72/**
73 * Creates a database item from Hacker News API response data
74 * @param id - The ID of the Hacker News item
75 * @param data - The Hacker News API response data
76 * @returns A promise that resolves to a formatted database item
77 */
78export async function createDBItem(

cerebras_coderindex2 matches

@smirfolioโ€ขUpdated 3 weeks 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> {
SecureSend

SecureSendmain.tsx2 matches

@maxmโ€ขUpdated 3 weeks ago
4const table_prefix = "efs";
5
6// Initialize database schema
7async function initDB() {
8 await sqlite.batch([
763// Main handler
764export default async function(req: Request): Promise<Response> {
765 // Initialize the database
766 await initDB();
767

onboarding_drafttutorial.ts5 matches

@charmaineโ€ขUpdated 3 weeks ago
101 instructions: `
102 <p><b>1.</b> Create <code>sqliteStorage.ts</code> with this code:</p>
103 <p>This creates a SQLite database to store your todos permanently!</p>
104 `,
105 code: `import { sqlite } from "https://esm.town/v/std/sqlite";
113
114await sqlite.execute(TABLE_SCHEMA);
115console.log("Database table 'todos' checked/created.");
116
117// Type definition for todo items from database
118interface Todo {
119 id: number;
164 title: "Step 4b: Update Web App",
165 instructions: `
166 <p><b>Task:</b> Now let's update <code>todo.ts</code> to use the database!</p>
167 <p>Replace the <b>entire content</b> of <code>todo.ts</code> with this code:</p>
168 `,
280 <ul>
281 <li>Web App: <code>todo.ts</code></li>
282 <li>Database: <code>sqliteStorage.ts</code></li>
283 <li>Email: <code>emailReminder.ts</code></li>
284 </ul>

hn_notifierqueries.ts5 matches

@nbbaierโ€ขUpdated 3 weeks ago
1import { tableName } from "https://esm.town/v/nbbaier/hn_notifier/backend/database/migrations.ts";
2import type { DBItem } from "https://esm.town/v/nbbaier/hn_notifier/shared/types.ts";
3import sqliteRowsToObject from "https://esm.town/v/nbbaier/sqliteRowsToObject?v=6";
5
6/**
7 * Follows a Hacker News item by inserting it into the database
8 * @param {DBItem} item - The item to follow containing id and comments
9 * @returns {Promise<DBItem[]>} The inserted item
19
20/**
21 * Unfollows a Hacker News item by deleting it from the database
22 * @param {number} id - The ID of the item to unfollow
23 * @returns {Promise<void>}
31
32/**
33 * Retrieves a single item from the database by ID
34 * @param {number} id - The ID of the item to retrieve
35 * @returns {Promise<DBItem[]>} The matching item(s)
44
45/**
46 * Retrieves all items from the database
47 * @returns {Promise<DBItem[]>} Array of all items
48 */

hn_notifierapi.ts1 match

@nbbaierโ€ขUpdated 3 weeks ago
1import { HTTPException } from "https://esm.sh/hono@4.7.4/http-exception";
2import * as db from "https://esm.town/v/nbbaier/hn_notifier/backend/database/queries.ts";
3import {
4 createDBItem,

hn_notifierindex.ts1 match

@nbbaierโ€ขUpdated 3 weeks ago
1import api from "https://esm.town/v/nbbaier/hn_notifier/backend/api.ts";
2import { createTables } from "https://esm.town/v/nbbaier/hn_notifier/backend/database/migrations.ts";
3import {
4 readFile,

stevensgetCalendarEvents.ts1 match

@geoffreylittโ€ขUpdated 3 weeks ago
125 }
126
127 console.log(`Calendar events imported into the database.`);
128 return events;
129 } catch (error) {

bookmarksDatabase

@s3thiโ€ขUpdated 2 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 5 months ago