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=333&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 3427 results for "database"(799ms)

example_articleREADME.md2 matches

@pomdtr•Updated 1 year ago
1# Searching valtown via sql, jq, jo
2
3In a recent discussion, a useful command line pipeline was shared for querying a database and processing the results. The original command looked like this:
4
5```bash
7```
8
9This command effectively queries a database for records matching certain criteria and processes the results. However, there are several ways this pipeline can be improved for efficiency and clarity.
10
11## Recommendations for Improvement

dateme_sqlitemain.tsx1 match

@stevekrouse•Updated 1 year ago
34}
35
36export async function setupDatabase() {
37 await createTable();
38 const docs = await fetchJSON(thisWebURL());

purpleOctopusREADME.md3 matches

@stevekrouse•Updated 1 year ago
5## Architecture
6
7This version of the site still uses Notion to store the data and [NoteForms](https://noteforms.com) for the form to get your submission into Notion. I intend to cut Notion out of the equation shortly by building our own HTML form that writes data directly to my sqlite database.
8
9* This val is the router for the application
10* @stevekrouse/getDocs pulls the date me docs from my sqlite database.
11* @stevekrouse/dateme_notion_sync syncs my data from Notion to my sqlite database every 10 minutes
12
13## Todos

sqliteExplorerAppREADME.md1 match

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

dateme_notion_syncmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
2import { parseNotionDateDoc } from "https://esm.town/v/stevekrouse/date_me_doc_helpers";
3import { dateMeNotionDatabase } from "https://esm.town/v/stevekrouse/dateMeNotionDatabase";
4
5function jsonifyDoc(doc) {
28 await sqlite.execute("delete from DateMeDocs");
29
30 const docs = (await dateMeNotionDatabase)
31 .map(parseNotionDateDoc)
32 .map(jsonifyDoc)

blogSqliteUniversePart2README.md1 match

@postpostscript•Updated 1 year ago
130but those will have to come later!
131
132Another necessary feature for querying against larger databases will be to use the WHERE or JOIN conditions when dumping from them, but this will be more complicated
133
134---

videoStorageREADME.md1 match

@mux•Updated 1 year ago
14
15## Others
16* `getAllVideos` Lists all the videos in the database
17* `backfillVideo` Takes a video object and puts it in the DB. Useful if you're iterating over to...you guessed it, backfill content.
18

blogSqliteUniverseREADME.md3 matches

@postpostscript•Updated 1 year ago
64### SQLite in Wasm
65
66There is a [deno package (sqlite)](https://deno.land/x/sqlite@v3.8) which lets you (among other things) create SQLite databases in-memory using WebAssembly. I've created a Val which wraps this to enable it to be a drop-in replacement for @std/sqlite: [@postpostscript/sqliteWasm](https://val.town/v/postpostscript/sqliteWasm)
67
68#### Example
123
124 - Serving a subset of your private data publicly for others to query (Example: [@postpostscript/sqlitePublic](https://val.town/v/postpostscript/sqlitePublic))
125 - Backing up your database and querying against that backup (via @postpostscript/sqliteBackup's [sqliteFromBlob](https://postpostscript-modulehighlightvaluelink.web.val.run/?module=@postpostscript/sqliteBackup&name=sqliteFromBlob) and [sqliteToBlob](https://postpostscript-modulehighlightvaluelink.web.val.run/?module=@postpostscript/sqliteBackup&name=sqliteToBlob))
126
127But we can do more..! What if we could query from multiple of these data sources.. at the same time! 😱
150The following patterns are accessible through `import { patterns } from "https://esm.town/v/postpostscript/sqliteUniverse"`:
151
152- `patterns.blob` - `/^blob:\/\//` (`blob://backup:sqlite:1709960402936`) - import the database from **private** blob `backup:sqlite:1709960402936`
153
154### Overriding Default Options

magentaDogmain.tsx1 match

@Negash•Updated 1 year ago
4function incrementNumber() {
5 currentNumber += 1;
6 // Here, you would ideally persist the current number to a database or file for long-term storage.
7 return currentNumber;
8}

whiteXerinaeREADME.md1 match

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