{
  "db_name": "PostgreSQL",
  "query": "\n            WITH ins AS (\n                INSERT INTO api_keys (name, description, secret, purpose, user_id, created_by, hidden)\n                VALUES ($1, $2, $3, $4, $5, $6, true)\n                ON CONFLICT (user_id, created_by, purpose) WHERE hidden = true AND is_deleted = false\n                DO NOTHING\n                RETURNING secret\n            )\n            SELECT secret FROM ins\n            UNION ALL\n            SELECT secret FROM api_keys\n            WHERE user_id = $5 AND created_by = $6 AND purpose = $4\n              AND hidden = true AND is_deleted = false\n            LIMIT 1\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "secret",
        "type_info": "Varchar"
      }
    ],
    "parameters": {
      "Left": [
        "Varchar",
        "Text",
        "Varchar",
        "Varchar",
        "Uuid",
        "Uuid"
      ]
    },
    "nullable": [
      null
    ]
  },
  "hash": "1ee6056408732a6dfb352d87f0f567fbbee435c56775bb041665e874b0dd0fe0"
}
