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/$%7Bart_info.art.src%7D?q=database&page=373&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 3893 results for "database"(2154ms)

VALLEREADME.md1 match

@janpaul123•Updated 9 months ago
1# VALL-E
2
3LLM code generation for vals! Make apps with a frontend, backend, and database.
4
5It's a bit of work to get this running, but it's worth it.

sqliteExplorerAppREADME.md1 match

@samwho•Updated 9 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

@johnsmith•Updated 9 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

@willthereader•Updated 9 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

uptimeREADME.md1 match

@pomdtr•Updated 9 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

getValsContextWindowmain.tsx1 match

@janpaul123•Updated 9 months ago
116 {
117 name: "Use Val Town SQLite to store data",
118 prompt: "Write a val that uses an SQLite database",
119 code: `import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
120

sqliteExplorerAppREADME.md1 match

@hunty•Updated 10 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

databaseRunnermain.tsx20 matches

@nicosuave•Updated 10 months ago
6import pg from "npm:pg";
7
8type DatabaseType = "postgres" | "mysql" | "duckdb";
9
10interface QueryRequest {
11 databaseType: DatabaseType;
12 url?: string;
13 query?: string;
33 }
34
35 const { databaseType, url, query, introspect, gzip = false } = requestBody;
36 console.log(`Database type: ${databaseType}`);
37 console.log(`Query: ${query}`);
38 console.log(`Introspect: ${introspect}`);
39 console.log(`Gzip: ${gzip}`);
40
41 if (!databaseType) {
42 console.error("Missing database type");
43 return new Response("databaseType is required", { status: 400 });
44 }
45
49 }
50
51 if (databaseType !== "duckdb" && !url) {
52 console.error("Missing URL for non-DuckDB query");
53 return new Response("URL is required for postgres and mysql", { status: 400 });
57 try {
58 if (introspect) {
59 console.log(`Introspecting ${databaseType} schema`);
60 if (databaseType === "postgres") {
61 results = await introspectPostgresSchema(url!);
62 } else if (databaseType === "mysql") {
63 results = await introspectMysqlSchema(url!);
64 } else {
65 console.error(`Introspection not supported for ${databaseType}`);
66 return new Response(`Introspection not supported for ${databaseType}`, { status: 400 });
67 }
68 } else {
69 console.log(`Executing ${databaseType} query`);
70 if (databaseType === "postgres") {
71 results = await executePostgresQuery(url!, query!);
72 } else if (databaseType === "mysql") {
73 results = await executeMysqlQuery(url!, query!);
74 } else if (databaseType === "duckdb") {
75 console.log("DuckDB is not supported");
76 return new Response("DuckDB is not supported", { status: 400 });
77 } else {
78 console.error(`Invalid database type: ${databaseType}`);
79 return new Response("Invalid databaseType", { status: 400 });
80 }
81 }
118 if (error.code === "ETIMEDOUT") {
119 throw new Error(
120 "Connection to PostgreSQL timed out. Please check your database URL and ensure the database is accessible.",
121 );
122 }

sqliteExplorerAppREADME.md1 match

@rupello•Updated 10 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

@amotivv•Updated 10 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