����JFIFXX�����    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222����"��4�� ���,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu���#ډb���_�N�?��wQ���5-�~�I���8����TK<5o�Iv-�����k�_U_�����~b�M��d����Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�?_�'ϔ��_�Ջt��=||I ��6�έ"�����D���/[�k�9���Y�8ds|\���Ҿp6�Ҵ���]��.����6�z<�v��@]�i%��$j��~�g��J>��no����pM[me�i$[����s�o�ᘨ�˸ nɜG-�ĨU�ycP�3.DB�li�;��hj���x7Z^�N�h������N3u{�:j�x�힞��#M&��jL P@_���� P��&��o8������9�����@Sz6�t7#O�ߋ �s}Yf�T���lmr����Z)'N��k�۞p����w\�Tȯ?�8`�O��i{wﭹW�[�r�� ��Q4F�׊���3m&L�=��h3����z~��#�\�l :�F,j@�� ʱ�wQT����8�"kJO���6�֚l����}���R�>ډK���]��y����&����p�}b��;N�1�m�r$�|��7�>e�@B�TM*-iH��g�D�)� E�m�|�ؘbҗ�a��Ҿ����t4���o���G��*oCN�rP���Q��@z,|?W[0�����:�n,jWiE��W��$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S����VN;�}�s?.����� w�9��˟<���Mq4�Wv'��{)0�1mB��V����W[�����8�/<� �%���wT^�5���b��)iM� pg�N�&ݝ��VO~�q���u���9� ����!��J27����$O-���! �:�%H��� ـ����y�ΠM=t{!S�� oK8������t<����è:a������[�����ա�H���~��w��Qz`�po�^ ����Q��n� �,uu�C�$ ^���,������8�#��:�6��e�|~���!�3�3.�\0��q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<���Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y�|�y��� ~�6�@c��1vOp�Ig����4��l�OD���L����� R���c���j�_�uX6��3?nk��Wy�f;^*B� ��@�~a�`��Eu������+���6�L��.ü>��}y���}_�O�6�͐�:�YrG�X��kG�����l^w���~㒶sy��Iu�!� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT��G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2��#I/�׍qz��^t�̔���b�Yz4x���t�){ OH��+(E��A&�N�������XT��o��"�XC��'���)}�J�z�p� ��~5�}�^����+�6����w��c��Q�|Lp�d�H��}�(�.|����k��c4^�"�����Z?ȕ ��a<�L�!039C� �Eu�C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf���M}7����]����s2tcS{�\icTx;�\��7K���P���ʇ Z O-��~��c>"��?�������P��E��O�8��@�8��G��Q�g�a�Վ���󁶠�䧘��_%#r�>�1�z�a��eb��qcPѵ��n���#L��� =��׀t� L�7�`��V���A{�C:�g���e@�w1 Xp3�c3�ġ����p��M"'-�@n4���fG��B3�DJ�8[Jo�ߐ���gK)ƛ��$���� ���8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`���?��K����QK�d����B`�s}�>���`��*�>��,*@J�d�oF*����弝��O}�k��s��]��y�ߘ��c1G�V���<=�7��7����6�q�PT��tXԀ�!9*4�4Tހ3XΛex�46���Y��D ����� �BdemDa����\�_l,��G�/���֌7���Y�](�xTt^%�GE�����4�}bT���ڹ�����;Y)���B�Q��u��>J/J �⮶.�XԄ��j�ݳ�+E��d ��r�5�_D�1 ��o�� �B�x�΢�#���<��W�����8���R6�@g�M�.��� dr�D��>(otU��@x=��~v���2� ӣ�d�oBd��3�eO�6�㣷�����ݜ6��6Y��Qz`��S��{���\P�~z m5{J/L��1������<�e�ͅPu�b�]�ϔ���'������f�b� Zpw��c`"��i���BD@:)ִ�:�]��hv�E�w���T�l��P���"Ju�}��وV J��G6��. J/�Qgl߭�e�����@�z�Zev2u�)]կ�����7x���s�M�-<ɯ�c��r�v�����@��$�ޮ}lk���a���'����>x��O\�ZFu>�����ck#��&:��`�$�ai�>2Δ����l���oF[h��lE�ܺ�Πk:)���`�� $[6�����9�����kOw�\|���8}������ބ:��񶐕��I�A1/�=�2[�,�!��.}gN#�u����b��� ~��݊��}34q����d�E��Lc��$��"�[q�U�硬g^��%B �z���r�pJ�ru%v\h1Y�ne`ǥ:g���pQM~�^�Xi� ��`S�:V29.�P���V�?B�k�� AEvw%�_�9C�Q����wKekPؠ�\�;Io d�{ ߞo�c1eP����\� `����E=���@K<�Y���eڼ�J���w����{av�F�'�M�@/J��+9p���|]�����Iw &`��8���&M�hg��[�{��Xj��%��Ӓ�$��(����ʹN���<>�I���RY���K2�NPlL�ɀ)��&e����B+ь����( � �JTx���_?EZ� }@ 6�U���뙢ط�z��dWI�n` D����噥�[��uV��"�G&Ú����2g�}&m��?ċ�"����Om#��������� ��{�ON��"S�X��Ne��ysQ���@Fn��Vg���dX�~nj�]J�<�K]:��FW��b�������62�=��5f����JKw��bf�X�55��~J �%^����:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v���g�8�1��f24;�V���ǔ�)����9���1\��c��v�/'Ƞ�w�������$�4�R-��t���� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃������A��20�c#��@ 0!1@AP"#2Q`$3V�%45a6�FRUq��� ����^7ׅ,$n�������+��F�`��2X'��0vM��p�L=������5��8������u�p~���.�`r�����\���O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;������S�T���1���i[U�ɵz�]��U)V�S6���3$K{�ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u�!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ���D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v�����멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$�JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4�[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ�dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il��d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J��oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.���3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N�����#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%���JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$���L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)�H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>�dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\�y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7��ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz��)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)'��8Ϣ�ٔ��ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'�L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3�������QT��a����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3�,#c�co��q�a)*Pt����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O���������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l�O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m���PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~�|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0��Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q��nxҍ!U�f�!eh�i�2�m���`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{/ �?�͟��|1�:�#g��W�>$����d��J��d�B��=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l����l�cGs�ځ�������y�Ac�����\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6����N6�q������N ! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td�� ?���N����a��3��m���C���w��������xA�m�q�m���m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4���r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G�����Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q�(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9��3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#yw��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa����Q�#� WeF��ŮNj�p�J* mQ�N����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]��陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WPw���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp�BGv[]�u�Ov���0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND��.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J �4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R��� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(�>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG��{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/��*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>e]�����Q�r�:����g�,i"�����ԩA�*M�<�G��b�if��l^M��5� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f�����֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ���˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)��h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������ G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W�I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��BS�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c���]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪�\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W�����6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}�����6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@�P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6�����m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw�k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e��R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN��ĕ��0 !01@Q"2AaPq3BR������?���@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j�ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^���ԯ̾9Z��F��������n��1��� ��]�[��)�'������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ��&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0��;_��3 !01"@AQa2Pq#3BR������?��ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6����������4B>��o��](��$B���m�����a�!=��?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a�84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b��$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7��k�� 403WebShell
403Webshell
Server IP : 97.74.90.209  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux live.indianstaffingfederation.org 4.18.0-553.54.1.el8_10.x86_64 #1 SMP Tue May 27 22:49:52 EDT 2025 x86_64
User : indianstaffing ( 1003)
PHP Version : 8.3.22
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/opt/nydus/ops/mysql/connector/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/opt/nydus/ops/mysql/connector/__pycache__/cursor.cpython-39.pyc
a

Oh#h��@s�dZddlmZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZmZddlmZmZdd	lmZdd
lmZm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/e
�rddl0m1Z1d
Z2e�3de2�de2�d�ej4ej5Bej6B�Z7e�3dej4ej5Bej6B�Z8e�3de2�de2�d�ej4ej5Bej6B�Z9e�3dej4ej5Bej6B�Z:e�3d�Z;e�3dej<�Z=e�3d�Z>e�3d�Z?e�3d�Z@e�3d�ZAdZBdZCddd�d d!�ZDdd"d#�d$d%�ZEGd&d'�d'�ZFdd(dd)�d*d+�ZGGd,d-�d-e�ZHGd.d/�d/eH�ZIGd0d1�d1eI�ZJGd2d3�d3eI�ZKGd4d5�d5eJ�ZLGd6d7�d7eI�ZMGd8d9�d9eI�ZNGd:d;�d;eI�ZOGd<d=�d=eNeJ�ZPGd>d?�d?eOeJ�ZQGd@dA�dAeNeM�ZRGdBdC�dCeOeM�ZSGdDdE�dEeM�ZTdS)FzCursor classes.�)�annotationsN)�deque�
namedtuple)�Decimal)�
TYPE_CHECKING�Any�Deque�Dict�	Generator�Iterator�List�NoReturn�Optional�Sequence�Tuple�Union�)�NAMED_TUPLE_CACHE�MySQLCursorAbstract)�
ServerFlag)�Error�InterfaceError�NotSupportedError�ProgrammingError�get_mysql_exception)�DescriptionType�
EofPacketType�MySQLConvertibleType�ParamsDictType�ParamsSequenceOrDictType�ParamsSequenceType�
ResultType�RowItemType�RowType�
StrOrBytes�WarningType)�MySQLConnectionz\/\*.*?\*\/�(z)|(["'`][^"'`]*?(z)[^"'`]*?["'`])z<\s*ON\s+DUPLICATE\s+KEY(?:[^"'`]*["'`][^"'`]*["'`])*[^"'`]*$z|\s)*INSERT(z[|\s)*(?:IGNORE\s+)?INTO\s+[`'\"]?.+[`'\"]?(?:\.[`'\"]?.+[`'\"]?){0,2}\s+VALUES\s*(\(.+\)).*z.*VALUES\s*(\(.+\)).*s(%s)sV
    %
    \((?P<mapping_key>[^)]+)\)
    (?P<conversion_type>[diouxXeEfFgGcrs%])
    s4;(?=(?:[^"'`]*(?:"[^"]*"|'[^']*'|`[^`]*`))*[^"'`]*$)s+%s(?=(?:[^"'`]*["'`][^"'`]*["'`])*[^"'`]*$)z	%\(.*?\)sz%\((.*?)\)szNo result set to fetch froml���bytes�bool)�stmt�returncCsNt|�dko.|�d�o.t�t|d��ddv}t|�dkoD|�d�}|pL|S)a�Checks if statement is an end-of-line comment.

    Double-dash comment style requires the second dash to be
    followed by at least one whitespace (Z) or control character (C) such
    as a space, tab, newline, and so on.

    Hash comment simply requires start from `#` and nothing else.

    Args:
        stmt: MySQL statement.

    Returns:
        Whether or not the statement is an end-of-line comment.

    References:
        [1]: https://dev.mysql.com/doc/refman/8.0/en/comments.html
    �s--�r>�C�Z�#)�len�
startswith�unicodedata�category�chr)r*Zis_double_dash_commentZis_hash_comment�r6�G/opt/nydus/tmp/pip-target-wgfnss67/lib/python/mysql/connector/cursor.py�is_eol_commentxs��r8zDeque[bytes])�
multi_stmtr+cCsjtt�|��}dt|�}}|dkrT|d8}|����}|r|}t|�s|�|�qt|�rf|�|�|S)acParses a multi-statement query/operation.

    Parsing consists of removing empty (which includes just whitespaces and/or control
    characters) statements and EOL (end-of-line) comments.

    However, there's a caveat, by rule, the last EOL comment found in the stream isn't
    removed if and only if it's the last statement.

    Why? EOL comments do not generate results, however, when the last statement is an
    EOL comment the server returns an empty result. So, in other to match statements
    and results correctly we need to keep the last EOL comment statement.

    Args:
        multi_stmt: Query representing multi-statement operations separated by semicolons.

    Returns:
        A list of statements that aren't empty and don't contain leading
        ASCII whitespaces. Also, they aren't EOL comments except
        perhaps for the last one.
    �rr)r�RE_SQL_SPLIT_STMTS�splitr1�popleft�lstripr8�append)r9�
executed_listr*Znum_stmsZ	stmt_nextr6r6r7�parse_multi_statement_query�s
rAc@sBeZdZdZddd�dd�Zddd	�d
d�Zedd
�dd��ZdS)�_ParamSubstitutorz4
    Substitutes parameters into SQL statement.
    zSequence[bytes]�None��paramsr+cCs||_d|_dS�Nr)rE�index)�selfrEr6r6r7�__init__�sz_ParamSubstitutor.__init__�re.Matchr(��matchobjr+cCsF|j}|jd7_zt|j|�WSty@td�d�Yn0dS)Nrz+Not enough parameters for the SQL statement)rGr(rE�
IndexErrorr)rHrLrGr6r6r7�__call__�s��z_ParamSubstitutor.__call__�int�r+cCst|j�|jS)z8Returns number of parameters remaining to be substituted)r1rErG�rHr6r6r7�	remaining�sz_ParamSubstitutor.remainingN)�__name__�
__module__�__qualname__�__doc__rIrN�propertyrRr6r6r6r7rB�s

rBzDict[bytes, bytes])�bytestr�
value_dictr+cs$ddd��fdd�}t�||�}|S)ah
    >>> _bytestr_format_dict(b'%(a)s', {b'a': b'foobar'})
    b'foobar
    >>> _bytestr_format_dict(b'%%(a)s', {b'a': b'foobar'})
    b'%%(a)s'
    >>> _bytestr_format_dict(b'%%%(a)s', {b'a': b'foobar'})
    b'%%foobar'
    >>> _bytestr_format_dict(b'%(x)s %(y)s',
    ...                      {b'x': b'x=%(y)s', b'y': b'y=%(x)s'})
    b'x=%(y)s y=%(x)s'
    rJr(rKcsVd}|��}|ddkrd}|ddkr8|d}�|}|durRtd|d����|S)zReplace pattern.NZconversion_type�%�sZmapping_keyzUnsupported conversion_type: )�	groupdict�
ValueError)rL�value�groups�key�rYr6r7�replace�s�z%_bytestr_format_dict.<locals>.replace)�RE_PY_MAPPING_PARAM�sub)rXrYrbr*r6rar7�_bytestr_format_dict�s
recs"eZdZUdZdZded<dd��fdd�Zd=d
ddd
�dd�Zdd�dd�Zd>d
dddd�dd�Z	d
ddd�dd�Z
dd�dd�Zd?dd d!�d"d#�Zd d�d$d%�Z
d&d�d'd(�Zd)d�d*d+�Zd,d)d-�d.d/�Zd@d,d,d)d1�d2d3�ZdAddd5�d6d7�Zed8d�d9d:��Zedd�d;d<��Z�ZS)B�
CursorBasez�
    Base for defining MySQLCursor. This class is a skeleton and defines
    methods and members as required for the Python Database API
    Specification v2.0.

    It's better to inherite from MySQLCursor.
    Fr)�_rawrCrPcs d|_d|_d|_t���dS)N���r)�_description�	_rowcount�	arraysize�superrIrQ��	__class__r6r7rI�szCursorBase.__init__r6�strr�0Optional[Union[Dict[str, RowItemType], RowType]]��procname�argsr+cCsdS)aCalls a stored procedue with the given arguments

        The arguments will be set during this session, meaning
        they will be called like  _<procname>__arg<nr> where
        <nr> is an enumeration (+1) of the arguments.

        Coding Example:
          1) Definining the Stored Routine in MySQL:
          CREATE PROCEDURE multiply(IN pFac1 INT, IN pFac2 INT, OUT pProd INT)
          BEGIN
            SET pProd := pFac1 * pFac2;
          END

          2) Executing in Python:
          args = (5,5,0) # 0 is to hold pprod
          cursor.callproc('multiply', args)
          print(cursor.fetchone())

        Does not return a value, but a result set will be
        available when the CALL-statement execute successfully.
        Raises exceptions when something is wrong.
        Nr6�rHrrrsr6r6r7�callprocszCursorBase.callproccCsdS)zClose the cursor.Nr6rQr6r6r7�closeszCursorBase.closezFUnion[Sequence[MySQLConvertibleType], Dict[str, MySQLConvertibleType]]z4Optional[Generator[MySQLCursorAbstract, None, None]]��	operationrE�multir+cCsdS)�Executes the given operation

        Executes the given operation substituting any markers with
        the given parameters.

        For example, getting all rows where id is 5:
          cursor.execute("SELECT * FROM t1 WHERE id = %s", (5,))

        The multi argument should be set to True when executing multiple
        statements in one operation. If not set and multiple results are
        found, an InterfaceError will be raised.

        If warnings where generated, and connection.get_warnings is True, then
        self._warnings will be a list containing these warnings.

        Returns an iterator when multi is True, otherwise None.
        Nr6)rHrxrEryr6r6r7�execute szCursorBase.executezPSequence[Union[Sequence[MySQLConvertibleType], Dict[str, MySQLConvertibleType]]]�rx�
seq_paramsr+cCsdS)a�Execute the given operation multiple times

        The executemany() method will execute the operation iterating
        over the list of parameters in seq_params.

        Example: Inserting 3 new employees and their phone number

        data = [
            ('Jane','555-001'),
            ('Joe', '555-001'),
            ('John', '555-003')
            ]
        stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s')"
        cursor.executemany(stmt, data)

        INSERT statements are optimized by batching the data, that is
        using the MySQL multiple rows syntax.

        Results are discarded. If they are needed, consider looping over
        data using the execute() method.
        Nr6)rHrxr}r6r6r7�executemany:szCursorBase.executemanyz0Optional[Union[RowType, Dict[str, RowItemType]]]cCsdS��yReturn next row of a query result set.

        Returns:
            tuple or None: A row from query result set.
        Nr6rQr6r6r7�fetchoneWszCursorBase.fetchonerrOz,List[Union[RowType, Dict[str, RowItemType]]]��sizer+cCsdS)�<Return the next set of rows of a query result set.

        When no more rows are available, it returns an empty list.
        The number of rows returned can be specified using the size argument,
        which defaults to one.

        Returns:
            list: The next set of rows of a query result set.
        Nr6�rHr�r6r6r7�	fetchmany^szCursorBase.fetchmanycCsdS���Return all rows of a query result set.

        Returns:
            list: A list of tuples with all rows of a query result set.
        Nr6rQr6r6r7�fetchalliszCursorBase.fetchallzIterator[MySQLCursorAbstract]cCsdS)a�Returns an iterator for stored results.

        This method returns an iterator over results which are stored when
        callproc() is called. The iterator will provide `MySQLCursorBuffered`
        instances.

        Examples:
            ```
            >>> cursor.callproc('myproc')
            ()
            >>> for result in cursor.stored_results():
            ...     print result.fetchall()
            ...
            [(1,)]
            [(2,)]
            ```
        Nr6rQr6r6r7�stored_resultspszCursorBase.stored_resultsr
cCsdS�zNot Implemented.Nr6rQr6r6r7�nextset�szCursorBase.nextsetr)�sizesr+cCsdSr�r6)rHr�r6r6r7�
setinputsizes�szCursorBase.setinputsizesN)r��columnr+cCsdSr�r6)rHr�r�r6r6r7�
setoutputsize�szCursorBase.setoutputsizeT��freer+cCsdS)zResets the cursor to defaultNr6�rHr�r6r6r7�reset�szCursorBase.reset�Optional[List[DescriptionType]]cCs|jS)a�Returns description of columns in a result

        This property returns a list of tuples describing the columns in
        in a result set. A tuple is described as follows::

                (column_name,
                 type,
                 None,
                 None,
                 None,
                 None,
                 null_ok,
                 column_flags)  # Addition to PEP-249 specs

        Returns a list of tuples.
        )rirQr6r6r7�description�szCursorBase.descriptioncCs|jS)aReturns the number of rows produced or affected

        This property returns the number of rows produced by queries
        such as a SELECT, or affected rows when executing DML statements
        like INSERT or UPDATE.

        Note that for non-buffered cursors it is impossible to know the
        number of rows produced before having fetched them all. For those,
        the number of rows will be -1 right after execution, and
        incremented when fetching rows.

        Returns an integer.
        )rjrQr6r6r7�rowcount�szCursorBase.rowcount)r6)r6F)r)N)T)rSrTrUrVrg�__annotations__rIrurvr{r~r�r�r�r�r�r�r�r�rWr�r��
__classcell__r6r6rmr7rf�s,
��rfc@s�eZdZdZdlddd�dd�Zdd	�d
d�Zddd�d
d�Zdd	�dd�Zdd	�dd�Zdd	�dd�Z	dd	�dd�Z
dd	�dd�Zddd�dd�Zd d!d�d"d#�Z
d$dd%�d&d'�Zdd	�d(d)�Zd$dd*�d+d,�Zd-d.d/�d0d1�Zdmd3d4dd5d6�d7d8�Zd9d:d;d<�d=d>�Zd9d:d5d<�d?d@�ZdAd	�dBdC�Zdnd9dEdFdG�dHdI�ZdJd	�dKdL�ZdMd	�dNdO�Zdd	�dPdQ�ZdRddS�dTdU�ZdoddVdW�dXdY�ZdVd	�dZd[�ZdpdJd\d]�d^d_�Zd\d	�d`da�Zedbd	�dcdd��Z eded	�dfdg��Z!edd	�dhdi��Z"d9d	�djdk�Z#dS)q�MySQLCursora�Default cursor for interacting with MySQL

    This cursor will execute statements and handle the result. It will
    not automatically fetch all rows.

    MySQLCursor should be inherited whenever other functionallity is
    required. An example would to change the fetch* member functions
    to return dictionaries instead of lists of values.

    Implements the Python Database API Specification v2.0 (PEP-249)
    N�Optional[MySQLConnection]rC��
connectionr+cCs2t�|�d|_d|_d|_|dur.|�|�dS)N�NNF)rfrI�_connection�_nextrow�_binary�_set_connection�rHr�r6r6r7rI�s
zMySQLCursor.__init__zIterator[RowType]rPcCst|jd�S)zm
        Iteration over the result set which calls self.fetchone()
        and returns the next row.
        N)�iterr�rQr6r6r7�__iter__�szMySQLCursor.__iter__r&c	CsBzt�|�|_|j��Wn"ttfy<tdd�d�Yn0dS)zSet the connectioni)�errnoN)�weakref�proxyr�Zis_connected�AttributeError�	TypeErrorrr�r6r6r7r��s
zMySQLCursor._set_connectioncCs<d|_d|_g|_d|_d|_d|_d|_g|_|��dS)zReset the cursor to defaultrhr�Nr)	rjr��_stored_results�	_warnings�_warning_countri�	_executed�_executed_listr�rQr6r6r7�
_reset_result�szMySQLCursor._reset_resultr)cCs$z
|jjWStyYdS0dS)z'Check whether there is an unread resultFN)r��
unread_resultr�rQr6r6r7�_have_unread_result�s
zMySQLCursor._have_unread_resultcCs|jdurtt��dS)zsCheck if the statement has been executed.

        Raises an error if the statement has not been executed.
        N)r�r�ERR_NO_RESULT_TO_FETCHrQr6r6r7�_check_executed�s
zMySQLCursor._check_executedr#cCs2z|��}Wnty$td�Yn0|s.t�|S)zm
        Used for iterating over the result set. Calles self.fetchone()
        to get the next row.
        N)r�r�
StopIteration�rH�rowr6r6r7�__next__�szMySQLCursor.__next__cCs*|jdurdS|j��|��d|_dS)zQClose the cursor

        Returns True when successful, otherwise False.
        NFT)r��handle_unread_resultr�rQr6r6r7rvs

zMySQLCursor.closerz"Dict[bytes, Union[bytes, Decimal]]rDc
Cs�i}zp|jj}|jjj}|jjj}|jjj}|��D]<\}}|}	||	�}	||	|�}	t|t�sd||	�}	|	||�	�<q4Wn4t
y�}
ztd|
���|
�WYd}
~
n
d}
~
00|S)z,Process query parameters given as dictionaryz'Failed processing pyformat-parameters; N)r��sql_mode�	converter�to_mysql�escape�quote�items�
isinstancer�encode�	Exceptionr)rHrE�resr�r�r�r�r`r^�conv�errr6r6r7�_process_params_dicts(




��z MySQLCursor._process_params_dictr z!Tuple[Union[bytes, Decimal], ...]c
s��dd�}zh|jj�|jjj�|jjj�|jjj��fdd�|D�}��fdd�|D�}��fdd�t|�D�}Wn4ty�}ztd|���|�WYd}~n
d}~00t	|�S)zProcess query parameters.Ncsg|]}�|��qSr6r6��.0r^)r�r6r7�
<listcomp>4r:z/MySQLCursor._process_params.<locals>.<listcomp>csg|]}�|���qSr6r6r�)r�r�r6r7r�5r:cs*g|]"\}}t�|t�s"�|�n|�qSr6)r�r)r��ir^)rEr�r6r7r�6s�z%Failed processing format-parameters; )
r�r�r�r�r�r��	enumerater�r�tuple)rHrEr�r�r6)r�rEr�r�r�r7�_process_params*s$


�
��zMySQLCursor._process_paramsr!�r�r+c
Cshz"|d|_|d|_|d|_Wn8ttfyZ}ztd|���d�WYd}~n
d}~00|��dS)z7Handles result of execute() when there is no result set�
affected_rowsZ	insert_id�
warning_countzFailed handling non-resultset; N)rj�_last_insert_idr��KeyErrorr�r�_handle_warnings)rHr�r�r6r6r7�_handle_noresultset@s

&zMySQLCursor._handle_noresultsetcCsdS)z�Handles result set

        This method handles the result set and is called after reading
        and storing column information in _handle_result(). For non-buffering
        cursors, this method is usually doing nothing.
        Nr6rQr6r6r7�_handle_resultsetKszMySQLCursor._handle_resultset��resultr+cCs^t|t�std��d|vr6|d|_d|j_|��n$d|vrRd|j_|�|�ntd��dS)z�
        Handle the result after a command was send. The result can be either
        an OK-packet or a dictionary containing column/eof information.

        Raises InterfaceError when result is not a dict() or result is
        invalid.
        zResult was not a dict()�columnsTr�FzInvalid resultN)r��dictrrir�r�r�r��rHr�r6r6r7�_handle_resultSs


zMySQLCursor._handle_resultz!Generator[ResultType, None, None]z"Generator[MySQLCursor, None, None])�
query_iterr+ccs�t|jd�}d|_|r|��nd}|D]V}|��|�|�t|�rFq&|��|_|V|���d�rld|vr&|rx|��nd}q&dS)a�	Generator returns MySQLCursor objects for multiple statements

        This method is only used when multiple statements are executed
        by the `cursor.execute(multi_stmt_query, multi=True)` method.

        It matches the given `query_iter` (result of `MySQLConnection.cmd_query_iter()`)
        and the list of statements that were executed.

        How does this method work? To properly map each statement (stmt) to a result,
        the following facts must be considered:

        1. Read operations such as `SELECT` produce a non-empty result
            (calling `next(query_iter)` gets a result that includes at least one column).
        2. Write operatios such as `INSERT` produce an empty result
            (calling `next(query_iter)` gets a result with no columns - aka empty).
        3. End-of-line (EOL) comments do not produce a result, unless is the last stmt
            in which case produces an empty result.
        4. Calling procedures such as `CALL my_proc` produce a sequence `(1)*0` which
            means it may produce zero or more non-empty results followed by just one
            empty result. In other words, a callproc stmt always terminates with an
            empty result. E.g., `my_proc` includes an update + select + select + update,
            then the result sequence will be `110` - note how the write ops results get
            annulated, just the read ops results are produced. Other examples:
                * insert + insert -> 0
                * select + select + insert + select -> 1110
                * select -> 10
            Observe how 0 indicates the end of the result sequence. This property is
            vital to know what result corresponds to what callproc stmt.

        In this regard, the implementation is composed of:
        1. Parsing: the multi-statement is broken down into single statements, and then
            for each of these, leading white spaces are removed (including
            jumping line, vertical line, tab, etc.). Also, EOL comments are removed from
            the stream, except when the comment is the last statement of the
            multi-statement string.
        2. Mapping: the facts described above as used as "game rules" to properly match
        statements and results. In case, if we run out of statements before running out
        of results we use a sentinel named "stmt_overflow!" to indicate that the mapping
        went wrong.

        Acronyms
            1: a non-empty result
            2: an empty result
        )r9Nsstmt_overflow!sCALLr�)	rAr�r=r�r�r8�rstrip�upperr2)rHr�r@r*r�r6r6r7�
_execute_iterjs/

zMySQLCursor._execute_iterFr$�"Optional[ParamsSequenceOrDictType]z,Optional[Generator[MySQLCursor, None, None]]rwc
Cs�|sdSz|jst�Wn2ttfyH}ztd�|�WYd}~n
d}~00|j��|��d}z&t|ttf�s�|�|jj	�}n|}Wn6t
tfy�}ztt|��|�WYd}~n
d}~00|�r<t|t
�r�t||�|��}n\t|ttf��r t|�|��}t�||�}|jdk�r<td��ntdt|�j�d|�d���||_|�r`g|_|�|j�|��Sz|�|j�|��Wn<t�y�}z"|jj �r�td	�|��WYd}~n
d}~00dS)
rzNzCursor is not connected�r�1Not all parameters were used in the SQL statementzCould not process parameters: r'z)), it must be of type list, tuple or dictz1Use multi=True when executing multiple statements)!r�r�ReferenceErrorr�r�r�r(�	bytearrayr��python_charset�UnicodeDecodeError�UnicodeEncodeErrorror�rer��listr�rBr��RE_PY_PARAMrdrR�typerSr�r�r��cmd_query_iterr�Z	cmd_queryrZhave_next_result)rHrxrEryr�r*�psubr6r6r7r{�sX 
$
��
��zMySQLCursor.executeroz"Sequence[ParamsSequenceOrDictType]zOptional[bytes]r|c
Cszddd�dd�}t�tdt�t||��}t�t|�}|s@td��|�d��|j	j
�}g}z�|�|j	j
�}|D]Z}	|}t|	t�r�t
||�|	��}n,t|�|	��}
t�|
|�}|
jd	kr�td
��|�|�ql||vr�|�|d�|�d�}||_|WSWdSttf�y,}ztt|��|�WYd}~nRd}~0t�y@�Yn6t�yt}ztd
|���d�WYd}~n
d}~00dS)zImplements multi row insertrJro)�matchr+cSs|�d�rdS|�d�S)aRemove comments from INSERT statements.

            This function is used while removing comments from INSERT
            statements. If the matched string is a comment not enclosed
            by quotes, it returns an empty string, else the string itself.
            rr�r-)�group)r�r6r6r7�remove_comments�s
z2MySQLCursor._batch_insert.<locals>.remove_commentsr�zAFailed rewriting statement for multi-row INSERT. Check SQL syntaxrrr��,N� Failed executing the operation; )�rerd�RE_SQL_ON_DUPLICATE�RE_SQL_COMMENT�search�RE_SQL_INSERT_VALUESrr�r�r�r�r�r�rer�rBr�r�rRrr?rb�joinr�r�r�rorr�)rHrxr}r��tmp�matches�fmt�valuesr*rEr�r�r6r6r7�
_batch_insert�sJ��

�"zMySQLCursor._batch_insertc
Cs|r|sdS|j��zt|�}Wn.tyP}ztd�|�WYd}~n
d}~00t�t|�r�|sld|_dS|�	||�}|dur�||_
|�|�Sd}z:|D]0}|�||�|jr�|�
�r�|��||j7}q�Wn:ttf�y}ztd|���d�WYd}~n
d}~00||_dS)a�Execute the given operation multiple times

        The executemany() method will execute the operation iterating
        over the list of parameters in seq_params.

        Example: Inserting 3 new employees and their phone number

        data = [
            ('Jane','555-001'),
            ('Joe', '555-001'),
            ('John', '555-003')
            ]
        stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s)"
        cursor.executemany(stmt, data)

        INSERT statements are optimized by batching the data, that is
        using the MySQL multiple rows syntax.

        Results are discarded. If they are needed, consider looping over
        data using the execute() method.
        Nz(Parameters for query must be an Iterablerr�)r�r�r�r�rr�r��RE_SQL_INSERT_STMTrjr�r�r{�	with_rowsr�r�r]r)rHrxr}�_r�r*�rowcntrEr6r6r7r~-s4
 
&zMySQLCursor.executemanyzIterator[MySQLCursor]cCs
t|j�S)z�Returns an iterator for stored results

        This method returns an iterator over results which are stored when
        callproc() is called. The iterator will provide MySQLCursorBuffered
        instances.

        Returns a iterator.
        )r�r�rQr6r6r7r�ds	zMySQLCursor.stored_resultsr6rrprqc
Cst|rt|t�std��t|ttf�s,td��d}g|_g}�z�g}g}|�d�d}|r�g}t|�D]n\}	}
|j||	dd�}|�	|�t|
t�r�|�	d|�d	|
d�d
��|�	|
d�qd|�	|�|�	|
�qdd�
d
d�|D��}|�d|��|�d|�dd�
|��d
�}
|jj
}|j�|
�D]�}d|j_
t|ttf��rHt}n(t|ttf��r^t}n|j�rlt}nt}||j���}d|
�d
�|_|�|�|jdu�r�|j|_d|v�r&|�	|��q&||j_
|�rdd�t|dd�|D��D�}dd�
|���}|�|�||_|��WS||_t�WSt�y:�Yn6t�yn}ztd|���d�WYd}~n
d}~00dS)a�Calls a stored procedure with the given arguments

        The arguments will be set during this session, meaning
        they will be called like  _<procname>__arg<nr> where
        <nr> is an enumeration (+1) of the arguments.

        Coding Example:
          1) Defining the Stored Routine in MySQL:
          CREATE PROCEDURE multiply(IN pFac1 INT, IN pFac2 INT, OUT pProd INT)
          BEGIN
            SET pProd := pFac1 * pFac2;
          END

          2) Executing in Python:
          args = (5, 5, 0)  # 0 is to hold pprod
          cursor.callproc('multiply', args)
          print(cursor.fetchone())

        For OUT and INOUT parameters the user should provide the
        type of the parameter as well. The argument should be a
        tuple with first item as the value of the parameter to pass
        and second argument the type of the argument.

        In the above example, one can call callproc method like:
          args = (5, 5, (0, 'INT'))
          cursor.callproc('multiply', args)

        The type of the argument given in the tuple will be used by
        the MySQL CAST function to convert the values in the corresponding
        MySQL type (See CAST in MySQL Reference for more information)

        Does not return a value, but a result set will be
        available when the CALL-statement execute successfully.
        Raises exceptions when something is wrong.
        zprocname must be a stringzargs must be a sequencez@_{name}_arg{index}�.rhr)�namerGz CAST(� AS �)r�,css|]}|�d�VqdS)z=%sNr6�r��argr6r6r7�	<genexpr>�r:z'MySQLCursor.callproc.<locals>.<genexpr>zSET zCALL r'Fz
(a result of Nr�cSsg|]\}}|�d|���qS)rr6)r�r�aliasr6r6r7r��s�z(MySQLCursor.callproc.<locals>.<listcomp>cSsg|]}|�d��qS)z@_)r>rr6r6r7r��r:zSELECT zFailed calling stored routine; ) r�ror]r�r�r�r<r��formatr?r�r{r��can_consume_resultsr��MySQLCursorDict�MySQLCursorBufferedDict�MySQLCursorNamedTuple�MySQLCursorBufferedNamedTuplerg�MySQLCursorBufferedRaw�MySQLCursorBufferedZget_selfr�r��warningsr��zipr�rr�r)rHrrrsZargfmt�results�argnames�argtypesZprocname_absZ	argvalues�idxr�argnameZplaceholders�callrr�Zcursor_class�cur�selectr�r6r6r7ruosz(


�

��

zMySQLCursor.callproc�
Optional[int]cCs|jS)z�Returns the value generated for an AUTO_INCREMENT column

        Returns the value generated for an AUTO_INCREMENT column by
        the previous INSERT or UPDATE statement.

        Returns a long value or None.
        )r�rQr6r6r7�getlastrowid�szMySQLCursor.getlastrowidzOptional[List[WarningType]]c
Csrg}z,|jjdd�}|�d�|��}|��Wn4tyd}ztd|���d�WYd}~n
d}~00|rn|SdS)z�
        Fetch warnings doing a SHOW WARNINGS. Can be called after getting
        the result.

        Returns a result set or None when there were no warnings.
        F��rawz
SHOW WARNINGSzFailed getting warnings; N)r��cursorr{r�rvr�r)rHr�rr�r6r6r7�_fetch_warnings�s
&zMySQLCursor._fetch_warningscCsh|jjr|jr|��|_|js"dSt|jdd|jdd|jjd�}|jjrV|�tj|dd�dS)z�Handle possible warnings after all results are consumed.

        Raises:
            Error: Also raises exceptions if raise_on_warnings is set.
        Nrrr-)�warning�)�
stacklevel)	r�Zget_warningsr�r!r�rZraise_on_warningsr�warn)rHr�r6r6r7r�	s
�zMySQLCursor._handle_warningsr��eofr+cCs$d|j_d|_|d|_|��dS)zHandle EOF packetFr�r�N)r�r�r�r�r��rHr'r6r6r7�_handle_eof s
zMySQLCursor._handle_eof�Optional[RowType]�rr+cCs�|��sdSd}|jdkr6|jj|j|j|d�\}}n
|j\}}|r�|jj|j|j|d�|_|jd}|durx|�|�|jdkr�d|_n|jd7_|r�|�|�|S)zQReturns the next row in the result set

        Returns a tuple or None.
        Nr�)�binaryr�rrrh)r�r�r�Zget_rowr�r�r)rj)rHrr�r'r6r6r7�
_fetch_row's*

�

�



zMySQLCursor._fetch_rowcCs|��|��S�r��r�r-rQr6r6r7r�GszMySQLCursor.fetchone�
List[RowType]r�cCsJ|��g}|p|j}|dkrF|��rF|d8}|��}|r|�|�q|S�r�rr)r�rkr�r�r?�rHr�r�Zcntr�r6r6r7r�Ps

zMySQLCursor.fetchmanycCsz|��|��sgS|j��\}}|jdr>|�d|jd�|�|�t|�}|dkrh|jdkrhd|_|j|7_|S)r�rrh�	r�r�r��get_rowsr��insertr)r1rj�rH�rowsr'r�r6r6r7r�ds

zMySQLCursor.fetchallzTuple[str, ...]cCs |jst�Stdd�|jD��S)ztReturns column names

        This property returns the columns names as a tuple.

        Returns a tuple.
        css|]}|dVqdS)rNr6)r��dr6r6r7r�r:z+MySQLCursor.column_names.<locals>.<genexpr>)r�r�rQr6r6r7�column_namesyszMySQLCursor.column_namesz
Optional[str]c	CsF|jdurdSz|j���d�WSttfy@|j��YS0dS)z�Returns the executed statement

        This property returns the executed statement. When multiple
        statements were executed, the current statement in the iterator
        will be returned.
        N�utf-8)r��strip�decoder�r�rQr6r6r7�	statement�s
zMySQLCursor.statementcCs|js
dSdS)z�Returns whether the cursor could have rows returned

        This property returns True when column descriptions are available
        and possibly also rows, which will need to be fetched.

        Returns True or False.
        FT)r�rQr6r6r7r��s	zMySQLCursor.with_rowscCshd}|jrRz|j�d�}Wnty2|j}Yn0t|�dkrV|dd�d}nd}|j|jj|d�S)Nz{class_name}: {stmt}r:�(z..z(Nothing executed yet))�
class_namer*)r�r<r�r1r
rnrS)rHr�Zexecutedr6r6r7�__str__�szMySQLCursor.__str__)N)NF)r6)F)N)$rSrTrUrVrIr�r�r�r�r�r�rvr�r�r�r�r�r�r{r�r~r�rurr!r�r)r-r�r�r�rWr9r=r�r@r6r6r6r7r��sL
B�L87�{
 	r�cs�eZdZdZd ddd��fdd�
Zdd�d	d
�Zd!ddd
�dd�Zd"ddd�dd�Zdd�dd�Zdd�dd�Z	d#ddd�dd�Z
edd�dd��Z�Z
S)$rz*Cursor which fetches rows within execute()Nr�rCr�cst��|�d|_d|_dSrF)rlrI�_rows�	_next_rowr�rmr6r7rI�szMySQLCursorBuffered.__init__rPcCsP|j��\|_}t|j�|_|�|�d|_zd|j_WntyJYn0dS)NrF)	r�r4rAr1rjr)rBr�r�r(r6r6r7r��s
z%MySQLCursorBuffered._handle_resultsetTr)r�cCs
d|_dS�N�rAr�r6r6r7r��szMySQLCursorBuffered.resetFr*r+c	Cs@d}z|j|j}Wnttfy,YdS0|jd7_|S)Nr)rArBrMr�)rHrr�r6r6r7r-�szMySQLCursorBuffered._fetch_rowcCs|��|��Sr.r/rQr6r6r7r��szMySQLCursorBuffered.fetchoner0cCs@|jdus|jdurtt��g}|j|jd�}t|j�|_|Sr�)r�rArr�rBr1�rHr�r6r6r7r��szMySQLCursorBuffered.fetchallrr�cCsB|��g}|p|j}|dkr>|d8}|��}|r|�|�q|Sr1)r�rkr�r?r2r6r6r7r��s

zMySQLCursorBuffered.fetchmanycCs
|jduSrCrDrQr6r6r7r��szMySQLCursorBuffered.with_rows)N)T)F)N)rSrTrUrVrIr�r�r-r�r�r�rWr�r�r6r6rmr7r�s
		
rc@s:eZdZUdZdZded<dd�dd�Zd	d�d
d�ZdS)
�MySQLCursorRawzS
    Skips conversion from MySQL datatypes to Python types when fetching rows.
    Tr)rgr*rPcCs|��|jdd�S)r�Trr/rQr6r6r7r�szMySQLCursorRaw.fetchoner0cCs~|��|��sgS|jjdd�\}}|jdrB|�d|jd�|�|�t|�}|dkrl|jdkrld|_|j|7_|S)r�Trrrhr3r6r6r6r7r�
s

zMySQLCursorRaw.fetchallN)rSrTrUrVrgr�r�r�r6r6r6r7rF�s
	rFc@sZeZdZUdZdZded<dd�dd�Zd	d�d
d�Zdd�d
d�Ze	dd�dd��Z
dS)rz�
    Cursor which skips conversion from MySQL datatypes to Python types when
    fetching rows and fetches rows within execute().
    Tr)rgrCrPcCsV|jj|jd�\|_}t|j�|_|�|�d|_zd|j_Wnt	yPYn0dS)NrrF)
r�r4rgrAr1rjr)rBr�r�r(r6r6r7r�)s
z(MySQLCursorBufferedRaw._handle_resultsetr*cCs|��|��Sr.r/rQr6r6r7r�3szMySQLCursorBufferedRaw.fetchoner0cCs|��t|j|jd��Sr�)r�r�rArBrQr6r6r7r�<szMySQLCursorBufferedRaw.fetchallcCs
|jduSrCrDrQr6r6r7r�Esz MySQLCursorBufferedRaw.with_rowsN)rSrTrUrVrgr�r�r�r�rWr�r6r6r6r7r!s

		rcseZdZdZd=dd��fdd�
Zd>dd	d
�dd�Zd
d	d��fdd�Zdd	d�dd�Zdd	d��fdd�Zd?dddd�dd�Z	d	d��fd d!�Z
d@dddd"�d#d$�Zd
d	d%�d&d'�ZdAd)d*dd	d+�d,d-�Z
d.d/d	d0�d1d2�Zd3d�d4d5�ZdBd6d7d8�d9d:�Zd7d�d;d<�Z�ZS)C�MySQLCursorPreparedz&Cursor using MySQL Prepared StatementsNr�)r�cs:t��|�d|_d|_d|_d|_d|_d|_d|_dS)NrTF)	rlrIrArB�	_preparedr��_have_result�_last_row_sent�_cursor_existsr�rmr6r7rIMszMySQLCursorPrepared.__init__Tr)rCr�cCsF|jr6z|j�|jd�Wnty.Yn0d|_d|_d|_dS)N�statement_idF)rHr��cmd_stmt_closerrJrKr�r6r6r7r�WszMySQLCursorPrepared.resetr!r�c	s*|�|�d|�dd���t��|�dS�N�status_flag�
server_statusr)�_handle_server_status�getrlr�rErmr6r7r�bsz'MySQLCursorPrepared._handle_noresultsetrO)�flagsr+cCs$|tj@dk|_|tj@dk|_dS)zoCheck for SERVER_STATUS_CURSOR_EXISTS and
        SERVER_STATUS_LAST_ROW_SENT flags set by the server.
        rN)rZSTATUS_CURSOR_EXISTSrKZSTATUS_LAST_ROW_SENTrJ)rHrSr6r6r7rQfsz)MySQLCursorPrepared._handle_server_statusrr&c	s*|�|�d|�dd���t��|�dSrN)rQrRrlr)r(rmr6r7r)mszMySQLCursorPrepared._handle_eofr6rr
rqcCs
t��dS)zQCalls a stored procedue

        Not supported with MySQLCursorPrepared.
        N)rrtr6r6r7ruqszMySQLCursorPrepared.callprocrPcs|��t���dS)zzClose the cursor

        This method will try to deallocate the prepared statement and close
        the cursor.
        N)r�rlrvrQrmr6r7rvxszMySQLCursorPrepared.close��rowdata�descr+cCsdS)z�Convert row data from MySQL to Python types

        The conversion is done while reading binary data in the
        protocol module.
        Nr6�rHrUrVr6r6r7�_row_to_python�sz"MySQLCursorPrepared._row_to_pythonr�cCs~t|t�r$d|j_d|_|�|�nV|d|_d|j_d|_d|dvr\|�|dd�nd|dvrz|�|dd�dS)zHandle result after executionFrTrOr-rPN)r�r�r�r�rIr�rirQr�r6r6r7r��s

z"MySQLCursorPrepared._handle_resultFr$r�rwc
s@|jj}|dkrd}t|t�s`z|�|�}Wn2ty^}ztt|��|�WYd}~n
d}~00t�t�r�t�	t
|�}zt�fdd�|D���Wn.ty�}ztd�|�WYd}~n
d}~00t�
td|�}||ju�r�|jr�|j�|jd�||_z|�|�}Wn4t�y:}ztt|��|�WYd}~n
d}~00d	|v�rTt�
td
|�}z|j�|�|_Wnt�y�d|_�Yn0|j�|jd�|jd�r���s�dS��rt�ttf��s�tdd
t��j�d��d�d��t|jd�t��k�rtddd���du�rd�|jj|jd�|jdd�}|�|�dS)a4Prepare and execute a MySQL Prepared Statement

        This method will prepare the given operation and execute it using
        the optionally given parameters.

        If the cursor instance already had a prepared statement, it is
        first closed.

        Note: argument "multi" is unused.
        Zutf8mb4�utf8Nc3s|]}�|VqdSrCr6)r�r`�rEr6r7r�r:z.MySQLCursorPrepared.execute.<locals>.<genexpr>z6Not all placeholders were found in the parameters dict�?rLs%s�?�
parametersi�zIncorrect type of argument: r'zP), it must be of type tuple or list the argument given to the prepared statement)r��msgz:Incorrect number of arguments executing prepared statementr6)�datar])r��charsetr�ror<r�rr�r��findall� RE_SQL_PYTHON_CAPTURE_PARAM_NAMEr�r�rd�RE_SQL_PYTHON_REPLACE_PARAMr�rHrMr�r��RE_SQL_FIND_PARAMZcmd_stmt_preparerZcmd_stmt_resetr�r�rSr1Zcmd_stmt_executer�)rHrxrEryr`r�Zreplacement_keysr�r6rZr7r{�sp
$
��$
��
�zMySQLCursorPrepared.executerozSequence[ParamsSequenceType]r|c
Cs�d}z:|D]0}|�||�|jr0|��r0|��||j7}q
Wn8ttfyv}ztd|���d�WYd}~n
d}~00||_dS)aDPrepare and execute a MySQL Prepared Statement many times

        This method will prepare the given operation and execute with each
        tuple found the list seq_params.

        If the cursor instance already had a prepared statement, it is
        first closed.

        executemany() simply calls execute().
        rr�N)r{r�r�r�rjr]r�r)rHrxr}rrEr�r6r6r7r~�s&zMySQLCursorPrepared.executemanyr*cCs,|��|jr |j�|jd�|��p*dS)r�rLN)r�rKr��cmd_stmt_fetchrHr-rQr6r6r7r�szMySQLCursorPrepared.fetchonerr0r�cCsJ|��g}|p|j}|dkrF|��rF|d8}|��}|r|�|�q|Sr1)r�rkr�r-r?r2r6r6r7r�s

zMySQLCursorPrepared.fetchmanycCs�|��g}|jdr&|�|jd�|��rv|jrH|j�|jdt�|jj	|j
|jd�\}}|�|�|�
|�q&t|�|_|S)r�rrL)r,r�)r�r�r?r�rKr�rerH�MAX_RESULTSr4r�r��extendr)r1rj�rHr7r�r'r6r6r7r�&s 

��


zMySQLCursorPrepared.fetchall)N)T)r6)N)NF)N)rSrTrUrVrIr�r�rQr)rurvrXr�r{r~r�r�r�r�r6r6rmr7rGJs"
	�UrGcsLeZdZdZddddd�dd�Zdd	��fd
d�Zdd	��fd
d�Z�ZS)rz�
    Cursor fetching rows as dictionaries.

    The fetch methods of this class will return dictionaries instead of tuples.
    Each row is a dictionary that looks like:
        row = {
            "col1": value1,
            "col2": value2
        }
    Nr#r�� Optional[Dict[str, RowItemType]]rTcCs|rtt|j|��SdS)zWConvert a MySQL text result row to Python types

        Returns a dictionary.
        N)r�rr9rWr6r6r7rXJs	zMySQLCursorDict._row_to_pythonrPcs|�t���|j�S)zyReturn next row of a query result set.

        Returns:
            dict or None: A dict from query result set.
        )rXrlr�r�rQrmr6r7r�UszMySQLCursorDict.fetchone�&List[Optional[Dict[str, RowItemType]]]cs�fdd�t���D�S)z�Return all rows of a query result set.

        Returns:
            list: A list of dictionaries with all rows of a query
                  result set where column names are used as keys.
        csg|]}|r��|�j��qSr6�rXr��r�r�rQr6r7r�ds�z,MySQLCursorDict.fetchall.<locals>.<listcomp>�rlr�rQrmrQr7r�]s
�zMySQLCursorDict.fetchall)N�rSrTrUrVrXr�r�r�r6r6rmr7r>s
�rcsLeZdZdZddddd�dd�Zdd	��fd
d�Zdd	��fd
d�Z�ZS)rz�
    Cursor fetching rows as named tuple.

    The fetch methods of this class will return namedtuples instead of tuples.
    Each row is returned as a namedtuple and the values can be accessed as:
    row.col1, row.col2
    Nr#r�r*rTcCsP|}|rLt|j�}zt|}Wn$tyBtd|�}|t|<Yn0||�SdS)zXConvert a MySQL text result row to Python types

        Returns a named tuple.
        ZRowN)r�r9rr�r)rHrUrVr�r�Znamed_tupler6r6r7rXts	

z$MySQLCursorNamedTuple._row_to_pythonrPcs0t���}|sdSt|jd�r,|�||j�S|S)r�Nr�)rlr��hasattrr�rXr�r�rmr6r7r��s

��zMySQLCursorNamedTuple.fetchone�List[Optional[RowType]]cs�fdd�t���D�S)r�csg|]}|r��|�j��qSr6rkrlrQr6r7r��s�z2MySQLCursorNamedTuple.fetchall.<locals>.<listcomp>rmrQrmrQr7r��s
�zMySQLCursorNamedTuple.fetchall)Nrnr6r6rmr7rks
�rc@s,eZdZdZdd�dd�Zdd�dd�Zd	S)
r
z8
    Buffered Cursor fetching rows as dictionaries.
    rirPcCs&|��|��}|r"|�||j�SdSr�r�r-rXr�r�r6r6r7r��s
z MySQLCursorBufferedDict.fetchonerjcCsZ|jdus|jdurtt��g}|j|jd�D]}|�|�||j��q0t|j�|_|Sr��	r�rArr�rBr?rXr�r1�rHr�r�r6r6r7r��sz MySQLCursorBufferedDict.fetchallN�rSrTrUrVr�r�r6r6r6r7r
�sr
c@s,eZdZdZdd�dd�Zdd�dd�Zd	S)
rz7
    Buffered Cursor fetching rows as named tuple.
    r*rPcCs&|��|��}|r"|�||j�SdSrrqr�r6r6r7r��s
z&MySQLCursorBufferedNamedTuple.fetchonerpcCsZ|jdus|jdurtt��g}|j|jd�D]}|�|�||j��q0t|j�|_|Sr�rrrsr6r6r7r��sz&MySQLCursorBufferedNamedTuple.fetchallNrtr6r6r6r7r�srcs*eZdZdZdddd��fdd�
Z�ZS)	�MySQLCursorPreparedDicta�
    This class is a blend of features from MySQLCursorDict and MySQLCursorPrepared

    Multiple inheritance in python is allowed but care must be taken
    when assuming methods resolution. In the case of multiple
    inheritance, a given attribute is first searched in the current
    class if it's not found then it's searched in the parent classes.
    The parent classes are searched in a left-right fashion and each
    class is searched once.
    Based on python's attribute resolution, in this case, attributes
    are searched as follows:
    1. MySQLCursorPreparedDict (current class)
    2. MySQLCursorDict (left parent class)
    3. MySQLCursorPrepared (right parent class)
    4. MySQLCursor (base class)
    NrzList[Dict[str, RowItemType]]r�cs�fdd�t�j|d�D�S)a�Return the next set of rows of a query result set.

        When no more rows are available, it returns an empty list.
        The number of rows returned can be specified using the size argument,
        which defaults to one.

        Returns:
            list: The next set of rows of a query result set represented
                  as a list of dictionaries where column names are used as keys.
        csg|]}|r��|�j��qSr6rkrlrQr6r7r�s�z5MySQLCursorPreparedDict.fetchmany.<locals>.<listcomp>�r��rlr�r�rmrQr7r��s
�z!MySQLCursorPreparedDict.fetchmany)N�rSrTrUrVr�r�r6r6rmr7ru�srucs*eZdZdZdddd��fdd�
Z�ZS)	�MySQLCursorPreparedNamedTuplez^
    This class is a blend of features from MySQLCursorNamedTuple and MySQLCursorPrepared
    Nrr0r�cs�fdd�t�j|d�D�S)a�Return the next set of rows of a query result set.

        When no more rows are available, it returns an empty list.
        The number of rows returned can be specified using the size argument,
        which defaults to one.

        Returns:
            list: The next set of rows of a query result set represented
                  as a list of named tuples where column names are used as names.
        csg|]}|r��|�j��qSr6rkrlrQr6r7r�s�z;MySQLCursorPreparedNamedTuple.fetchmany.<locals>.<listcomp>rvrwr�rmrQr7r�s
�z'MySQLCursorPreparedNamedTuple.fetchmany)Nrxr6r6rmr7ry	sryc@sLeZdZUdZdZded<dd�dd�Zdd
dd�d
d�Zdd�dd�Zd	S)�MySQLCursorPreparedRawzW
    This class is a blend of features from MySQLCursorRaw and MySQLCursorPrepared
    Tr)rgr*rPcCs2|��|jr |j�|jd�|j|jd�p0dS)r�rLrN)r�rKr�rerHr-rgrQr6r6r7r�'szMySQLCursorPreparedRaw.fetchoneNrr0r�cCsP|��g}|p|j}|dkrL|��rL|d8}|j|jd�}|r|�|�q|S)r�rrr)r�rkr�r-rgr?r2r6r6r7r�2s

z MySQLCursorPreparedRaw.fetchmanycCs�|��g}|jdr&|�|jd�|��rz|jrH|j�|jdt�|jj	|j
|j|jd�\}}|�
|�|�|�q&t|�|_|S)r�rrL)rr,r�)r�r�r?r�rKr�rerHrfr4rgr�r�rgr)r1rjrhr6r6r7r�Fs 

��


zMySQLCursorPreparedRaw.fetchall)N)	rSrTrUrVrgr�r�r�r�r6r6r6r7rz s

rz)UrV�
__future__rr�r3rr��collectionsrr�decimalr�typingrrrr	r
rrr
rrrrZ	abstractsrr�	constantsr�errorsrrrrr�typesrrrrrr r!r"r#r$r%r�r&ZSQL_COMMENT�compile�I�M�Sr�r�r�r�r��Xrcr;rdrcrbr�rfr8rArBrerfr�rrFrrGrrr
rruryrzr6r6r6r7�<module>s�84���
��


% DN$)u-:  $

Youez - 2016 - github.com/yon3zu
LinuXploit