File tree 2 files changed +15
-8
lines changed
2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,8 @@ cdef class CoreProtocol:
147
147
cdef WriteBuffer _build_bind_message(self , str portal_name,
148
148
str stmt_name,
149
149
WriteBuffer bind_data)
150
+ cdef WriteBuffer _build_execute_message(self , str portal_name,
151
+ int32_t limit)
150
152
151
153
152
154
cdef _connect(self )
Original file line number Diff line number Diff line change @@ -699,6 +699,17 @@ cdef class CoreProtocol:
699
699
buf.end_message()
700
700
return buf
701
701
702
+ cdef WriteBuffer _build_execute_message(self , str portal_name,
703
+ int32_t limit):
704
+ cdef WriteBuffer buf
705
+
706
+ buf = WriteBuffer.new_message(b' E' )
707
+ buf.write_str(portal_name, self .encoding) # name of the portal
708
+ buf.write_int32(limit) # number of rows to return; 0 - all
709
+
710
+ buf.end_message()
711
+ return buf
712
+
702
713
# API for subclasses
703
714
704
715
cdef _connect(self ):
@@ -776,10 +787,7 @@ cdef class CoreProtocol:
776
787
buf = self ._build_bind_message(portal_name, stmt_name, bind_data)
777
788
self ._write(buf)
778
789
779
- buf = WriteBuffer.new_message(b' E' )
780
- buf.write_str(portal_name, self .encoding) # name of the portal
781
- buf.write_int32(limit) # number of rows to return; 0 - all
782
- buf.end_message()
790
+ buf = self ._build_execute_message(portal_name, limit)
783
791
self ._write(buf)
784
792
785
793
self ._write_sync_message()
@@ -829,10 +837,7 @@ cdef class CoreProtocol:
829
837
830
838
self .result = []
831
839
832
- buf = WriteBuffer.new_message(b' E' )
833
- buf.write_str(portal_name, self .encoding) # name of the portal
834
- buf.write_int32(limit) # number of rows to return; 0 - all
835
- buf.end_message()
840
+ buf = self ._build_execute_message(portal_name, limit)
836
841
self ._write(buf)
837
842
self ._write_sync_message()
838
843
You can’t perform that action at this time.
0 commit comments