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=20&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 7799 results for "database"(2718ms)

Glancer.cursorrules2 matches

@charmaineโ€ขUpdated 4 days 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

Glancerapi.routes.ts2 matches

@charmaineโ€ขUpdated 4 days ago
3// Import route modules
4import cobrowse from "./cobrowse.api.routes.ts";
5import database from "./database.api.routes.ts";
6import demo from "./demo.api.routes.ts";
7import page from "./page.api.routes.ts";
12
13// mount routes
14app.route("/db", database);
15app.route("/page", page);
16app.route("/cobrowse", cobrowse);

Glanceractions.controller.ts13 matches

@charmaineโ€ขUpdated 4 days ago
7
8export async function getDemoInteractions(pageId: string) {
9 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
10
11 if (!databaseId) {
12 throw new Error(
13 "GLANCE_INTERACTIONS_DB_ID environment variable is not set"
16
17 try {
18 const response = await notion.databases.query({
19 database_id: databaseId,
20 filter: {
21 property: "Glancer demos", // the property in the Glancer interactions database related to the "Glancer demos" database
22 relation: {
23 contains: pageId, // the "Glancer demos" property holds the page id of the "Glancer demo" to which it is related
40
41export async function getAllInteractionsPages() {
42 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
43
44 if (!databaseId) {
45 throw new Error(
46 "GLANCE_INTERACTIONS_DB_ID environment variable is not set"
49
50 try {
51 const response = await notion.databases.query({
52 database_id: databaseId,
53 });
54
70
71export async function getAllInteractionsPagesWithPagination() {
72 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
73
74 if (!databaseId) {
75 throw new Error(
76 "GLANCE_INTERACTIONS_DB_ID environment variable is not set"
84
85 while (hasMore) {
86 const response = await notion.databases.query({
87 database_id: databaseId,
88 start_cursor: startCursor,
89 });

Glanceraction.controller.ts1 match

@charmaineโ€ขUpdated 4 days ago
10 const page = await notion.pages.create({
11 parent: {
12 database_id: Deno.env.get("GLANCE_INTERACTIONS_DB_ID"),
13 },
14 properties: {

Glanceraction.api.routes.ts1 match

@charmaineโ€ขUpdated 4 days 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);

TownieTODOs.md1 match

@fave_24โ€ขUpdated 4 days ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

Towniethink.ts1 match

@fave_24โ€ขUpdated 4 days ago
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),

Towniesystem_prompt.txt2 matches

@fave_24โ€ขUpdated 4 days ago
174```
175โ”œโ”€โ”€ backend/
176โ”‚ โ”œโ”€โ”€ database/
177โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
178โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
234 ```
235
236### Database Patterns
237- Run migrations on startup or comment out for performance
238- Change table names when modifying schemas rather than altering

Towniestripe-webhook.ts1 match

@fave_24โ€ขUpdated 4 days ago
1import { Hono } from "npm:hono";
2import Stripe from "npm:stripe";
3import { addCredits } from "../database/queries.tsx";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5

Towniesend-message.ts1 match

@fave_24โ€ขUpdated 4 days ago
17 insertInferenceCall,
18 startTrackingUsage,
19} from "../database/queries.tsx";
20import {
21 makeChangeValTypeTool,

bookmarksDatabase

@s3thiโ€ขUpdated 4 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 7 months ago