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=55&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 4038 results for "database"(594ms)

productpanelvaltown-test.ts1 match

@tijs•Updated 6 days ago
109 const feedback = generateRandomFeedback(appId);
110
111 // Insert feedback into database with named parameters
112 // No need to specify ID as it's auto-incremented
113 await sqlite.execute({

productpanelREADME.md1 match

@tijs•Updated 6 days ago
49- All test data can be easily identified by the "[TEST]" prefix
50- The cleanup function removes only data with the test prefix
51- Test data is entirely contained within Val Town's SQLite database
52

productpanelsetup.http.ts1 match

@tijs•Updated 6 days ago
74 <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
75 <p class="text-yellow-700">
76 <strong>Note:</strong> These actions directly affect the database. Use with caution.
77 </p>
78 </div>

productpanelrun-test.js4 matches

@tijs•Updated 6 days ago
5import { runMigrations } from "../db/migrations.ts";
6
7// Step 1: Initialize the database
8console.log("Initializing database...");
9const migrationResult = await runMigrations();
10if (!migrationResult.success) {
11 console.error("Database migration failed:", migrationResult.error);
12 Deno.exit(1);
13}
14console.log("Database initialized successfully");
15
16// Step 2: Create test data

productpanelinit-db.ts7 matches

@tijs•Updated 6 days ago
1/**
2 * Initialize the database and create a test app
3 * Run this script to set up the initial database for local testing
4 */
5
6import { initializeDatabase } from "../db/init.ts";
7import { createApp } from "../db/queries.ts";
8import { generateApiKey } from "../utils/apiKey.ts";
9
10async function main() {
11 console.log("Initializing database...");
12 const initResult = await initializeDatabase();
13
14 if (!initResult.success) {
15 console.error("Failed to initialize database:", initResult.error);
16 return;
17 }
18
19 console.log("Database initialized successfully");
20
21 // Create a test app

productpanelgetApps.http.ts1 match

@tijs•Updated 6 days ago
25
26 try {
27 // Get all apps from the database
28 const apps = await getAllApps();
29

productpaneldeleteApp.http.ts1 match

@tijs•Updated 6 days ago
44 }
45
46 // Delete the app from the database
47 const deleted = await deleteApp(appId);
48

productpanelcreateApp.http.ts1 match

@tijs•Updated 6 days ago
39 const apiKey = generateApiKey();
40
41 // Create the app in the database
42 const app = await createApp({
43 name: validation.data.name!,

productpanelsubmitFeedback.http.ts1 match

@tijs•Updated 6 days ago
50
51 /**
52 * Create the feedback in the database with the following fields:
53 *
54 * Basic fields:

productpanelmigrations.ts2 matches

@tijs•Updated 6 days ago
1/**
2 * Database migrations for productpanel
3 * Handles schema updates and migrations
4 */
63
64/**
65 * Check if a table exists in the database
66 */
67async function checkTableExists(tableName: string): Promise<boolean> {

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago