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=280&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 2825 results for "database"(352ms)

sqliteExplorerAppREADME.md1 match

@shouser•Updated 2 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

trackESMContentmain.tsx3 matches

@maxm•Updated 3 months ago
15}
16
17async function initializeDatabase() {
18 await sqlite.execute(`
19 CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
27
28export default async function(interval: Interval) {
29 await initializeDatabase();
30
31 for (const url of URLS) {
65
66export async function getAllVersions() {
67 await initializeDatabase();
68 const versions = await sqlite.execute(`SELECT * FROM ${TABLE_NAME} ORDER BY timestamp DESC`);
69 console.log(versions, TABLE_NAME);

passkeys_demomain.tsx1 match

@maxm•Updated 3 months ago
33}
34console.log("huh?");
35// DATABASE
36const kv = new DenoSyntheticKV("passkeys_example");
37

sqlitemain.tsx2 matches

@tmcw•Updated 3 months ago
5/**
6 * Every Val Town account comes with its own private
7 * [SQLite database](https://www.sqlite.org/) that
8 * is accessible from any of your vals.
9 * ([Docs ↗](https://docs.val.town/std/sqlite))
115
116// adapted from
117// https://github.com/tursodatabase/libsql-client-ts/blob/17dd996b840c950dd22b871adfe4ba0eb4a5ead3/packages/libsql-client/src/sqlite3.ts#L314C1-L337C2
118function rowFromSql(
119 sqlRow: Array<unknown>,

getDuckDBREADME.md2 matches

@maxm•Updated 3 months ago
1# Get a DuckDB database
2
3This method sets up a [duckdb-wasm](https://github.com/duckdb/duckdb-wasm) database that you can then use to store and retrieve data.

notion2wallabagREADME.md1 match

@stevekrouse•Updated 3 months ago
1# Notion2Wallabag
2
3Intended to be run with Notion's webhooks. When fired, tries to save a Notion database item with a "Link" property to a Wallabag instance.
4
5Cannot be re-used for other workspaces, since it requires various Wallabag secrets and a Notion-specific token. Feel free to fork!

yc_findermain.tsx3 matches

@stevekrouse•Updated 5 months ago
40 <li>We extract email domains from your user list</li>
41 <li>
42 We match these domains against our database of YC companies (sourced{" "}
43 <a href="https://docs.google.com/spreadsheets/d/181GQmXflgMCCI9awLbzK4Zf0uneQBKoh51wBjNTc8Us/edit?gid=0#gid=0">
44 here
45 </a>
46 , cached <a href="https://www.val.town/v/stevekrouse/yc_database">here</a>)
47 </li>
48 <li>You get a detailed report of matches, enriched with YC company data</li>
226
227export default async function server(request: Request): Promise<Response> {
228 const companies = await fetch("https://stevekrouse-yc_database.web.val.run").then(res => res.json());
229 const url = new URL(request.url);
230 if (url.pathname === "/companies.json") {

iframeGridInfinitemain.tsx11 matches

@maxm•Updated 7 months ago
1/**
2 * This val creates an infinite grid of iframes with thick draggable borders.
3 * It includes a welcome modal, fixes the drag state issue, and stores iframe URLs in a database.
4 */
5
65 const [showModal, setShowModal] = useState(true);
66 const [iframes, setIframes] = useState([]);
67 const [urlDatabase, setUrlDatabase] = useState({});
68 const [isLoading, setIsLoading] = useState(false);
69 const gridRef = useRef(null);
86 useEffect(() => {
87 updateIframes();
88 }, [position, windowSize, urlDatabase]);
89
90 useEffect(() => {
91 loadUrlDatabase();
92 }, []);
93
131 left,
132 top,
133 url: urlDatabase[key] || '',
134 });
135 }
150 });
151 if (!response.ok) throw new Error('Failed to submit URL');
152 const updatedDatabase = await response.json();
153 setUrlDatabase(updatedDatabase);
154 } catch (error) {
155 console.error('Error submitting URL:', error);
160 };
161
162 const loadUrlDatabase = async () => {
163 try {
164 const response = await fetch('/api/load-urls');
165 if (!response.ok) throw new Error('Failed to load URLs');
166 const loadedUrls = await response.json();
167 setUrlDatabase(loadedUrls);
168 } catch (error) {
169 console.error('Error loading URLs:', error);
229
230 const result = await sqlite.execute(`SELECT * FROM ${KEY}_urls`);
231 const updatedDatabase = Object.fromEntries(result.rows.map(row => [row.key, row.url]));
232
233 return new Response(JSON.stringify(updatedDatabase), {
234 headers: { 'Content-Type': 'application/json' },
235 });

niceTodoListmain.tsx1 match

@maxm•Updated 8 months ago
43 }
44
45 // Fetch todos from the database
46 const todos = await sqlite.execute(`SELECT * FROM ${KEY}_todos_${SCHEMA_VERSION} ORDER BY id DESC`);
47

sqliteREADME.md2 matches

@maxm•Updated 8 months ago
1# SQLite - [Docs ↗](https://docs.val.town/std/sqlite)
2
3[SQLite](https://www.sqlite.org/) is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals via [`std/sqlite`](https://www.val.town/v/std/sqlite).
4
5Val Town SQLite is powered by [Turso](https://turso.tech/).
9* [ORMs](https://docs.val.town/std/sqlite/orms)
10
11You may find these admin viewers helpful managing your database:
12
13* [SQLite Explorer](https://www.val.town/v/nbbaier/sqliteExplorerApp) (built in Val Town)