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=310&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 3430 results for "database"(759ms)

sqliteExplorerAppREADME.md1 match

@lecoto•Updated 5 months 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

modernSalesCRMmain.tsx1 match

@shrirudragoud•Updated 5 months ago
213 const timeoutId = setTimeout(() => {
214 controller.abort();
215 throw new Error('Database operation timed out');
216 }, 5000);
217

uptimeREADME.md1 match

@omerco•Updated 5 months ago
1# Uptime Checker & Status Page
2
3This is a free, hackable uptime/downtime monitor that sends you an email when the site doesn't return a 200. It also stores historical uptime and latency data in your Val Town SQLite, which is used to power a status page. It supports multiple URLs in the same database and status page.
4
5## Installation

sqlite_adminREADME.md1 match

@izuchukwu•Updated 5 months ago
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.
8
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).

memorySampleSummarymain.tsx1 match

@toowired•Updated 5 months ago
8const openai = new OpenAI();
9
10// Initialize the database
11async function initDB() {
12 await sqlite.execute(`

sqlitemain.tsx2 matches

@toowired•Updated 5 months ago
5/**
6 * Every Val Town account comes with its own private
7 * [SQLite database](https://www.sqlite.org/) that
8 * is accessible from any of your vals.
9 * ([Docs ↗](https://docs.val.town/std/sqlite))
115
116// adapted from
117// https://github.com/tursodatabase/libsql-client-ts/blob/17dd996b840c950dd22b871adfe4ba0eb4a5ead3/packages/libsql-client/src/sqlite3.ts#L314C1-L337C2
118function rowFromSql(
119 sqlRow: Array<unknown>,
1
2 export default function handler(req) {
3 return new Response(`"\n <!DOCTYPE html>\n <html>\n <head>\n <title>Claude Chat Conversation</title>\n <meta charset=\"UTF-8\">\n <style>\n body {\n font-family: system-ui, -apple-system, sans-serif;\n line-height: 1.5;\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n background: #f9fafb;\n }\n .message {\n margin: 20px 0;\n padding: 15px;\n border-radius: 8px;\n }\n .human {\n background: #e5e7eb;\n }\n .assistant {\n background: #dbeafe;\n }\n .role {\n font-weight: bold;\n margin-bottom: 8px;\n }\n </style>\n </head>\n <body>\n \n <div class=\"message human\">\n <div class=\"role\">Human</div>\n <div class=\"content\">This is an engineering proposal. Convert that into a tech talk about 10 minutes long</div>\n </div>\n \n <div class=\"message assistant\">\n <div class=\"role\">Claude</div>\n <div class=\"content\">Tech Talk: Optimizing Data Storage with Symbol TablesClick to open document\nThis tech talk covers the key aspects of your data optimization project in a format suitable for a 10-minute presentation. Would you like me to adjust any specific section or add more technical details to any part?</div>\n </div>\n \n <div class=\"message human\">\n <div class=\"role\">Human</div>\n <div class=\"content\">Write the script for it</div>\n </div>\n \n <div class=\"message assistant\">\n <div class=\"role\">Claude</div>\n <div class=\"content\">Tech Talk Script: Optimizing Data Storage with Symbol TablesClick to open document\nThis script should take about 10 minutes to deliver at a comfortable speaking pace. It maintains technical depth while remaining accessible and includes natural transitions between sections. Would you like me to adjust any particular section or add more technical details anywhere?\nKey features of the script:\n\nConversational tone while maintaining technical accuracy\nClear narrative arc from problem to solution to results\nTechnical details balanced with practical implications\nSpecific examples and metrics to support key points\nNatural breaking points for slides/demos if needed</div>\n </div>\n \n <div class=\"message human\">\n <div class=\"role\">Human</div>\n <div class=\"content\">Draw a mermaid diagram to show data flows in a decision flow</div>\n </div>\n \n <div class=\"message assistant\">\n <div class=\"role\">Claude</div>\n <div class=\"content\">I'll create a Mermaid diagram showing how data flows through the system, including the new symbol table optimization.\nDecision Flow System ArchitectureClick to open diagram\nThe diagram shows the complete flow of data through our system:\n\nClient sends input data to Router\nRouter directs request to Runner\nRunner:\n\nExecutes the decision flow\nCollects node results\nApplies symbol table deduplication\n\n\nDecision message sent via EventBridge\nArchiver:\n\nProcesses the message\nStores data across three tables:\n\nSymbol Table (new)\nDecision Table\nData Table\n\n\n\n\nExporter retrieves data via Decision History API\n\nThe color coding helps distinguish:\n\nPink: Services\nBlue: Databases\nYellow: Message bus\n\nWould you like me to modify any part of the diagram or add more detail to any specific component?</div>\n </div>\n \n <div class=\"message human\">\n <div class=\"role\">Human</div>\n <div class=\"content\">I meant in the decision flow, as the data flow through the nodes, how it accumulates node results</div>\n </div>\n \n <div class=\"message assistant\">\n <div class=\"role\">Claude</div>\n <div class=\"content\">Ah, I'll create a Mermaid diagram showing how data flows through nodes in a decision flow and how node results accumulate, both in the original format and with symbol table optimization.\nDecision Flow Node Results AccumulationClick to open diagram\nThis diagram contrasts the two approaches:\n\nOriginal Storage (top):\n\nEach node stores complete copies of all data\nData accumulates and duplicates as it flows through nodes\nNode 3 ends up storing three copies of the same values\n\n\nSymbol Table Storage (bottom):\n\nUnique key-value pairs stored once in symbol table\nNodes only store indexes to the symbol table\nNo data duplication\nEasy to reconstruct full state at any node using indexes\n\n\n\nColor coding:\n\nPink: Flow nodes\nLight blue: Original node results\nYellow: Symbol table entries\nBlue: Node result indexes\n\nThe optimization becomes more apparent as data flows through the nodes - while the original storage duplicates values at each step, the symbol table approach maintains a single copy of each unique value and uses lightweight indexes to reference them.\nWould you like me to adjust any part of the diagram or add more detail to better illustrate the data flow?</div>\n </div>\n \n <div class=\"message human\">\n <div class=\"role\">Human</div>\n <div class=\"content\">It will be with a technical member on the team, please come prepared to talk through a technical project that you've worked on previously. Be ready to walk through the specific pieces of the project you owned, the architecture of the system, and the impact of the decisions made. You should be prepared to describe the project for at least ~20 minutes, going into significant technical detail about key components, also feel free to prepare diagrams and slides if that will help you describe the project.</div>\n </div>\n \n <div class=\"message assistant\">\n <div class=\"role\">Claude</div>\n <div class=\"content\">I'll help you prepare for a technical deep dive interview by creating a comprehensive walkthrough of PEP 186 based on the document. Let's structure this with both a narrative outline and supporting diagrams.\nSystem ArchitectureClick to open diagram\nNode Result CompressionClick to open diagram\nHere's the technical deep dive outline for a 20-minute discussion:\n\nProject Overview (2 minutes)\n\nProblem: Rapidly growing Aurora storage costs\nGoals: 80% data reduction, 50% cost reduction for key customers\nPerformance constraints: <5ms latency impact\nKey customer impact: Isaac, Branch, and Zilch use cases\n\n\nTechnical Analysis (3 minutes)\n\nRoot cause: Data duplication in node results\nInitial compression analysis showing ~20.6% with basic approach\nTheoretical limits study using lz4 compression\nDecision to use symbol tables based on append-only nature of data\n\n\nCore Technical Solution (5 minutes)\n\nSymbolTableV2 class design:\npythonCopyclass SymbolTableV2(BaseModel):\n version: t.Literal[\"v2\"]\n tbl: list[orjson.Fragment] = []\n tix: list[SymbolTableRef] = []\n\nKey optimizations:\n\nKey-value pair deduplication vs value-only\nIndex-based references vs 64-bit hashes\nZSTD compression for serialized data\n\n\nStorage schema decisions and rationale for separate table\n\n\nSystem Architecture (4 minutes)\n\nPipeline components:\n\nRunner: Symbol table creation and compression\nEventBridge: Message transport\nArchiver: Persistence and version handling\nExporter: Decision history API integration\n\n\nDatabase schema evolution\nBackward compatibility handling\n\n\nEdge Cases & Challenges (3 minutes)\n\nAsync resumptions and out-of-order messages\nFlow of flows and nested decision handling\nLoop handling\nProvenance data preservation\nVersion compatibility during rollout\n\n\nResults & Impact (3 minutes)\n\nCompression improvement: 20.6% → 86%\nMessage size reduction: 65KB → 25KB\nCost impact for key customers\nPerformance metrics showing <5ms latency impact\nStorage growth rate flattening\n\n\n\nKey technical points to emphasize:\n\nWhy we chose a separate symbol table vs using the existing data table\nTrade-offs in moving deduplication upstream to Runner\nCompression algorithm selection and performance implications\nSchema design decisions and indexing strategy\nBackward compatibility approach\n\nQuestions to be prepared for:\n\nWhy not use database-level compression (TOAST)?\nAlternative approaches considered\nScalability implications\nRecovery and error handling\nPerformance monitoring and alerts\nFuture optimization opportunities\n\nWould you like me to expand on any of these sections or create additional diagrams to illustrate specific components?</div>\n </div>\n \n </body>\n </html>\n"`, {
4 headers: {
5 "Content-Type": "text/html",

sqliteExplorerAppREADME.md1 match

@thesolarmonk•Updated 5 months 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

sqlite_adminREADME.md1 match

@bons•Updated 5 months ago
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.
8
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).

sqliteExplorerAppREADME.md1 match

@tay•Updated 5 months 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

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago