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=2&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 7397 results for "database"(1839ms)

townie-126send-message.ts1 match

@dinavinter•Updated 4 hours ago
13 finishTrackingUsage,
14 calculatePartialUsageFromInferenceCalls,
15} from "../database/queries.tsx";
16import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool, makeTracesTool } from "../tools/index.ts";
17import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

townie-126queries.tsx1 match

@dinavinter•Updated 4 hours ago
6const PRICE_MULTIPLIER = 1.5;
7
8// Eventually we'll have a user database,
9// but in the meantime, we can cache user info in memory
10const userIdCache: { [key: string]: any } = {};

townie-126purchase-credits.ts1 match

@dinavinter•Updated 4 hours ago
1import { Hono } from "npm:hono";
2import Stripe from "npm:stripe";
3import { getUser } from "../database/queries.tsx";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5

townie-126.cursorrules2 matches

@dinavinter•Updated 4 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

townie-126credit-balance.ts1 match

@dinavinter•Updated 4 hours ago
1import { Hono } from "npm:hono";
2import { getUser, getCreditBalance } from "../database/queries.tsx";
3
4const app = new Hono();

townie-126BRANCH-TODO.md5 matches

@dinavinter•Updated 4 hours ago
14**Goal**: Replace limit checking with credit checking
15
16**Database Changes:**
17
18* Added credit\_additions table with indexes for performance
21
22
23**New Functions in /backend/database/queries.tsx:**
24
25* getCreditBalance(userId) - calculates balance with 50% markup on usage
145--------------------------
146
147**Database Schema:**
148
149Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML` credit_additions ( id, user_id, created_at, stripe_payment_intent_id, amount, note ) -- Indexes on user_id for both credit_additions and townie_usage `
169**Backend:**
170
171* backend/database/schema.tsx - Added credit\_additions table
172
173* backend/database/queries.tsx - New credit functions, removed old limits
174
175* backend/routes/send-message.ts - Updated to use credit checking

talentflowmain.tsx1 match

@legal•Updated 6 hours ago
670}
671function renderSettingsView() {
672 views.settings.innerHTML = \`<h1>Settings</h1><div class="card"><h3>Manage Local Data</h3><p>Candidate profiles and analyses are stored in your browser's local storage for this demo. In a real-world application, this would be a secure, cloud-based database.</p><p><strong>Warning: This action is irreversible.</strong></p><button class="button button-danger" data-action="clear-local-storage">Clear All Demo Data</button></div>\`;
673}
674})();

Towniesend-message.ts1 match

@valdottown•Updated 7 hours ago
13 finishTrackingUsage,
14 calculatePartialUsageFromInferenceCalls,
15} from "../database/queries.tsx";
16import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool, makeTracesTool } from "../tools/index.ts";
17import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

GlancerservePDF.ts1 match

@lightweight•Updated 7 hours ago
8
9 // get each of the actions from this demo from Notion
10 // data is stored in the "Glancer interactions" database and attached to the demo via relation
11 // we can't really use the relation property b/c that only holds an array of page IDs in Notion
12 // so, in Notion, we use a formula to transform the relation array into a string

Recruitmain.tsx1 match

@svc•Updated 7 hours ago
11Example Categories & Tasks:
12- "Contact & Basic Info": "Extract the candidate's full name, email, and phone number.", "Identify the candidate's location (city, state).", "Find links to their portfolio, LinkedIn, or GitHub profiles."
13- "Skill & Experience Analysis": "Extract all technical skills listed and categorize them (e.g., programming languages, frameworks, databases).", "Summarize the last two job positions held by the candidate.", "List all educational institutions, degrees, and graduation dates."
14- "Screening & Matching": "Check for the presence of specific keywords relevant to the job description (user must provide keywords).", "Flag any potential red flags, such as employment gaps or unclear timelines."
15

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago