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=345&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 4024 results for "database"(1515ms)

social_dataindex.ts2 matches

@charmaine•Updated 2 months ago
5import ValTown from "npm:@valtown/sdk";
6import SocialData from "../sdk/index.ts";
7import { setupDatabase, USAGE_TABLE } from "./database.ts";
8import { searchTwitterRoute } from "./routes/search.ts";
9
14
15// Uncomment this if you're forking this project:
16// await setupDatabase()
17
18// https://socialdata.gitbook.io/docs/pricing

social_datadatabase.ts1 match

@charmaine•Updated 2 months ago
3export const USAGE_TABLE = "socialDataProxy_usage_2";
4
5export async function setupDatabase() {
6 await sqlite.execute(`
7 CREATE TABLE IF NOT EXISTS ${USAGE_TABLE} (

cerebras_coderindex2 matches

@jazib•Updated 2 months ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

social_datadatabase.ts1 match

@stevekrouse•Updated 2 months ago
3export const USAGE_TABLE = "socialDataProxy_usage_2";
4
5export async function setupDatabase() {
6 await sqlite.execute(`
7 CREATE TABLE IF NOT EXISTS ${USAGE_TABLE} (

cerebras_coderindex2 matches

@admariner•Updated 2 months ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

backupSQLiteDB_cronmain.tsx8 matches

@AIWB•Updated 2 months ago
1# Database Backup Cron Script
2
3This cron script is designed to automatically backup specific database tables using the `backupSQLiteDB` function. It groups tables and stores them as blobs for easy retrieval and management.
4
5## Overview
6
7The script imports a `backupDatabase` function from an external module and uses it to perform regular backups of specified database tables. It's set up as a cron job to run at scheduled intervals, ensuring your database is consistently backed up.
8
9## Main Function: handleBackup
11The `handleBackup` function is the core of this script. It takes the following parameters:
12
13- `DATABASE_PREFIX` (string): The prefix used for the database tables.
14- `DATABASE_TABLES` (string[]): An array of table names to be backed up.
15- `DATABASE_SUFFIX` (string, optional): A suffix to be added to the database names.
16
17## Imported Function
18
19The script relies on the `backupDatabase` function imported from:
20
21```typescript
22import backupDatabase from "https://esm.town/v/AIWB/backupSQLiteDB";

backupSQLiteDB_cronREADME.md8 matches

@AIWB•Updated 2 months ago
1# Database Backup Cron Script
2
3This cron script is designed to automatically backup specific database tables using the `backupSQLiteDB` function. It groups tables and stores them as blobs for easy retrieval and management.
4
5## Overview
6
7The script imports a `backupDatabase` function from an external module and uses it to perform regular backups of specified database tables. It's set up as a cron job to run at scheduled intervals, ensuring your database is consistently backed up.
8
9## Main Function: handleBackup
11The `handleBackup` function is the core of this script. It takes the following parameters:
12
13- `DATABASE_PREFIX` (string): The prefix used for the database tables.
14- `DATABASE_TABLES` (string[]): An array of table names to be backed up.
15- `DATABASE_SUFFIX` (string, optional): A suffix to be added to the database names.
16
17## Imported Function
18
19The script relies on the `backupDatabase` function imported from:
20
21```typescript
22import backupDatabase from "https://esm.town/v/AIWB/backupSQLiteDB";

cerebras_coderindex2 matches

@notapro•Updated 2 months ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

cabinAdjacentTweetsmain.tsx1 match

@jonbo•Updated 2 months ago
5const SOCIAL_DATA_API_KEY = Deno.env.get("SOCIAL_DATA_API_KEY") || "";
6
7// Initialize SQLite database
8await sqlite.execute(`
9 CREATE TABLE IF NOT EXISTS cabinAdjacentTweets (

knowledgeableBlueMartenmain.tsx1 match

@Alcial•Updated 2 months ago
4import Chart from "https://esm.sh/chart.js/auto?deps=react@18.2.0,react-dom@18.2.0";
5
6// Comprehensive College Database (remains the same)
7const COLLEGES = [
8 // Top Tier IITs

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago