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*/
411private dobby: Dobby;
12private namespace: string;
13private databaseName: string;
14private indexes: { name: string; columns: string[] }[];
15private 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*/
26constructor({
27namespace,
28databaseName,
29indexes = [],
30ftsIndexes = []
31}: {
32namespace: string;
33databaseName: string;
34indexes?: { name: string; columns: string[] }[];
35ftsIndexes?: { name: string; columns: string[] }[];
36}) {
37this.namespace = namespace;
38this.databaseName = databaseName;
39this.indexes = indexes;
40this.ftsIndexes = ftsIndexes;
42// Initialize Dobby with the necessary tables, indexes, and FTS indexes
43this.dobby = new Dobby(
44databaseName,
45[
46{ name: 'id', type: 'INTEGER', primaryKey: true },
60);
6162// Initialize the database and create indexes
63this.initializeDatabase();
64}
6566/**
67* Initializes the database and creates indexes.
68*/
69private async initializeDatabase() {
70await this.dobby.createDatabase();
71// Additional setup if needed
72}
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.
23Migrated from folder: Libraries/eventsy/eventsy
getAllNotionDbRowsREADME.md2 matches
1## Get All Rows of a Database in Notion
23Reference: [Query a Database](https://developers.notion.com/reference/post-database-query)
45How to get an access token: https://developers.notion.com/reference/create-a-token
getAllNotionDbRowsmain.tsx4 matches
1export const getAllNotionDbRows = async (databaseId, notionAccessToken) => {
2if (!databaseId) {
3console.error("No Database ID Provided");
4return null;
5}
12return await axios({
13method: "POST",
14url: `https://api.notion.com/v1/databases/${databaseId}/query`,
15headers: {
16Authorization: `Bearer ${notionAccessToken}`,
nationalPeachPeacockmain.tsx4 matches
3import dayjs from "npm:dayjs";
45const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
71314export default async function(interval: Interval) {
15const response = await notion.databases.query({
16database_id: DATABASE_ID,
17filter: {
18and: [
4041const nextItem = {
42parent: { database_id: DATABASE_ID },
43properties: {
44...item.properties,
wetGrayQueleamain.tsx4 matches
3import dayjs from "npm:dayjs";
45const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
71314export default async function(interval: Interval) {
15const response = await notion.databases.query({
16database_id: DATABASE_ID,
17filter: {
18and: [
4041const nextItem = {
42parent: { database_id: DATABASE_ID },
43properties: {
44...item.properties,
dailyPeachSalmonmain.tsx4 matches
3import dayjs from "npm:dayjs";
45const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
71314export default async function(interval: Interval) {
15const response = await notion.databases.query({
16database_id: DATABASE_ID,
17filter: {
18and: [
4041const nextItem = {
42parent: { database_id: DATABASE_ID },
43properties: {
44...item.properties,
notionRecurringTasksmain.tsx4 matches
3import dayjs from "npm:dayjs";
45const DATABASE_ID = "519446a0d3ed47038fffd669b9ece770";
6const notion = new Client({ auth: process.env.NOTION_API_KEY });
71314export default async function(interval: Interval) {
15const response = await notion.databases.query({
16database_id: DATABASE_ID,
17filter: {
18and: [
4041const nextItem = {
42parent: { database_id: DATABASE_ID },
43properties: {
44...item.properties,
lucia_honomain.tsx2 matches
10import { eq } from "npm:drizzle-orm";
11import { drizzle } from "npm:drizzle-orm/libsql";
12import { LibSQLDatabase } from "npm:drizzle-orm/libsql";
13import { integer, sqliteTable, text } from "npm:drizzle-orm/sqlite-core";
14import { Uuid25 } from "npm:uuid25";
6667export const schema = { users };
68export type DB = LibSQLDatabase<typeof schema>;
69}
70
sqliteExplorerAppREADME.md1 match
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