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/$%7Bsuccess?q=database&page=3&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 7053 results for "database"(1279ms)

sqliteExplorerAppREADME.md1 match

@cricks_unmixed4uโ€ขUpdated 3 hours 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

lotusReflectionsGetUsermain.tsx6 matches

@aidanlotusโ€ขUpdated 4 hours ago
5// - NOTION_KEY: Your Notion API Key
6// - OPENAI_KEY: Your OpenAI API Key
7// - NOTION_USERS_DATABASE_ID: The Database ID for your "Reflection Users" database
8// - NOTION_DATABASE_ID: The Database ID for your "Reflections" database (submissions)
9
10// Helper function to get environment variables
84
85 const NOTION_KEY = getEnv("NOTION_KEY") as string;
86 const NOTION_USERS_DB_ID = getEnv("NOTION_USERS_DATABASE_ID") as string;
87 const NOTION_REFLECTIONS_DB_ID = getEnv("NOTION_DATABASE_ID") as string;
88 const OPENAI_KEY = getEnv("OPENAI_KEY") as string;
89
103 };
104
105 const userSearchResponse = await fetch(`https://api.notion.com/v1/databases/${NOTION_USERS_DB_ID}/query`, {
106 method: "POST",
107 headers: {
142
143 const reflectionSearchResponse = await fetch(
144 `https://api.notion.com/v1/databases/${NOTION_REFLECTIONS_DB_ID}/query`,
145 {
146 method: "POST",

lotusReflectionsmain.tsx7 matches

@aidanlotusโ€ขUpdated 4 hours ago
6// - OPENAI_KEY: Your OpenAI API Key
7// - NOTION_KEY: Your Notion API Key
8// - NOTION_DATABASE_ID: The Database ID for your "Reflections" database (submissions)
9// - NOTION_USERS_DATABASE_ID: The Database ID for your "Reflection Users" database
10// - INTERCOM_KEY: Your Intercom Access Token
11// - INTERCOM_TAG_ID_REFLECTION_USER: (Optional) The ID of an Intercom tag (e.g., "reflectionFirstSubmit").
462 console.log("Main Submission Handler: Managing Notion User and saving Reflection for:", userNumberFromForm);
463 const NOTION_KEY = getEnv("NOTION_KEY") as string;
464 const NOTION_REFLECTIONS_DB_ID = getEnv("NOTION_DATABASE_ID") as string;
465 const NOTION_USERS_DB_ID = getEnv("NOTION_USERS_DATABASE_ID") as string;
466 let notionUserPageId: string | null = null;
467
475 };
476 console.log("Main Submission Handler: Notion User Query Payload:", JSON.stringify(userQueryPayload, null, 2));
477 const userSearchResponse = await fetch(`https://api.notion.com/v1/databases/${NOTION_USERS_DB_ID}/query`, {
478 method: "POST",
479 headers: {
536 },
537 body: JSON.stringify({
538 parent: { database_id: NOTION_USERS_DB_ID },
539 properties: newUserProperties,
540 }),
599 "Notion-Version": "2022-06-28",
600 },
601 body: JSON.stringify({ parent: { database_id: NOTION_REFLECTIONS_DB_ID }, properties: reflectionPageProperties }),
602 });
603

thirdTimerval-town.mdc2 matches

@nbbaierโ€ขUpdated 5 hours ago
179```
180โ”œโ”€โ”€ backend/
181โ”‚ โ”œโ”€โ”€ database/
182โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
183โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
239 ```
240
241### Database Patterns
242- Run migrations on startup or comment out for performance
243- Change table names when modifying schemas rather than altering

ReactHonoStarterTestsREADME.md1 match

@wolfโ€ขUpdated 5 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.

simulationcontacts.http.ts4 matches

@lukatmyshuโ€ขUpdated 6 hours ago
11const TABLE_NAME = 'contacts_v1';
12
13// Database schema setup
14async function initializeDatabase() {
15 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
16 id INTEGER PRIMARY KEY AUTOINCREMENT,
28}
29
30// Initialize database on startup
31await initializeDatabase();
32
33// Types

Glancerdemo.ts2 matches

@lightweightโ€ขUpdated 6 hours ago
7import { examplePDF } from "../../api/servePDF.ts";
8import { getPage } from "../../../controllers/getPage.ts";
9import { getRelatedPagesFromDatabase } from "../../../controllers/getRelatedPagesFromDatabase.ts";
10
11const app = new Hono();
34
35 // get related Glancer content
36 const relatedPages = await getRelatedPagesFromDatabase(
37 "20689f51c34980259a77c140ead05eb4", // TODO: add content db id to env vars
38 id

Glancerdemo.ts1 match

@lightweightโ€ขUpdated 6 hours ago
1import { Hono } from "npm:hono";
2import { getPage } from "../../controllers/getPage.ts";
3import { getDatabase } from "../../controllers/getDatabase.ts";
4
5const app = new Hono();

Glancerapi.ts2 matches

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

GlancergetRelatedPagesFromDatabase.ts6 matches

@lightweightโ€ขUpdated 6 hours ago
6});
7
8export async function getRelatedPagesFromDatabase(
9 databaseId: string, // the Glancer content database
10 pageId: string // the /demo page
11) {
12 // get database
13 try {
14 const response = await notion.databases.query({
15 database_id: databaseId,
16 filter: {
17 property: "Glancer demos", // the property in the Glancer content database that connects to the /demo
18 relation: {
19 contains: pageId, // the Glancer demos property holds the /demo page id to which it is related

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago