{
  "db_name": "PostgreSQL",
  "query": "select\n                id,\n                workspace_id,\n                agent_id,\n                operation_id,\n                protocol,\n                mode,\n                status,\n                cursor_json,\n                state_json,\n                expires_at as \"expires_at!: OffsetDateTime\",\n                last_poll_at as \"last_poll_at: OffsetDateTime\",\n                created_at as \"created_at!: OffsetDateTime\",\n                closed_at as \"closed_at: OffsetDateTime\"\n             from stream_sessions\n             where workspace_id = $1\n               and ($2::text is null or agent_id = $2)\n               and ($3::text is null or operation_id = $3)\n               and ($4::text is null or status = $4)\n               and ($5::text is null or mode = $5)\n             order by created_at desc\n             limit $6",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "workspace_id",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "agent_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "operation_id",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "protocol",
        "type_info": "Text"
      },
      {
        "ordinal": 5,
        "name": "mode",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "status",
        "type_info": "Text"
      },
      {
        "ordinal": 7,
        "name": "cursor_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 8,
        "name": "state_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 9,
        "name": "expires_at!: OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 10,
        "name": "last_poll_at: OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 11,
        "name": "created_at!: OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 12,
        "name": "closed_at: OffsetDateTime",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Text",
        "Text",
        "Text",
        "Text",
        "Int8"
      ]
    },
    "nullable": [
      false,
      false,
      true,
      false,
      false,
      false,
      false,
      true,
      false,
      false,
      true,
      false,
      true
    ]
  },
  "hash": "b68377d8ffd5bdc9b8e417170f4940b65d2167dada6b6110985ce0bd95480b93"
}
