
    iO                     H    d dl mZ d dlmZ d dlmZ  G d de          ZdS )   )ArrowArrayImpl)BaseMetaClass)errorsc                       e Zd ZdZd Zd Zd Zd Zed             Z	ed             Z
ddZd	 Zed
efd            Zed
efd            Zed
efd            Zed
efd            ZdS )
ArrowArrayNc                 B    t          j        t           j                   d S N)r   
_raise_errERR_INTERNAL_CREATION_REQUIREDselfs    d/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/oracledb/arrow_array.py__init__zArrowArray.__init__)   s    &?@@@@@    c                     | j         S r	   )num_rowsr   s    r   __len__zArrowArray.__len__,   s
    }r   c                 8    d| j          d| j         d| j         dS )NzArrowArray(name=z, len=z, type=))namer   dtyper   s    r   __repr__zArrowArray.__repr__/   s=    "ty " "=" "J" " "	
r   c                 *    |                                  S r	   )r   r   s    r   __str__zArrowArray.__str__6   s    }}r   c                 b    |                      |           }t          j        |          |_        |S r	   )__new__r   from_arrow_array_impl)clsobjarrays      r   _from_arrowzArrowArray._from_arrow9   s*    C  $5c::r   c                 >    |                      |           }||_        |S r	   )r   r   )r   implr!   s      r   
_from_implzArrowArray._from_impl?   s    C  r   c                     |t          d          | j                                        | j                                        fS )zV
        Returns a tuple containing an ArrowSchema and ArrowArray PyCapsules.
        Nrequested_schema)NotImplementedErrorr   get_schema_capsuleget_array_capsule)r   r'   s     r   __arrow_c_array__zArrowArray.__arrow_c_array__E   sE     '%&8999J))++J((**
 	
r   c                 4    | j                                         S )z3
        Returns an ArrowSchema PyCapsule.
        )r   r)   r   s    r   __arrow_c_schema__zArrowArray.__arrow_c_schema__P   s     z,,...r   returnc                 4    | j                                         S )zB
        Returns the data type associated with the array.
        )r   get_data_typer   s    r   r   zArrowArray.dtypeV   s    
 z'')))r   c                 4    | j                                         S )z=
        Returns the name associated with the array.
        )r   get_namer   s    r   r   zArrowArray.name]   s    
 z""$$$r   c                 4    | j                                         S )zF
        Returns the number of rows that contain null values.
        )r   get_null_countr   s    r   
null_countzArrowArray.null_countd   s    
 z((***r   c                 4    | j                                         S )z:
        Returns the number of rows in the array.
        )r   get_num_rowsr   s    r   r   zArrowArray.num_rowsk   s    
 z&&(((r   r	   )__name__
__module____qualname__r   r   r   r   r   classmethodr"   r%   r+   r-   propertystrr   r   intr5   r    r   r   r   r   &   sM       EA A A  
 
 
     [
   [
	
 	
 	
 	
/ / / *s * * * X* %c % % % X% +C + + + X+ )# ) ) ) X) ) )r   r   )	metaclassN)
arrow_implr   baser    r   r   r?   r   r   <module>rD      s   @ ' & & & & &            J) J) J) J) J)= J) J) J) J) J) J)r   