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=289&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 2913 results for "database"(269ms)

getDateMeDatabasemain.tsx4 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { notionGetDatabase } from "https://esm.town/v/stevekrouse/notionGetDatabase";
3
4export let getDateMeDatabase = () =>
5 notionGetDatabase({
6 databaseId: "725cb1d741674413b933a37a50f1961f",
7 auth: process.env.notion,
8 });

notionDateMeDocsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { parseNotionDateDoc } from "https://esm.town/v/stevekrouse/parseNotionDateDoc";
2import { logError } from "https://esm.town/v/stevekrouse/logError";
3import { getDateMeDatabase } from "https://esm.town/v/stevekrouse/getDateMeDatabase";
4
5export const notionDateMeDocs = (await getDateMeDatabase())
6 .map((d) =>
7 logError(() =>

untitled_NwQdD9zCmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { databaseVal } from "https://esm.town/v/stevekrouse/databaseVal";
2
3export const untitled_NwQdD9zC = databaseVal.push({ hello: "world" });

notionGetDatabasemain.tsx4 matches

@stevekrouse•Updated 1 year ago
1export const notionGetDatabase = async ({ databaseId, auth, filter }: {
2 databaseId: string;
3 auth: string;
4 filter?: any;
8 );
9 const notion = new Client({ auth });
10 return collectPaginatedAPI(notion.databases.query, {
11 database_id: databaseId,
12 filter,
13 });

dateMeNotionDatabaseREADME.md1 match

@stevekrouse•Updated 1 year ago
1Migrated from folder: Archive/dateMeNotionDatabase

tursoREADME.md2 matches

@std•Updated 1 year ago
7[Turso](https://turso.tech/) is a serverless SQLite platform designed for the edge. It runs [libSQL](https://github.com/libsql/libsql), their open contribution fork of SQLite.
8
9Every Val Town user automatically gets their own Turso SQLite database! It's great for >100kb data (ie bigger than a val) or when you need SQL: relations, ACID transactions, etc.
10
11Storage used in Turso will count against your Val Town total storage (10mb for free users; 1gb for Pro users). Contact us if you'd need more – it should be no problem!
35## Architecture
36
37This @std.turso function is the client or SDK to @std.tursoAPI, which acts as a "proxy" to Turso. It handles authentication, creates databases, and forwards on your SQL queries. You can get lower latency (~200ms vs ~800ms), more storage, databases, CLI & API access by having your own Turso account.
38
39Migrated from folder: turso/turso

blogRSSREADME.md1 match

@stevekrouse•Updated 1 year ago
14
15* This is very inefficient. It refetches and re-parses blog.val.town on every single request, modulo some caching via the headers. It would be much more efficient to cache the results of fetching and parsing the Val Town blog, and then only re-fetch it every 10 minutes or so.
16* Instead of fetching and parsing HTML from super.so, we could get this same data from Notion's API, with a val like @stevekrouse.notionGetDatabase.
17
18Migrated from folder: Archive/blogRSS

datascriptExampleREADME.md1 match

@tmcw•Updated 1 year ago
1# datascript example
2
3An example using tonsky’s [datascript](https://github.com/tonsky/datascript) module, which implements a datalog-style database in JavaScript. The module itself is really written in ClojureScript, but they've helpfully produced an npm-compatible module for us to use. [Datalog](https://en.wikipedia.org/wiki/Datalog) languages are fascinating, and have some real-world use in Roam Research and Logseq.

getDuckDBREADME.md2 matches

@tmcw•Updated 1 year 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.

nanoidExampleREADME.md1 match

@tmcw•Updated 1 year ago
5- They're shorter, with a more customizable alphabet.
6- They use more different characters by default.
7- Unlike UUIDs, there aren't custom types for nanoids in databases
8- Nanoids never contain information. UUIDs sometimes do: some UUIDs contain timestamps and MAC addresses.
9

yc_database

@stevekrouse•Updated 5 months ago

dateMeNotionDatabase2 file matches

@stevekrouse•Updated 1 year ago