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.

1.8 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n        SELECT\n            c.\"id\" as \"chat_id\",\n            m.id as \"message_id\",\n            c.\"userId\" as \"user_id\",\n            m.\"createdAt\" as \"created_at\",\n            m.\"updatedAt\" as \"updated_at\"\n        FROM\n            \"ChatMessage\" m\n        JOIN\n            \"Chat\" c on c.\"id\" = m.\"chatId\"\n        WHERE\n            m.\"chatId\" = ANY($1)\n            AND (\n                $3::bool IS NULL\n                OR ($3 AND c.\"deletedAt\" IS NOT NULL)\n                OR (NOT $3 AND c.\"deletedAt\" IS NULL)\n            )\n            AND ($4::timestamptz IS NULL OR m.\"updatedAt\" >= $4)\n            AND ($5::timestamptz IS NULL OR m.\"updatedAt\" < $5)\n            AND (\n                $6::timestamptz IS NULL\n                OR (m.\"updatedAt\", m.id) > ($6, $7::text)\n            )\n        ORDER BY m.\"updatedAt\" ASC, m.id ASC\n        LIMIT $2\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "chat_id",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "message_id",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "user_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "created_at",
        "type_info": "Timestamp"
      },
      {
        "ordinal": 4,
        "name": "updated_at",
        "type_info": "Timestamp"
      }
    ],
    "parameters": {
      "Left": [
        "TextArray",
        "Int8",
        "Bool",
        "Timestamptz",
        "Timestamptz",
        "Timestamptz",
        "Text"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false
    ]
  },
  "hash": "cfc7c8a549dffd94c8d201c665e84c110d780e5be92b5e160c64189355f5f31f"
}