Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

2.9 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                un.user_id as owner_id,\n                un.notification_id,\n                n.event_item_id,\n                n.event_item_type,\n                un.sent,\n                un.done,\n                un.created_at::timestamptz as \"created_at!\",\n                un.seen_at::timestamptz as viewed_at,\n                un.created_at::timestamptz as \"updated_at!\",\n                un.deleted_at::timestamptz,\n                n.metadata as \"notification_metadata: serde_json::Value\",\n                n.notification_event_type as notification_event_type,\n                n.sender_id as sender_id\n            FROM user_notification un\n            JOIN notification n ON n.id = un.notification_id\n            WHERE un.user_id = $1\n            AND n.event_item_id = ANY($2)\n            AND un.deleted_at IS NULL\n            AND un.done = false\n            AND (($4::timestamptz IS NULL)\n                OR (un.created_at, un.notification_id) < ($4, $5))\n            ORDER BY un.created_at DESC, un.notification_id DESC\n            LIMIT $3\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "owner_id",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "notification_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "event_item_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "event_item_type",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "sent",
        "type_info": "Bool"
      },
      {
        "ordinal": 5,
        "name": "done",
        "type_info": "Bool"
      },
      {
        "ordinal": 6,
        "name": "created_at!",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "viewed_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 8,
        "name": "updated_at!",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "deleted_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 10,
        "name": "notification_metadata: serde_json::Value",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 11,
        "name": "notification_event_type",
        "type_info": "Varchar"
      },
      {
        "ordinal": 12,
        "name": "sender_id",
        "type_info": "Text"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "TextArray",
        "Int8",
        "Timestamptz",
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      null,
      null,
      null,
      null,
      false,
      false,
      true
    ]
  },
  "hash": "317f05707fdc73269f3017a3bb96d55b7327338bf5e52dfaad106b4b492cbb8e"
}