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.

3.0 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n        WITH previous AS (\n            SELECT values FROM entity_properties\n            WHERE entity_id = $2 AND entity_type = $3 AND property_definition_id = $4\n        )\n        INSERT INTO entity_properties (id, entity_id, entity_type, property_definition_id, values)\n        VALUES ($1, $2, $3, $4, $5)\n        ON CONFLICT (entity_id, entity_type, property_definition_id)\n        DO UPDATE SET\n            values = EXCLUDED.values,\n            updated_at = NOW()\n        RETURNING\n            id,\n            entity_id,\n            entity_type as \"entity_type: EntityType\",\n            property_definition_id,\n            values as \"value: serde_json::Value\",\n            (SELECT values FROM previous) as \"previous: serde_json::Value\",\n            created_at,\n            updated_at\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "entity_id",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "entity_type: EntityType",
        "type_info": {
          "Custom": {
            "name": "property_entity_type",
            "kind": {
              "Enum": [
                "CHANNEL",
                "CHAT",
                "DOCUMENT",
                "PROJECT",
                "THREAD",
                "USER",
                "COMPANY",
                "TASK",
                "CALL_RECORD",
                "CALENDAR_EVENT",
                "INITIATIVE",
                "CONTACT",
                "DATABASE_ROW"
              ]
            }
          }
        }
      },
      {
        "ordinal": 3,
        "name": "property_definition_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 4,
        "name": "value: serde_json::Value",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 5,
        "name": "previous: serde_json::Value",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 6,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "updated_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Text",
        {
          "Custom": {
            "name": "property_entity_type",
            "kind": {
              "Enum": [
                "CHANNEL",
                "CHAT",
                "DOCUMENT",
                "PROJECT",
                "THREAD",
                "USER",
                "COMPANY",
                "TASK",
                "CALL_RECORD",
                "CALENDAR_EVENT",
                "INITIATIVE",
                "CONTACT",
                "DATABASE_ROW"
              ]
            }
          }
        },
        "Uuid",
        "Jsonb"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      true,
      null,
      false,
      false
    ]
  },
  "hash": "339ed96279e420f9f18f5152d5c64b8c77fe7dae968c4ddf29e3acbedc6afae6"
}