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/image-url.jpg?q=database&page=369&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 4071 results for "database"(1489ms)

seoKeywordResearchToolmain.tsx1 match

@websrai•Updated 4 months ago
286 const KEY = "seoKeywordResearchTool";
287
288 // Initialize database
289 await sqlite.execute(`
290 CREATE TABLE IF NOT EXISTS ${KEY}_users_${SCHEMA_VERSION} (

sqliteExplorerAppREADME.md1 match

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

parseAmazonOrderEmailmain.tsx1 match

@seflless•Updated 4 months ago
133}
134
135// Database Admin
136// https://libsqlstudio.com/client/s/valtown?p=d7880ed3-ad63-4258-a939-5a375f2c3ed8
137//

stirringLavenderStoatmain.tsx1 match

@wade•Updated 4 months ago
42
43 // Mock exchange rates to USD for testing.
44 // In a real scenario, these would come from an external API or database.
45 const mockRatesToUSD: Record<string, number> = {
46 USD: 1,

sqliteExplorerAppREADME.md1 match

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

sqliteExplorerAppREADME.md1 match

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

getShowcaseValsREADME.md1 match

@stevekrouse•Updated 4 months ago
1Get vals that were created in the last month, augmented with all sorts of AI and screenshots, and shoved in a sqlite database for @stevekrouse/showcase.

GameAwards2024PredictionGamemain.tsx1 match

@bmitchinson•Updated 4 months ago
159 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
160 const KEY = "GameAwards2024PredictionGame";
161 const SCHEMA_VERSION = 2; // Increment to reset database
162
163 await sqlite.execute(`

notionSiteRssmain.tsx22 matches

@bao•Updated 5 months ago
4 // Retrieve Notion API token from environment variable
5 const notionToken = Deno.env.get("NOTION_API_TOKEN");
6 const databaseId = Deno.env.get("NOTION_DATABASE_ID");
7
8 if (!notionToken || !databaseId) {
9 return new Response("Notion API token or database ID not configured", { status: 500 });
10 }
11
13
14 try {
15 // Fetch database metadata
16 const databaseMetadata = await notion.databases.retrieve({
17 database_id: databaseId,
18 });
19
20 // Fetch pages from the database
21 const response = await notion.databases.query({
22 database_id: databaseId,
23 filter: {
24 property: "Published", // Customize based on your database schema
25 checkbox: {
26 equals: true, // Only fetch published pages
29 sorts: [
30 {
31 timestamp: "last_edited_time", // Customize based on your database schema
32 direction: "descending",
33 },
39 const rssXml = generateRSSFeed(
40 response.results,
41 databaseMetadata,
42 );
43
53}
54
55function generateRSSFeed(pages: any[], databaseMetadata: any): string {
56 // Get database title from database metadata
57 const databaseTitle = databaseMetadata.title[0]?.text.content
58 || `RSS Feed from Notion Database ${databaseMetadata.id}`;
59
60 // Get database description from database metadata
61 const databaseDescription = databaseMetadata.description[0]?.text.content
62 || "";
63
69
70 const itemsXml = pages.map(page => {
71 // Extract page metadata. Customize based on your database
72 const title = page.properties.Name?.title[0]?.plain_text || "Untitled";
73 const url = page.public_url;
75 const lastEditedTime = new Date(page.last_edited_time).toUTCString();
76
77 // Extract tags, handling different Notion multi-select tag formats. Customize based on your database
78 const tags = page.properties.Tags?.multi_select?.map(tag => tag.name) || [];
79
93<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
94<channel>
95 <title>${escapeXml(databaseTitle)}</title>
96 <link>https://baolei.org</link>
97 <description>${escapeXml(databaseDescription)}</description>
98 <pubDate>${pubDate}</pubDate>
99 <atom:link href="${import.meta.url}" rel="self" type="application/rss+xml" />

sqliteExplorerAppREADME.md1 match

@mparker•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