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.0 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "WITH candidate AS (\n            SELECT s.link_id,s.folder_id,s.provider_id FROM email_address_book_sources s JOIN email_links l ON l.id = s.link_id\n            WHERE l.is_sync_active AND l.provider = 'OUTLOOK' AND s.deleted_at IS NULL AND s.photo_due_at <= now()\n                AND (s.photo_lease_until IS NULL OR s.photo_lease_until < now())\n            ORDER BY s.photo_due_at,s.link_id,s.folder_id,s.provider_id LIMIT 1 FOR UPDATE OF s SKIP LOCKED\n        ) UPDATE email_address_book_sources s SET photo_lease_id = $1,photo_lease_until = now() + interval '3 minutes'\n        FROM candidate c,email_links l WHERE s.link_id = c.link_id AND s.folder_id = c.folder_id AND s.provider_id = c.provider_id AND l.id = s.link_id\n        RETURNING s.link_id,s.folder_id,s.provider_id,s.revision,s.photo_hash,s.photo_url,l.sync_generation,l.grant_generation\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "link_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "folder_id",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "provider_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "revision",
        "type_info": "Int8"
      },
      {
        "ordinal": 4,
        "name": "photo_hash",
        "type_info": "Text"
      },
      {
        "ordinal": 5,
        "name": "photo_url",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "sync_generation",
        "type_info": "Int8"
      },
      {
        "ordinal": 7,
        "name": "grant_generation",
        "type_info": "Int8"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      true,
      true,
      false,
      false
    ]
  },
  "hash": "bbb849bcd6bead14b34cb4fbaf16db721c5865f2a6288390e8090a257fcba53c"
}