File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ Thin Mode Changes
24
24
#) Fixed bug when fetch variables contain output converters and a query is
25
25
re-executed
26
26
(`issue 271 <https://github.com/oracle/python-oracledb/issues/271 >`__).
27
+ #) Internal change to slightly improve performance of LOB reads and writes.
27
28
28
29
Common Changes
29
30
++++++++++++++
Original file line number Diff line number Diff line change 1
1
# ------------------------------------------------------------------------------
2
- # Copyright (c) 2020, 2023 , Oracle and/or its affiliates.
2
+ # Copyright (c) 2020, 2024 , Oracle and/or its affiliates.
3
3
#
4
4
# This software is dual-licensed to you under the Universal Permissive License
5
5
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -676,8 +676,8 @@ cdef enum:
676
676
TNS_ENCODING_CONV_LENGTH = 0x02
677
677
678
678
# character set strings
679
- cdef str TNS_ENCODING_UTF8 = " UTF-8"
680
- cdef str TNS_ENCODING_UTF16 = " UTF-16BE"
679
+ cdef const char * TNS_ENCODING_UTF8 = " UTF-8"
680
+ cdef const char * TNS_ENCODING_UTF16 = " UTF-16BE"
681
681
682
682
# compile time capability indices
683
683
cdef enum :
Original file line number Diff line number Diff line change 1
1
# ------------------------------------------------------------------------------
2
- # Copyright (c) 2020, 2022 , Oracle and/or its affiliates.
2
+ # Copyright (c) 2020, 2024 , Oracle and/or its affiliates.
3
3
#
4
4
# This software is dual-licensed to you under the Universal Permissive License
5
5
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -152,10 +152,10 @@ cdef class BaseThinLobImpl(BaseLobImpl):
152
152
raise TypeError (
153
153
" only strings can be written to CLOBs and NCLOBS"
154
154
)
155
- message.data = value.encode(self ._get_encoding())
155
+ message.data = ( < str > value) .encode(self ._get_encoding())
156
156
return message
157
157
158
- cdef str _get_encoding(self ):
158
+ cdef const char * _get_encoding(self ):
159
159
"""
160
160
Return the encoding used by the LOB.
161
161
"""
Original file line number Diff line number Diff line change @@ -2208,9 +2208,9 @@ cdef class LobOpMessage(Message):
2208
2208
cdef int _process_message(self , ReadBuffer buf,
2209
2209
uint8_t message_type) except - 1 :
2210
2210
cdef:
2211
+ const char * encoding
2211
2212
const char_type * ptr
2212
2213
ssize_t num_bytes
2213
- str encoding
2214
2214
if message_type == TNS_MSG_TYPE_LOB_DATA:
2215
2215
buf.read_raw_bytes_and_length(& ptr, & num_bytes)
2216
2216
if self .source_lob_impl.dbtype._ora_type_num == TNS_DATA_TYPE_BLOB:
You can’t perform that action at this time.
0 commit comments