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=43&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 3920 results for "database"(852ms)

productpanelqueries.ts3 matches

@tijs•Updated 2 days ago
1/**
2 * Database query functions for productpanel
3 * Provides typed functions for database operations
4 */
5
36
37/**
38 * Create a new app in the database
39 */
40export async function createApp(app: Omit<App, 'id' | 'created_at'>): Promise<App> {

productpanelfix-apps.http.ts3 matches

@tijs•Updated 2 days ago
1/**
2 * Fix Apps Data Structure
3 * Repairs any apps with incorrect data structure in the database
4 */
5
122 };
123
124 // Update the app in the database
125 await sqlite.execute({
126 sql: `UPDATE apps SET
222 };
223
224 // Update the feedback in the database
225 await sqlite.execute({
226 sql: `UPDATE feedback SET

productpanelvaltown-test.ts1 match

@tijs•Updated 2 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 2 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 2 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 2 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 2 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 2 days ago
25
26 try {
27 // Get all apps from the database
28 const apps = await getAllApps();
29

productpaneldeleteApp.http.ts1 match

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

productpanelcreateApp.http.ts1 match

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

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago