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/?q=database&page=244&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 10131 results for "database"(4738ms)

stevensDemoindex.ts1 match

@asim13juneโ€ขUpdated 2 months ago
6import { Hono } from "npm:hono";
7import { type Memory } from "../shared/types.ts";
8import { createMemory, deleteMemory, getAllMemories, updateMemory } from "./database/queries.ts";
9
10const app = new Hono();

stevensDemohandleTelegramMessage.ts1 match

@asim13juneโ€ขUpdated 2 months ago
34
35/**
36 * Store a chat message in the database
37 */
38export async function storeChatMessage(

stevensDemogetWeather.ts1 match

@asim13juneโ€ขUpdated 2 months ago
130 }
131
132 console.log(`Weather forecast updated in the database.`);
133 return summary;
134}

stevensDemogetCalendarEvents.ts1 match

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

stevensDemogenerateFunFacts.ts2 matches

@asim13juneโ€ขUpdated 2 months ago
8
9/**
10 * Retrieves previously generated fun facts from the memories database
11 * @returns Array of previous fun facts
12 */
47
48/**
49 * Inserts a fun fact into the memories database
50 * @param date Date for the fun fact in ISO format
51 * @param factText The fun fact text

stevensDemo.cursorrules2 matches

@asim13juneโ€ขUpdated 2 months 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

personalShopperindex.ts3 matches

@bgschillerโ€ขUpdated 2 months ago
25 updateUserLocation,
26 updateUserTokens,
27} from "./database/krogerQueries.ts";
28import { runMigrations } from "./database/migrations.ts";
29// import { KrogerAuthService } from "./services/krogerAuth.ts";
30import { MockKrogerAuthService } from "./services/fakeKrogerAuth.ts";
34const app = new Hono();
35
36// Initialize database on startup
37await runMigrations();
38

reactHonoStarterREADME.md1 match

@anup_d911โ€ขUpdated 2 months 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.

SocialArchetypeQuizindex.ts6 matches

@mccailsโ€ขUpdated 2 months ago
802import { email } from "https://esm.town/v/std/email";
803
804// Database setup
805const TABLE_NAME = 'archetype_quiz_results_v1';
806
807async function initDatabase() {
808 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
809 id INTEGER PRIMARY KEY AUTOINCREMENT,
818
819async function saveQuizResult(userEmail: string, calculatedArchetype: string, chosenArchetype: string, scores: any, answers: any) {
820 await initDatabase();
821 await sqlite.execute(
822 `INSERT INTO ${TABLE_NAME} (email, calculated_archetype, chosen_archetype, scores, answers) VALUES (?, ?, ?, ?, ?)`,
826
827async function getQuizResults(limit = 50, offset = 0) {
828 await initDatabase();
829 try {
830 const results = await sqlite.execute(
849
850async function getQuizStats() {
851 await initDatabase();
852
853 try {
1015 const { email, calculatedArchetype, chosenArchetype, scores, answers } = await req.json();
1016
1017 // Save to database
1018 await saveQuizResult(email, calculatedArchetype, chosenArchetype, scores, answers);
1019

SocialArchetypeQuizREADME.md3 matches

@mccailsโ€ขUpdated 2 months ago
9- **Confetti Animations**: Celebratory confetti on every button click
10- **Iridescent Design**: Purple, blue, and pink gradient theme with glassmorphism effects
11- **Backend Storage**: SQLite database stores quiz results and user choices
12- **User Choice**: Users can choose their preferred archetype after seeing results
13- **Mobile Responsive**: Works perfectly on all device sizes
91- Timestamp of completion
92
93Database table: `archetype_quiz_results_v1`
94
95## ๐Ÿ›  Technical Stack
99- **Animations**: Canvas Confetti library
100- **Icons**: Font Awesome 6.4.0
101- **Backend**: Val Town SQLite database
102- **Platform**: Val Town serverless
103

customer-database-setup2 file matches

@stevenvapiโ€ขUpdated 2 months ago

prDatabase

@pdwโ€ขUpdated 2 months ago