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/$%7BsvgDataUrl%7D?q=database&page=4&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 7464 results for "database"(3617ms)

Glanceraction.api.routes.ts1 match

@lightweightโ€ขUpdated 18 hours ago
12 console.log(data);
13 try {
14 // create a database page in the interactions database
15 const page = await setAction(data);
16 // console.log(page);

huyhieu.cursorrules2 matches

@lanlyโ€ขUpdated 22 hours ago
198```
199โ”œโ”€โ”€ backend/
200โ”‚ โ”œโ”€โ”€ database/
201โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
202โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

huyhieu.cursorrules2 matches

@lanlyโ€ขUpdated 22 hours ago
198```
199โ”œโ”€โ”€ backend/
200โ”‚ โ”œโ”€โ”€ database/
201โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
202โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

reactHonoStarterREADME.md1 match

@lanlyโ€ขUpdated 22 hours ago
21## Further resources
22
23- [React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a bigger example project, with a SQLite database table, queries, client-side CSS, a favicon, and shared code that runs on both client and server.

Shivamain.tsx2 matches

@Shiva_guptaโ€ขUpdated 1 day ago
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();

cerebras_codermain.tsx2 matches

@Shiva_guptaโ€ขUpdated 1 day ago
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();

Sketch_IdeasREADME.md1 match

@tvheesโ€ขUpdated 1 day ago
21## Further resources
22
23- [React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a bigger example project, with a SQLite database table, queries, client-side CSS, a favicon, and shared code that runs on both client and server.

readwise-ingesterREADME.md4 matches

@thesolarmonkโ€ขUpdated 1 day ago
1# Readwise Shortlist Sync Bot
2
3This project syncs your Readwise shortlist articles to a SQLite database for easy access and management.
4
5## Files
27- **Dashboard:** Visit the root URL to see a simple web interface
28- **Sync API:** `POST /sync` - Triggers a sync of your shortlist
29- **Links API:** `GET /links?limit=50` - Retrieves saved links from database
30
31### Standalone Version
35- Set up as a cron job for automatic syncing
36
37## Database Schema
38
39The bot creates a `readwise_links` table with the following fields:
59- `saved_at` - When saved to Readwise
60- `last_moved_at` - When last moved between locations
61- `synced_at` - When synced to our database
62
63## Features

readwise-ingesterreadwise-bot.ts10 matches

@thesolarmonkโ€ขUpdated 1 day ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database setup
4const LINKS_TABLE = 'readwise_links';
5
33}
34
35// Initialize database table
36async function initializeDatabase() {
37 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${LINKS_TABLE} (
38 id TEXT PRIMARY KEY,
105}
106
107// Save documents to database
108async function saveDocumentsToDatabase(documents: ReadwiseDocument[]) {
109 let savedCount = 0;
110 let updatedCount = 0;
188 console.log('Starting Readwise shortlist sync...');
189
190 // Initialize database
191 await initializeDatabase();
192 console.log('Database initialized');
193
194 // Fetch shortlist documents
201 }
202
203 // Save to database
204 const { savedCount, updatedCount } = await saveDocumentsToDatabase(documents);
205
206 const message = `Sync completed: ${savedCount} new documents saved, ${updatedCount} documents updated`;

readwise-ingesterreadwise-http.ts13 matches

@thesolarmonkโ€ขUpdated 1 day ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database setup
4const LINKS_TABLE = 'readwise_links';
5
33}
34
35// Initialize database table
36async function initializeDatabase() {
37 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${LINKS_TABLE} (
38 id TEXT PRIMARY KEY,
105}
106
107// Save documents to database
108async function saveDocumentsToDatabase(documents: ReadwiseDocument[]) {
109 let savedCount = 0;
110 let updatedCount = 0;
183}
184
185// Get saved links from database
186async function getSavedLinks(limit = 50) {
187 const results = await sqlite.execute(`
237 console.log('Starting Readwise shortlist sync...');
238
239 // Initialize database
240 await initializeDatabase();
241 console.log('Database initialized');
242
243 // Fetch shortlist documents
257 }
258
259 // Save to database
260 const { savedCount, updatedCount } = await saveDocumentsToDatabase(documents);
261
262 const message = `Sync completed: ${savedCount} new documents saved, ${updatedCount} documents updated`;
275 } else if (path === '/links' && req.method === 'GET') {
276 // Get saved links
277 await initializeDatabase();
278 const limit = parseInt(url.searchParams.get('limit') || '50');
279 const links = await getSavedLinks(limit);
309 <body>
310 <h1>Readwise Shortlist Sync</h1>
311 <p>Sync your Readwise shortlist articles to the database.</p>
312
313 <button onclick="syncReadwise()">Sync Shortlist</button>

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago