+
    }¯³j?*  ã                  ó  € ^ RI Ht ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^RI
Ht ^RIHt  ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t] ! R R4      4       t ! R R4      t ! R R]P&                  4      tR# )é    )ÚannotationsN)Ú	dataclass)ÚEnum)ÚOptional)ÚUnion)Útypes)ÚFloatc                  ó$   € ] tR t^tRtRt RtRtR# )ÚVectorIndexTypezŒEnum representing different types of VECTOR index structures.

See :ref:`oracle_vector_datatype` for background.

.. versionadded:: 2.0.41

ÚHNSWÚIVF© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ú__static_attributes__r   ó    Úb/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sqlalchemy/dialects/oracle/vector.pyr   r      s   † ñð €Dðð €Cór   r   c                  ó0   € ] tR t^)tRtRt Rt Rt RtRt	R# )ÚVectorDistanceTypezŒEnum representing different types of vector distance metrics.

See :ref:`oracle_vector_datatype` for background.

.. versionadded:: 2.0.41

Ú	EUCLIDEANÚDOTÚCOSINEÚ	MANHATTANr   N)
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )   s7   † ñð €Iðð €Cðð €Fðð €Iór   r   c                  ó0   € ] tR t^HtRtRt Rt Rt RtRt	R# )ÚVectorStorageFormatz‘Enum representing the data format used to store vector components.

See :ref:`oracle_vector_datatype` for background.

.. versionadded:: 2.0.41

ÚINT8ÚBINARYÚFLOAT32ÚFLOAT64r   N)
r   r   r   r   r   r   r    r!   r"   r   r   r   r   r   r   H   s7   † ñð €Dðð €Fðð €Gðð €Gór   r   c                  ó$   € ] tR t^ctRtRt RtRtR# )ÚVectorStorageTypezqEnum representing the vector type,

See :ref:`oracle_vector_datatype` for background.

.. versionadded:: 2.0.43

ÚSPARSEÚDENSEr   N)r   r   r   r   r   r%   r&   r   r   r   r   r$   r$   c   s   † ñð €Fðð €Eór   r$   c                  ó´   € ] tR t^xt$ Rt]P                  tR]R&   Rt	R]R&   Rt
R]R&   RtR]R	&   RtR]R
&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   R tRtR# )ÚVectorIndexConfiga6  Define the configuration for Oracle VECTOR Index.

See :ref:`oracle_vector_datatype` for background.

.. versionadded:: 2.0.41

:param index_type: Enum value from :class:`.VectorIndexType`
 Specifies the indexing method. For HNSW, this must be
 :attr:`.VectorIndexType.HNSW`.

:param distance: Enum value from :class:`.VectorDistanceType`
 specifies the metric for calculating distance between VECTORS.

:param accuracy: integer. Should be in the range 0 to 100
 Specifies the accuracy of the nearest neighbor search during
 query execution.

:param parallel: integer. Specifies degree of parallelism.

:param hnsw_neighbors: integer. Should be in the range 0 to
 2048. Specifies the number of nearest neighbors considered
 during the search. The attribute :attr:`.VectorIndexConfig.hnsw_neighbors`
 is HNSW index specific.

:param hnsw_efconstruction: integer. Should be in the range 0
 to 65535. Controls the trade-off between indexing speed and
 recall quality during index construction. The attribute
 :attr:`.VectorIndexConfig.hnsw_efconstruction` is HNSW index
 specific.

:param ivf_neighbor_partitions: integer. Should be in the range
 0 to 10,000,000. Specifies the number of partitions used to
 divide the dataset. The attribute
 :attr:`.VectorIndexConfig.ivf_neighbor_partitions` is IVF index
 specific.

:param ivf_sample_per_partition: integer. Should be between 1
 and ``num_vectors / neighbor partitions``. Specifies the
 number of samples used per partition. The attribute
 :attr:`.VectorIndexConfig.ivf_sample_per_partition` is IVF index
 specific.

:param ivf_min_vectors_per_partition: integer. From 0 (no trimming)
 to the total number of vectors (results in 1 partition). Specifies
 the minimum number of vectors per partition. The attribute
 :attr:`.VectorIndexConfig.ivf_min_vectors_per_partition`
 is IVF index specific.

r   Ú
index_typeNzOptional[VectorDistanceType]ÚdistancezOptional[int]ÚaccuracyÚhnsw_neighborsÚhnsw_efconstructionÚivf_neighbor_partitionsÚivf_sample_per_partitionÚivf_min_vectors_per_partitionÚparallelc                	óà   € \        V P                  4      V n        R FM  p\        W4      pVf   K  \        V\        4      '       d   K,  \        V R\        V4      P                   24      h	  R# )r,   Nz$ must be an integer ifprovided, got )r,   r-   r.   r/   r0   r1   r+   )r   r)   ÚgetattrÚ
isinstanceÚintÚ	TypeErrorÚtyper   )ÚselfÚfieldÚvalues   &  r   Ú__post_init__ÚVectorIndexConfig.__post_init__¶   sh   € Ü)¨$¯/©/Ó:ˆŒó
ˆEô ˜DÓ(ˆEØÔ ¬°E¼3×)?Ô)?ÜØ�gð %Ü%)¨%£[×%9Ñ%9Ð$:ð<óð ó
r   )r)   )r   r   r   r   r   r   r   r)   Ú__annotations__r*   r+   r,   r-   r.   r/   r0   r1   r;   r   r   r   r   r(   r(   x   st   ‡ ñ0ðd #2×"6Ñ"6€J�Ó6Ø-1€HÐ*Ó1Ø"€HˆmÓ"Ø$(€N�MÓ(Ø)-Ð˜Ó-Ø-1Ð˜]Ó1Ø.2Ð˜mÓ2Ø37Ð! =Ó7Ø"€HˆmÓ"ör   r(   c                  ó,   € ] tR t^ÉtRtR R ltR tRtR# )ÚSparseVectorzt
Lightweight SQLAlchemy-side version of SparseVector.
This mimics oracledb.SparseVector.

.. versionadded:: 2.0.43

c               ó$   € V ^8„  d   QhRRRRRR/# )é   Únum_dimensionsr5   ÚindiceszUnion[list, array.array]Úvaluesr   )Úformats   "r   Ú__annotate__ÚSparseVector.__annotate__Ò   s(   € ÷ ñ àðð *ðð )ñ	r   c                	óp  € \        V\        P                  4      '       d   VP                  R 8w  d   \        P                  ! R V4      p\        V\        P                  4      '       g   \        P                  ! RV4      p\        V4      \        V4      8w  d   \	        R4      hWn        W n        W0n        R# )ÚIÚdz.indices and values must be of the same length!N)r4   ÚarrayÚtypecodeÚlenr6   rB   rC   rD   )r8   rB   rC   rD   s   &&&&r   Ú__init__ÚSparseVector.__init__Ò   s   € ô ˜'¤5§;¡;×/Ò/°7×3CÑ3CÀsÔ3JÜ—k’k # wÓ/ˆGÜ˜&¤%§+¡+×.Ò.Ü—[’[  fÓ-ˆFÜˆw‹<œ3˜v›;Ô&ÜÐLÓMÐMà,ÔØŒØŽr   c                	ó|   € R V P                    R\        V P                  4       RV P                  P                   R2# )zSparseVector(num_dimensions=z, size=z, typecode=Ú))rB   rM   rC   rD   rL   )r8   s   &r   Ú__str__ÚSparseVector.__str__ã   sC   € à*¨4×+>Ñ+>Ð*?ð @Ü˜Ÿ™Ó%Ð& k°$·+±+×2FÑ2FÐ1GÀqðJð	
r   )rC   rB   rD   N)r   r   r   r   r   rN   rR   r   r   r   r   r?   r?   É   s   † ñõö"
r   r?   c                  óà   € ] tR t^êtRtRtR t]P                  R]P                  R]P                  R]P                  R/tRR ltR	 tR
 tR t ! R R]P$                  P&                  4      tRtR# )ÚVECTORzƒOracle VECTOR datatype.

For complete background on using this type, see
:ref:`oracle_vector_datatype`.

.. versionadded:: 2.0.41

TÚbÚBÚfrJ   Nc                ó  € Ve"   \        V\        4      '       g   \        R4      hVe"   \        V\        4      '       g   \        R4      hVe"   \        V\        4      '       g   \        R4      hWn        W n        W0n        R# )a´  Construct a VECTOR.

:param dim: integer. The dimension of the VECTOR datatype. This
 should be an integer value.

:param storage_format: VectorStorageFormat. The VECTOR storage
 type format. This should be Enum values form
 :class:`.VectorStorageFormat` INT8, BINARY, FLOAT32, or FLOAT64.

:param storage_type: VectorStorageType. The Vector storage type. This
 should be Enum values from :class:`.VectorStorageType` SPARSE or
 DENSE.

Nzdim must be an integerz:storage_format must be an enum of type VectorStorageFormatz6storage_type must be an enum of type VectorStorageType)r4   r5   r6   r   r$   ÚdimÚstorage_formatÚstorage_type)r8   rZ   r[   r\   s   &&&&r   rN   ÚVECTOR.__init__ÿ   sŠ   € ð  Š?¤:¨c´3×#7Ò#7ÜÐ4Ó5Ð5ØÒ%¬jØÔ/÷/
ò /
ô ØLóð ð Ò#¬JØÔ+÷-
ò -
ô ØHóð ð ŒØ,ÔØ(Ör   c                ó   a a€ VV 3R lpV# )zŒ
Converts a Python-side SparseVector instance into an
oracledb.SparseVectormor a compatible array format before
binding it to the database.
c                óš  <€ V e!   \        V \        P                  4      '       d   V # \        V \        4      '       d4   SP                  SP                  4      p\        P                  ! W4      p V # \        V \
        4      '       d<   SP                  P                  V P                  V P                  V P                  4      # \        R4      h)Nz’
                    Invalid input for VECTOR: expected a list, an array.array,
                    or a SparseVector object.
                    )r4   rK   ÚlistÚ_array_typecoder[   r?   ÚdbapirB   rC   rD   r6   )r:   rL   Údialectr8   s   & €€r   ÚprocessÚ.VECTOR._cached_bind_processor.<locals>.process)  s¦   ø€ ØŠ}¤
¨5´%·+±+× >Ò >Ø�ô ˜E¤4×(Ò(Ø×/Ñ/°×0CÑ0CÓD�ÜŸš HÓ4�Ø�ô ˜E¤<×0Ò0Ø—}‘}×1Ñ1Ø×(Ñ(Ø—M‘MØ—L‘Lóð ô  ð !ó ð r   r   )r8   rc   rd   s   ff r   Ú_cached_bind_processorÚVECTOR._cached_bind_processor"  s   ù€ ö	ð0 ˆr   c                ó   a€ V3R lpV# )zö
Converts database-returned values into Python-native representations.
If the value is an oracledb.SparseVector, it is converted into the
SQLAlchemy-side SparseVector class.
If the value is a array.array, it is converted to a plain Python list.

c                ó  <€ V f   R # \        V \        P                  4      '       d   \        V 4      # \        V SP                  P                  4      '       d-   \	        V P
                  V P                  V P                  R7      # R # )N)rB   rC   rD   )r4   rK   r`   rb   r?   rB   rC   rD   )r:   rc   s   &€r   rd   Ú0VECTOR._cached_result_processor.<locals>.processL  sh   ø€ ØŠ}Ùä˜E¤5§;¡;×/Ò/Ü˜E“{Ð"ô ˜E 7§=¡=×#=Ñ#=×>Ò>Ü#Ø#(×#7Ñ#7Ø!ŸM™MØ Ÿ<™<ôð ñ ?r   r   )r8   rc   Úcoltyperd   s   &f& r   Ú_cached_result_processorÚVECTOR._cached_result_processorC  s   ø€ õ	ð ˆr   c                ó:   € V P                   P                  VR4      # )z'
Map storage format to array typecode.
rJ   )Ú_typecode_mapÚget)r8   rL   s   &&r   ra   ÚVECTOR._array_typecode]  s   € ð ×!Ñ!×%Ñ% h°Ó4Ð4r   c                  ó(   € ] tR tRtR tR tR tRtR# )ÚVECTOR.comparator_factoryic  c                	ó<   € V P                  R \        R7      ! V4      # )z<->©Úreturn_type©Úopr	   ©r8   Úothers   &&r   Úl2_distanceÚ%VECTOR.comparator_factory.l2_distanced  ó   € Ø—7‘7˜5¬e�7Ô4°UÓ;Ð;r   c                	ó<   € V P                  R \        R7      ! V4      # )z<#>ru   rw   ry   s   &&r   Úinner_productÚ'VECTOR.comparator_factory.inner_productg  r}   r   c                	ó<   € V P                  R \        R7      ! V4      # )z<=>ru   rw   ry   s   &&r   Úcosine_distanceÚ)VECTOR.comparator_factory.cosine_distancej  r}   r   r   N)r   r   r   r   r{   r   r‚   r   r   r   r   Úcomparator_factoryrs   c  s   † ò	<ò	<ö	<r   r„   )rZ   r[   r\   )NNN)r   r   r   r   r   Úcache_okÚ__visit_name__r   r   r    r!   r"   ro   rN   rf   rl   ra   r   Ú
TypeEngineÚ
Comparatorr„   r   r   r   r   rU   rU   ê   s{   † ñð €Hà€Nð 	× Ñ  #Ø×"Ñ" CØ×#Ñ# SØ×#Ñ# Sð	€Mô!)òFòBò45ô<˜U×-Ñ-×8Ñ8÷ <ð <r   rU   )Ú
__future__r   rK   Údataclassesr   Úenumr   Útypingr   r   Ú r   r	   r   r   r   r$   r(   r?   r‡   rU   r   r   r   Ú<module>rŽ      s‹   ðõ #ã Ý !Ý Ý Ý å Ý ô�dô ô&˜ô ô>˜$ô ô6˜ô ð* ÷Mð Mó ðM÷`
ñ 
ôBA<ˆU×Ñö A<r   