{
  "db_name": "PostgreSQL",
  "query": "SELECT resource.*, (now() > account.expires_at) as is_expired, account.refresh_token != '' as is_refreshed,\n        account.refresh_error,\n        variable.path IS NOT NULL as is_linked,\n        variable.is_oauth as \"is_oauth?\",\n        variable.account\n        FROM resource\n        LEFT JOIN variable ON variable.path = resource.path AND variable.workspace_id = resource.workspace_id\n        LEFT JOIN account ON variable.account = account.id AND account.workspace_id = resource.workspace_id\n        WHERE resource.path = $1 AND resource.workspace_id = $2",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "workspace_id",
        "type_info": "Varchar"
      },
      {
        "ordinal": 1,
        "name": "path",
        "type_info": "Varchar"
      },
      {
        "ordinal": 2,
        "name": "value",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 3,
        "name": "description",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "resource_type",
        "type_info": "Varchar"
      },
      {
        "ordinal": 5,
        "name": "extra_perms",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 6,
        "name": "is_expired",
        "type_info": "Bool"
      },
      {
        "ordinal": 7,
        "name": "is_refreshed",
        "type_info": "Bool"
      },
      {
        "ordinal": 8,
        "name": "refresh_error",
        "type_info": "Text"
      },
      {
        "ordinal": 9,
        "name": "is_linked",
        "type_info": "Bool"
      },
      {
        "ordinal": 10,
        "name": "is_oauth?",
        "type_info": "Bool"
      },
      {
        "ordinal": 11,
        "name": "account",
        "type_info": "Int4"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Text"
      ]
    },
    "nullable": [
      false,
      false,
      true,
      true,
      false,
      false,
      null,
      null,
      true,
      null,
      false,
      true
    ]
  },
  "hash": "7f443f5be90622eed3e878ada0ae8ca71902adb88861bc8a39713fc8942e652c"
}
