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=1&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 3504 results for "database"(770ms)

telegramBotStarterindex.ts1 match

@asdfg•Updated 4 mins ago
262
263/**
264 * Store a message in the database
265 */
266async function storeMessage(userId, userName, text, direction) {

maine-bills-taxsearch.ts1 match

@cmknz•Updated 2 hours ago
7}
8
9// Query the Maine bill database
10export function search(term: string): Promise<SearchResult[]> {
11 return fetchText(getSearchURL(term)).then((res) => {

sqliteExplorerAppREADME.md1 match

@cmknz•Updated 3 hours 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

productpanelindex.ts4 matches

@tijs•Updated 3 hours ago
4 */
5
6// Database exports
7export * from "./db/schema.ts";
8export * from "./db/init.ts";
34export { default as debugClient } from "./test/debug-client.http.ts";
35
36// Initialize database and run migrations on startup
37import { runMigrations } from "./db/migrations.ts";
38
40runMigrations().then(result => {
41 if (result.success) {
42 console.log("Database initialized and migrated successfully");
43 } else {
44 console.error("Database initialization or migration failed:", result.error);
45 }
46});

productpanelqueries.ts3 matches

@tijs•Updated 3 hours 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 3 hours 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 3 hours 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 3 hours 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 3 hours 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 3 hours 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

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago