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/$%7Bsuccess?q=database&page=177&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 5108 results for "database"(1428ms)

pondiverseaddCreation3 matches

@iliazeus•Updated 3 weeks ago
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3
4import { TABLE_NAME } from "./database";
5
6export default async function(req: Request): Promise<Response> {
50 }
51
52 // Now it's time to upload things to database and blob storage
53 // First, add to database, and get the ID
54 const id = await sqlite.execute(
55 `INSERT INTO ${TABLE_NAME} (title, data, type, time) VALUES ($title, $data, $type, CURRENT_TIMESTAMP)`,

pondiversedatabase0 matches

@iliazeus•Updated 3 weeks ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3export const TABLE_NAME = "pondiverse_creations_v4";
4
5async function dropTable() {

pondiversemain1 match

@iliazeus•Updated 3 weeks ago
24 return fetchCreations(req);
25
26 if (req.method == "POST" && url.pathname == "/updateDatabase")
27 return updateTable(req);
28

pondiverseupdateTable1 match

@iliazeus•Updated 3 weeks ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2import { updateTable } from "./database";
3
4export default async function(req: Request): Promise<Response> {

pondiversegetCreation1 match

@iliazeus•Updated 3 weeks ago
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3
4import { TABLE_NAME } from "./database";
5
6export default async function(req: Request): Promise<Response> {

pondiversefetchCreations1 match

@iliazeus•Updated 3 weeks ago
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3
4import { TABLE_NAME } from "./database";
5
6export default async function(req: Request): Promise<Response> {

sqlitemain.tsx2 matches

@Adeel11•Updated 3 weeks 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))
118
119// adapted from
120// https://github.com/tursodatabase/libsql-client-ts/blob/17dd996b840c950dd22b871adfe4ba0eb4a5ead3/packages/libsql-client/src/sqlite3.ts#L314C1-L337C2
121function rowFromSql(
122 sqlRow: Array<unknown>,

Cluttymain.tsx1 match

@ericomartin•Updated 3 weeks ago
372 const url = new URL(request.url);
373
374 // Initialize database tables
375 await sqlite.execute(`
376 CREATE TABLE IF NOT EXISTS ${KEY}_items_${SCHEMA_VERSION} (

AREADME.md1 match

@dimdimablock•Updated 3 weeks ago
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

sqliteExplorerAppREADME.md1 match

@alexmnps•Updated 3 weeks 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 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago