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=386&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 3891 results for "database"(929ms)

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 });

getAllNotionDbRowsREADME.md2 matches

@supersayan•Updated 1 year ago
1## Get All Rows of a Database in Notion
2
3Reference: [Query a Database](https://developers.notion.com/reference/post-database-query)
4
5How to get an access token: https://developers.notion.com/reference/create-a-token

dateMeNotionDatabaseREADME.md1 match

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

migrateREADME.md3 matches

@neverstew•Updated 1 year ago
1# Val Town Migrations
2
3By calling this val, you can easily handle migrations in your Val Town Turso Database.
4
5## Getting started
7
81. Make sure you have your Val Town API Token saved in your secrets. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.
91. Make sure you've [set up your turso database](https://www.val.town/v/std.turso)
101. **[👆Fork this val](https://www.val.town/v/neverstew.migration)**
11
12## How it works
13Each time the val is run, a new migration will be created and tracked in your database in the `migrations` table.
14
15There will be one migration per val, per version.

readMediumPostsREADME.md1 match

@patrick_kw_chiu•Updated 1 year ago
1### Demo of `mongo-http` NPM package
2
3- Great for **serverless** apps that can **only use HTTP** or **have a hard time persisting database connection**
4- See more at [the Git Repo](https://github.com/patrick-kw-chiu/mongo-http.js) and the [Medium tutorial](https://betterprogramming.pub/introducing-mongo-http-js-5ae2d74f2155)!
5- What this demo does: *Read the latest Chinese Medium posts with categories "javascript" or "typescript"*

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

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago