3333
3434from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
3535from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
36+ from cpython cimport array
3637
3738ctypedef unsigned char char_type
3839
@@ -44,7 +45,7 @@ cdef enum:
4445
4546cdef enum :
4647 DB_TYPE_NUM_MIN = 2000
47- DB_TYPE_NUM_MAX = 2032
48+ DB_TYPE_NUM_MAX = 2033
4849
4950 DB_TYPE_NUM_BFILE = 2020
5051 DB_TYPE_NUM_BINARY_DOUBLE = 2008
@@ -75,6 +76,7 @@ cdef enum:
7576 DB_TYPE_NUM_UNKNOWN = 0
7677 DB_TYPE_NUM_UROWID = 2030
7778 DB_TYPE_NUM_VARCHAR = 2001
79+ DB_TYPE_NUM_VECTOR = 2033
7880 DB_TYPE_NUM_XMLTYPE = 2032
7981
8082cdef enum :
@@ -91,6 +93,7 @@ cdef enum:
9193 NATIVE_TYPE_NUM_ROWID = 3012
9294 NATIVE_TYPE_NUM_STMT = 3010
9395 NATIVE_TYPE_NUM_TIMESTAMP = 3005
96+ NATIVE_TYPE_NUM_VECTOR = 3017
9497
9598cdef enum :
9699 CS_FORM_IMPLICIT = 1
@@ -169,8 +172,10 @@ cdef class Buffer:
169172 cdef int _write_raw_bytes_and_length(self , const char_type * ptr,
170173 ssize_t num_bytes) except - 1
171174 cdef inline ssize_t bytes_left(self )
172- cdef object parse_binary_double(self , const uint8_t* ptr)
173- cdef object parse_binary_float(self , const uint8_t* ptr)
175+ cdef int parse_binary_double(self , const uint8_t* ptr,
176+ double * double_ptr) except - 1
177+ cdef int parse_binary_float(self , const uint8_t* ptr,
178+ float * float_ptr) except - 1
174179 cdef object parse_date(self , const uint8_t* ptr, ssize_t num_bytes)
175180 cdef object parse_interval_ds(self , const uint8_t* ptr)
176181 cdef object parse_oracle_number(self , const uint8_t* ptr,
@@ -207,8 +212,10 @@ cdef class Buffer:
207212 cdef inline int skip_ub2(self ) except - 1
208213 cdef inline int skip_ub4(self ) except - 1
209214 cdef inline int skip_ub8(self ) except - 1
210- cdef int write_binary_double(self , double value) except - 1
211- cdef int write_binary_float(self , float value) except - 1
215+ cdef int write_binary_double(self , double value,
216+ bint write_length = * ) except - 1
217+ cdef int write_binary_float(self , float value,
218+ bint write_length = * ) except - 1
212219 cdef int write_bool(self , bint value) except - 1
213220 cdef int write_bytes(self , bytes value) except - 1
214221 cdef int write_bytes_with_length(self , bytes value) except - 1
@@ -304,6 +311,16 @@ cdef class OsonEncoder(GrowableBuffer):
304311 cdef int encode(self , object value, ssize_t max_fname_size) except - 1
305312
306313
314+ cdef class VectorDecoder(Buffer):
315+
316+ cdef object decode(self , bytes data)
317+
318+
319+ cdef class VectorEncoder(GrowableBuffer):
320+
321+ cdef int encode(self , array.array value) except - 1
322+
323+
307324cdef class ConnectParamsNode:
308325 cdef:
309326 public bint source_route
@@ -549,6 +566,9 @@ cdef class FetchInfoImpl:
549566 readonly str domain_schema
550567 readonly str domain_name
551568 readonly dict annotations
569+ readonly uint32_t vector_dimensions
570+ readonly uint8_t vector_format
571+ readonly uint8_t vector_flags
552572
553573
554574cdef class BaseVarImpl:
0 commit comments