{
  "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 id, secret\n            )\n            SELECT id, secret FROM ins\n            UNION ALL\n            SELECT id, 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": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "secret",
        "type_info": "Varchar"
      }
    ],
    "parameters": {
      "Left": [
        "Varchar",
        "Text",
        "Varchar",
        "Varchar",
        "Uuid",
        "Uuid"
      ]
    },
    "nullable": [
      null,
      null
    ]
  },
  "hash": "0b14bc0b0c7959f6239978fb0ebb575b900c68cc28523febc06c357cc5cbd5a4"
}
