
    #j                    V    d Z ddlmZ ddlmZ ddlmZ eg df         ZdZdddddZ	dS )u  Dialect dispatcher for Alembic migrations.

Each migration file declares a ``_pg_upgrade``/``_oracle_upgrade`` (and matching
downgrades) function and routes ``upgrade()``/``downgrade()`` through
``run_for_dialect``. The helper inspects the live connection's dialect name and
runs the matching function — or no-ops if the migration doesn't apply to the
current backend.

Use ``None`` (or omit the kwarg) when a migration intentionally has no effect
on a dialect; the helper treats it as a no-op.
    )annotations)Callable)opN
postgresqloracle)pgr   r	   DialectFn | Noner   returnNonec                    t          j                    j        j        }|t          vrt          d|dt           d          | |d|         }| |             dS dS )aZ  Dispatch to the function matching the current bind's dialect.

    Args:
        pg: Function to run when the active bind is PostgreSQL.
        oracle: Function to run when the active bind is Oracle.

    Unrecognized dialects raise; an explicit ``None`` for the active dialect
    is a no-op (the migration deliberately does nothing here).
    z,Unsupported dialect for migration dispatch: z. Expected one of .r   N)r   get_binddialectname
_SUPPORTEDRuntimeError)r	   r   r   fns       f/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/hindsight_api/alembic/_dialect.pyrun_for_dialectr      sp     ;== %D:q$qqdnqqqrrrf	-	-d	3B	~
 ~    )r	   r
   r   r
   r   r   )
__doc__
__future__r   collections.abcr   alembicr   	DialectFnr   r    r   r   <module>r      s   
 
 # " " " " " $ $ $ $ $ $      RX	%

  #       r   