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/$2?q=database&page=684&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 7122 results for "database"(898ms)

duckDBmain.tsx2 matches

@adjacent•Updated 8 months ago
1import { Database } from "https://esm.sh/duckdb-async";
2
3export default async function server(request: Request): Promise<Response> {
10
11 try {
12 const db = await Database.create(':memory:');
13 await db.all('LOAD httpfs');
14 const result = await db.all(`SELECT * FROM '${dataUrl}' LIMIT 5`);

sqliteAdminDashboardmain.tsx1 match

@stevekrouse•Updated 8 months ago
1// This val creates a SQLite dashboard admin panel with a sidebar for table names
2// It uses React for the frontend and the Val Town SQLite API for database operations
3// Now includes functionality to edit rows, using rowid or all columns as identifiers
4// and the ability to add new rows to tables

eventsymain.tsx14 matches

@yawnxyz•Updated 9 months ago
1/**
2 * The Eventsy class represents a system for logging and managing events. It utilizes Dobby for database operations and provides methods for logging events, retrieving events by type, performing full-text searches, and more. This class is designed to be flexible and adaptable to various event logging needs.
3 */
4
11 private dobby: Dobby;
12 private namespace: string;
13 private databaseName: string;
14 private indexes: { name: string; columns: string[] }[];
15 private ftsIndexes: { name: string; columns: string[] }[];
20 * @param {Object} options - The options for initializing the Eventsy instance.
21 * @param {string} options.namespace - The namespace for the events.
22 * @param {string} options.databaseName - The name of the database.
23 * @param {{ name: string; columns: string[] }[]} options.indexes - The indexes for the database.
24 * @param {{ name: string; columns: string[] }[]} options.ftsIndexes - The full-text search indexes for the database.
25 */
26 constructor({
27 namespace,
28 databaseName,
29 indexes = [],
30 ftsIndexes = []
31 }: {
32 namespace: string;
33 databaseName: string;
34 indexes?: { name: string; columns: string[] }[];
35 ftsIndexes?: { name: string; columns: string[] }[];
36 }) {
37 this.namespace = namespace;
38 this.databaseName = databaseName;
39 this.indexes = indexes;
40 this.ftsIndexes = ftsIndexes;
42 // Initialize Dobby with the necessary tables, indexes, and FTS indexes
43 this.dobby = new Dobby(
44 databaseName,
45 [
46 { name: 'id', type: 'INTEGER', primaryKey: true },
60 );
61
62 // Initialize the database and create indexes
63 this.initializeDatabase();
64 }
65
66 /**
67 * Initializes the database and creates indexes.
68 */
69 private async initializeDatabase() {
70 await this.dobby.createDatabase();
71 // Additional setup if needed
72 }

eventsyREADME.md1 match

@yawnxyz•Updated 9 months ago
1The Eventsy class represents a system for logging and managing events. It utilizes Dobby for database operations and provides methods for logging events, retrieving events by type, performing full-text searches, and more. This class is designed to be flexible and adaptable to various event logging needs.
2
3Migrated from folder: Libraries/eventsy/eventsy

getAllNotionDbRowsREADME.md2 matches

@apppeak•Updated 9 months 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

getAllNotionDbRowsmain.tsx4 matches

@apppeak•Updated 9 months ago
1export const getAllNotionDbRows = async (databaseId, notionAccessToken) => {
2 if (!databaseId) {
3 console.error("No Database ID Provided");
4 return null;
5 }
12 return await axios({
13 method: "POST",
14 url: `https://api.notion.com/v1/databases/${databaseId}/query`,
15 headers: {
16 Authorization: `Bearer ${notionAccessToken}`,

nationalPeachPeacockmain.tsx4 matches

@apppeak•Updated 9 months ago
3import dayjs from "npm:dayjs";
4
5const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
7
13
14export default async function(interval: Interval) {
15 const response = await notion.databases.query({
16 database_id: DATABASE_ID,
17 filter: {
18 and: [
40
41 const nextItem = {
42 parent: { database_id: DATABASE_ID },
43 properties: {
44 ...item.properties,

wetGrayQueleamain.tsx4 matches

@apppeak•Updated 9 months ago
3import dayjs from "npm:dayjs";
4
5const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
7
13
14export default async function(interval: Interval) {
15 const response = await notion.databases.query({
16 database_id: DATABASE_ID,
17 filter: {
18 and: [
40
41 const nextItem = {
42 parent: { database_id: DATABASE_ID },
43 properties: {
44 ...item.properties,

dailyPeachSalmonmain.tsx4 matches

@apppeak•Updated 9 months ago
3import dayjs from "npm:dayjs";
4
5const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
7
13
14export default async function(interval: Interval) {
15 const response = await notion.databases.query({
16 database_id: DATABASE_ID,
17 filter: {
18 and: [
40
41 const nextItem = {
42 parent: { database_id: DATABASE_ID },
43 properties: {
44 ...item.properties,

notionRecurringTasksmain.tsx4 matches

@apppeak•Updated 9 months ago
3import dayjs from "npm:dayjs";
4
5const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
7
13
14export default async function(interval: Interval) {
15 const response = await notion.databases.query({
16 database_id: DATABASE_ID,
17 filter: {
18 and: [
40
41 const nextItem = {
42 parent: { database_id: DATABASE_ID },
43 properties: {
44 ...item.properties,

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago