-- Fetch all the Categories belonging to the Square
-- account of a particular user.
SELECT *
FROM fiber.square_category
WHERE account_id = '{user.square_id}'
-- Fetch all the Categories belonging to the Square
-- account of a particular user.
SELECT *
FROM fiber.square_category
WHERE account_id = '{user.square_id}'
Code
CREATE TABLE fiber.square_category (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
type TEXT,
id TEXT,
updated_at TEXT,
version DOUBLE PRECISION,
is_deleted BOOLEAN,
present_at_all_locations BOOLEAN,
category_data JSONB
)
CREATE TABLE fiber.square_category (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
type TEXT,
id TEXT,
updated_at TEXT,
version DOUBLE PRECISION,
is_deleted BOOLEAN,
present_at_all_locations BOOLEAN,
category_data JSONB
)
Model definition