
    $j	                     N    d Z ddlmZ defdZdedefdZdded	edz  defd
ZdS )z
Centralized schema-qualified table name helpers.

Single source of truth for producing ``"schema".table_name`` references
that respect both the active schema context and the database backend.
   )
get_configreturnc                  0    t                      j        dk    S )z;Return True when the configured database backend is Oracle.oracle)r   database_backend     c/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/hindsight_api/engine/schema.py
_is_oracler      s    <<(H44r	   
table_namec                 L    t                      r| S ddlm}  |             d|  S )a%  Get fully-qualified table name using the current schema context.

    On Oracle the schema is set at the session level (``ALTER SESSION SET
    CURRENT_SCHEMA``), so we return the bare table name.  On PostgreSQL
    we prefix with the schema from :func:`memory_engine.get_current_schema`.
       )get_current_schema.)r   memory_enginer   )r   r   s     r
   fq_tabler      sE     || 111111  ""11Z111r	   Ntableschemac                 :    t                      r| S |rd| d|  S | S )zGet fully-qualified table name with an explicit schema override.

    Used by modules that don't rely on the context-variable schema
    (e.g. task_backend, worker poller) and instead pass the schema
    explicitly.
    "z".)r   )r   r   s     r
   fq_table_explicitr      s8     ||  %$6$$U$$$Lr	   )N)__doc__configr   boolr   strr   r   r   r	   r
   <module>r      s           5D 5 5 5 5
2 2 2 2 2 2 S #*       r	   