
    bjG                    6    d dl mZ d dlZd dlmZ d
dZdd	ZdS )    )annotationsN)Pathdb_path
str | Pathreturnsqlite3.Connectionc                    t          |                                           }|j                            dd           t	          j        |d          }t          j        |_        |                    d           |S )NT)parentsexist_okFcheck_same_threadPRAGMA foreign_keys = ON)	r   
expanduserparentmkdirsqlite3connectRowrow_factoryexecute)r   pathconns      ~/home/agent/.hermes/worktrees/FinanceManager-sprint3-reconciliation-snapshot-foundation/src/jarvis_finance/storage/database.pyr   r      sj    ==##%%DKdT222?45999D{DLL+,,,K    c                 ~    t          j        dd          } t           j        | _        |                     d           | S )Nz:memory:Fr   r   )r   r   r   r   r   )r   s    r   connect_memoryr      s8    ?:???D{DLL+,,,Kr   )r   r   r   r   )r   r   )
__future__r   r   pathlibr   r   r    r   r   <module>r       sd    " " " " " "               r   