-- Fetch all the Databases belonging to the Notion
-- account of a particular user.
SELECT *
FROM fiber.notion_database
WHERE account_id = '{user.notion_id}'
-- Fetch all the Databases belonging to the Notion
-- account of a particular user.
SELECT *
FROM fiber.notion_database
WHERE account_id = '{user.notion_id}'
Code
CREATE TABLE fiber.notion_database (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
)
CREATE TABLE fiber.notion_database (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
)
Model definition