/opt/cloudlinux/venv/lib/python3.11/site-packages/psycopg2/__pycache__
NameSizeModeActions
errorcodes.cpython-311.pyc145250644editdlrm
errors.cpython-311.pyc5980644editdlrm
extensions.cpython-311.pyc92320644editdlrm
extras.cpython-311.pyc682930644editdlrm
pool.cpython-311.pyc83150644editdlrm
sql.cpython-311.pyc205520644editdlrm
tz.cpython-311.pyc64570644editdlrm
_ipaddress.cpython-311.pyc29360644editdlrm
_json.cpython-311.pyc80020644editdlrm
_range.cpython-311.pyc227040644editdlrm
__init__.cpython-311.pyc41170644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/psycopg2/__pycache__/extras.cpython-311.pyc (68293B)
§ à^ÿ²�p�ãó—dZddlZddlZddlZddlmZm Z ddl Z ddl Z ddl m Zddl mZddl mZddl mZmZdd lmZdd lmZmZmZmZmZdd l m!Z!m"Z"m#Z#m$Z$m%Z%dd l&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.dd l/m0Z0Gd„de¦«Z1Gd„de¦«Z2Gd„de1¦«Z3Gd„de4¦«Z5Gd„de¦«Z6Gd„de1¦«Z7Gd„de ¦«Z8Gd„de¦«Z9Gd„de¦«Z:ed ¦«d!„¦«Z;eGd&„d'e=¦«Z?Gd(„d)e>¦«Z@Gd*„d+e¦«ZAGd,„d-e¦«ZBGd.„d/eC¦«ZDGd0„d1e¦«ZGd2„d3¦«ZEdId4„ZFGd5„d6¦«ZGdId7„ZHd8„ZId9„ZJGd:„d;¦«ZK dJd=„ZLGd>„d?¦«ZMdKd@„ZNdA„ZOdLdC„ZPdMdD„ZQdE„ZRejSdFejTdG¦«zdHz¦«ZUdS)Nz§Miscellaneous goodies for psycopg2 This module is a generic place used to hold little helper functions and classes until a better place in the distribution is found. éN)Ú namedtupleÚ OrderedDict)Ú extensionsé)Úcursor)Ú connection)ÚadaptÚ quote_ident)Ú lru_cache)ÚREPLICATION_PHYSICALÚREPLICATION_LOGICALÚReplicationConnectionÚReplicationCursorÚReplicationMessage)ÚjsonÚJsonÚ register_jsonÚregister_default_jsonÚregister_default_jsonb)ÚRangeÚ NumericRangeÚ DateRangeÚ DateTimeRangeÚDateTimeTZRangeÚregister_rangeÚ RangeAdapterÚ RangeCaster)Úregister_ipaddresscóL‡—eZdZdZˆfd„Zˆfd„Zdˆfd„ Zˆfd„Zˆfd„ZˆxZ S) ÚDictCursorBasez%Base class for all dict-like cursors.c󢕗d|vr |d}|d=ntd¦«‚t¦«j|i|¤Žd|_d|_||_dS)NÚ row_factoryz;DictCursorBase can't be instantiated without a row factory.F)ÚNotImplementedErrorÚsuperÚ__init__Ú_query_executedÚ _prefetchr")ÚselfÚargsÚkwargsr"Ú __class__s €úc/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib64/python3.11/site-packages/psycopg2/extras.pyr%zDictCursorBase.__init__Dstø€Ø ˜FÐ "Ð "Ø  Ô/ˆKØ�}Ð%Ð%å%ØMñOôOð Oà�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ø$ˆÔ؈ŒØ&ˆÔÐÐócóÚ•—|jr t¦« ¦«}|jr| ¦«|js t¦« ¦«}|S©N)r'r$Úfetchoner&Ú _build_index©r(Úresr+s €r,r0zDictCursorBase.fetchonePócø€Ø Œ>ð %Ý‘'”'×"Ò"Ñ$Ô$ˆCØ Ô ð Ø × Ò Ñ Ô Ð ØŒ~ð %Ý‘'”'×"Ò"Ñ$Ô$ˆC؈ r-NcóÞ•—|jr!t¦« |¦«}|jr| ¦«|js!t¦« |¦«}|Sr/)r'r$Ú fetchmanyr&r1)r(Úsizer3r+s €r,r6zDictCursorBase.fetchmanyYsgø€Ø Œ>ð *Ý‘'”'×#Ò# DÑ)Ô)ˆCØ Ô ð Ø × Ò Ñ Ô Ð ØŒ~ð *Ý‘'”'×#Ò# DÑ)Ô)ˆC؈ r-cóÚ•—|jr t¦« ¦«}|jr| ¦«|js t¦« ¦«}|Sr/)r'r$Úfetchallr&r1r2s €r,r9zDictCursorBase.fetchallbr4r-c#óh•K— |jr/t¦« ¦«}t|¦«}|jr| ¦«|js/t¦« ¦«}t|¦«}|V— t|¦«V—Œ#t $rYdSwxYwr/)r'r$Ú__iter__Únextr&r1Ú StopIteration)r(r3Úfirstr+s €r,r;zDictCursorBase.__iter__ksÁøèè€ð ØŒ~ð "Ý‘g”g×&Ò&Ñ(Ô(�ݘS™ œ �ØÔ#ð $Ø×!Ò!Ñ#Ô#Ð#Ø”>ð "Ý‘g”g×&Ò&Ñ(Ô(�ݘS™ œ �àˆKˆKˆKð ݘ3‘i”i���ð øåð ð ð Ø ˆFˆFð øøøs…BB#Â# B1Â0B1r/) Ú__name__Ú __module__Ú __qualname__Ú__doc__r%r0r6r9r;Ú __classcell__©r+s@r,r r As§ø€€€€€Ø/Ð/ð 'ð 'ð 'ð 'ð 'ðððððððððððððððððððððððððr-r có"‡—eZdZdZˆfd„ZˆxZS)ÚDictConnectionz2A connection that uses `DictCursor` automatically.cóz•—| d|jpt¦«t¦«j|i|¤ŽS©NÚcursor_factory)Ú setdefaultrIÚ DictCursorr$r©r(r)r*r+s €r,rzDictConnection.cursors=ø€Ø×ÒÐ*¨DÔ,?Ð,MÅ:ÑNÔNÐNØ�u‰wŒwŒ~˜tÐ. vÐ.Ð.Ð.r-©r?r@rArBrrCrDs@r,rFrF}s>ø€€€€€Ø<Ð<ð/ð/ð/ð/ð/ð/ð/ð/ð/r-rFcó@‡—eZdZdZˆfd„Zdˆfd„ Zdˆfd„ Zd„ZˆxZS)rKz‚A cursor that keeps a list of column name -> index mappings__. .. __: https://docs.python.org/glossary.html#term-mapping có\•—t|d<t¦«j|i|¤Žd|_dS)Nr"T)ÚDictRowr$r%r'rLs €r,r%zDictCursor.__init__Šs4ø€Ý 'ˆˆ}ÑØ�‰ŒÔ˜$Ð) &Ð)Ð)Ð)؈Œˆˆr-Ncó|•—t¦«|_d|_t¦« ||¦«S©NT)rÚindexr&r$Úexecute©r(ÚqueryÚvarsr+s €r,rTzDictCursor.execute�s.ø€Ý ‘]”]ˆŒ Ø#ˆÔ݉wŒw�Š˜u dÑ+Ô+Ð+r-có|•—t¦«|_d|_t¦« ||¦«SrR)rrSr&r$Úcallproc©r(ÚprocnamerWr+s €r,rYzDictCursor.callproc”s0ø€Ý ‘]”]ˆŒ Ø#ˆÔ݉wŒw×Ò ¨$Ñ/Ô/Ð/r-có¶—|jrO|jrJtt|j¦«¦«D]}||j|j|d<Œd|_dSdSdS)NrF)r&Ú descriptionÚrangeÚlenrS)r(Úis r,r1zDictCursor._build_index™sw€Ø Ô ð ) DÔ$4ð )Ý�3˜tÔ/Ñ0Ô0Ñ1Ô1ð 7ð 7�Ø56�” ˜4Ô+¨AÔ.¨qÔ1Ñ2Ð2Ø#(ˆDÔ Ð Ð ð )ð )ð )ð )r-r/© r?r@rArBr%rTrYr1rCrDs@r,rKrK„s�ø€€€€€ððð ððððð ,ð,ð,ð,ð,ð,ð 0ð0ð0ð0ð0ð0ð )ð)ð)ð)ð)ð)ð)r-rKcóz‡—eZdZdZdZd„Zˆfd„Zˆfd„Zˆfd„Zd„Z ˆfd„Z dd „Z d „Z d „Z ˆfd „Zd„Zd„ZˆxZS)rPz6A row object that allow by-column-name access to data.©Ú_indexcóX—|j|_dgt|j¦«z|dd…<dSr/)rSrdr_r])r(rs r,r%zDictRow.__init__¥s.€Ø”lˆŒ Ø�&�3˜vÔ1Ñ2Ô2Ñ2ˆˆQˆQˆQ‰ˆˆr-c󘕗t|ttf¦«s |j|}t ¦« |¦«Sr/)Ú isinstanceÚintÚslicerdr$Ú __getitem__)r(Úxr+s €r,rjzDictRow.__getitem__©s<ø€Ý˜!�c¥5˜\Ñ*Ô*ð Ø” ˜A”ˆA݉wŒw×"Ò" 1Ñ%Ô%Ð%r-cóž•—t|ttf¦«s |j|}t ¦« ||¦«dSr/)rgrhrirdr$Ú __setitem__)r(rkÚvr+s €r,rmzDictRow.__setitem__®sDø€Ý˜!�c¥5˜\Ñ*Ô*ð Ø” ˜A”ˆAÝ ‰Œ×Ò˜A˜qÑ!Ô!Ð!Ð!Ð!r-cóV•‡‡—t¦«jŠˆˆfd„‰jD¦«S)Nc3óH•K—|]}|‰‰j|¦«fV—ŒdSr/rc©Ú.0ÚnÚgr(s €€r,ú z DictRow.items..µs8øèè€Ð<Ð<¨1��A�A�d”k !”nÑ%Ô%Ð&Ð<Ð<Ð<Ð<Ð<Ð.¼s3øèè€Ð7Ð7 a���$”+˜a”.Ñ!Ô!Ð7Ð7Ð7Ð7Ð7Ð7r-rvrws`@€r,ÚvalueszDictRow.valuesºs0øøø€Ý ‰GŒGÔ ˆØ7Ð7Ð7Ð7Ð7¨4¬;Ð7Ñ7Ô7Ð7r-Ncó8— ||S#t$r|cYSwxYwr/)Ú Exception)r(rkÚdefaults r,Úgetz DictRow.get¾s4€ð ؘ”7ˆNøÝð ð ð ØˆNˆNˆNð øøøs ‚ Š ˜cóD—t| ¦«¦«Sr/)rrxr{s r,Úcopyz DictRow.copyÄs€Ý˜4Ÿ:š:™<œ<Ñ(Ô(Ð(r-có—||jvSr/rc)r(rks r,Ú __contains__zDictRow.__contains__Çs€Ø�D”KÐÐr-cóD•—t¦« ¦«Sr/)r$Ú __reduce__)r(r+s €r,r‰zDictRow.__reduce__Êsø€å‰wŒw×!Ò!Ñ#Ô#Ð#r-cóH—|dd…|j ¦«fSr/)rdr…r{s r,Ú __getstate__zDictRow.__getstate__Îs#€Ø�A�A�AŒw˜œ ×(Ò(Ñ*Ô*Ð*Ð*r-có:—|d|dd…<|d|_dS©Nrrrc)r(Údatas r,Ú __setstate__zDictRow.__setstate__Ñs"€Ø�q”'ˆˆQˆQˆQ‰Ø˜1”gˆŒ ˆ ˆ r-r/)r?r@rArBÚ __slots__r%rjrmrxr|rrƒr…r‡r‰r‹r�rCrDs@r,rPrP sø€€€€€Ø@Ð@à€Ið3ð3ð3ð&ð&ð&ð&ð&ð "ð"ð"ð"ð"ð =ð=ð=ð=ð=ð!ð!ð!ð8ð8ð8ð8ð8ððððð )ð)ð)ð ð ð ð$ð$ð$ð$ð$ð+ð+ð+ðððððððr-rPcó"‡—eZdZdZˆfd„ZˆxZS)ÚRealDictConnectionz6A connection that uses `RealDictCursor` automatically.cóz•—| d|jpt¦«t¦«j|i|¤ŽSrH)rJrIÚRealDictCursorr$rrLs €r,rzRealDictConnection.cursorØs=ø€Ø×ÒÐ*¨DÔ,?Ð,QÅ>ÑRÔRÐRØ�u‰wŒwŒ~˜tÐ. vÐ.Ð.Ð.r-rMrDs@r,r’r’Ös>ø€€€€€Ø@Ð@ð/ð/ð/ð/ð/ð/ð/ð/ð/r-r’có@‡—eZdZdZˆfd„Zdˆfd„ Zdˆfd„ Zd„ZˆxZS)r”aQA cursor that uses a real dict as the base type for rows. Note that this cursor is extremely specialized and does not allow the normal access (using integer indices) to fetched data. If you need to access database rows both as a dictionary and a list, then use the generic `DictCursor` instead of `!RealDictCursor`. cóN•—t|d<t¦«j|i|¤ŽdS)Nr")Ú RealDictRowr$r%rLs €r,r%zRealDictCursor.__init__ås/ø€Ý +ˆˆ}ÑØ�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ð)Ð)r-Ncód•—g|_d|_t¦« ||¦«SrR)Úcolumn_mappingr&r$rTrUs €r,rTzRealDictCursor.executeés+ø€Ø ˆÔØ#ˆÔ݉wŒw�Š˜u dÑ+Ô+Ð+r-cód•—g|_d|_t¦« ||¦«SrR)r™r&r$rYrZs €r,rYzRealDictCursor.callprocîs-ø€Ø ˆÔØ#ˆÔ݉wŒw×Ò ¨$Ñ/Ô/Ð/r-cód—|jr&|jr!d„|jD¦«|_d|_dSdSdS)Ncó—g|] }|d‘Œ S©r©©rrÚds r,ú z/RealDictCursor._build_index..õs€Ð"BÐ"BÐ"B¨A 1 Q¤4Ð"BÐ"BÐ"Br-F)r&r]r™r{s r,r1zRealDictCursor._build_indexósR€Ø Ô ð ) DÔ$4ð )Ø"BÐ"B°Ô1AÐ"BÑ"BÔ"BˆDÔ Ø#(ˆDÔ Ð Ð ð )ð )ð )ð )r-r/rarDs@r,r”r”Ýs�ø€€€€€ððð*ð*ð*ð*ð*ð,ð,ð,ð,ð,ð,ð 0ð0ð0ð0ð0ð0ð )ð)ð)ð)ð)ð)ð)r-r”có,‡—eZdZdZˆfd„Zˆfd„ZˆxZS)r—z.A `!dict` subclass representing a data record.có•—|r.t|dt¦«r|d}|dd…}nd}t¦«j|i|¤Ž|�3|jr|js| ¦«|j|t<dSdSr�)rgÚ_cursorr$r%r]r™r1r—)r(r)r*rr+s €r,r%zRealDictRow.__init__üs£ø€Ø ð •J˜t Aœw­Ñ0Ô0ð Ø˜!”WˆFؘ˜˜”8ˆDˆDàˆFà�‰ŒÔ˜$Ð) &Ð)Ð)Ð)à Ð àÔ!ð &¨&Ô*?ð &Ø×#Ò#Ñ%Ô%Ð%ð !'Ô 5ˆD•Ñ Ð Ð ð Ð r-có•—t|vrU|t}t¦« |||¦«|t|¦«dz kr|t=dSt¦« ||¦«dS)Nr)r—r$rmr_)r(ÚkeyÚvalueÚmappingr+s €r,rmzRealDictRow.__setitem__syø€Ý ˜$Ð Ð à�;Ô'ˆGÝ ‰GŒG× Ò  ¨¤ ¨eÑ 4Ô 4Ð 4Ø•c˜'‘l”l QÑ&Ò&Ð&à�Ð%Ø ˆFå ‰Œ×Ò˜C Ñ'Ô'Ð'Ð'Ð'r-)r?r@rArBr%rmrCrDs@r,r—r—ùsWø€€€€€Ø8Ð8ð6ð6ð6ð6ð6ð& (ð (ð (ð (ð (ð (ð (ð (ð (r-r—có"‡—eZdZdZˆfd„ZˆxZS)ÚNamedTupleConnectionz8A connection that uses `NamedTupleCursor` automatically.cóz•—| d|jpt¦«t¦«j|i|¤ŽSrH)rJrIÚNamedTupleCursorr$rrLs €r,rzNamedTupleConnection.cursors>ø€Ø×ÒÐ*¨DÔ,?Ð,SÕCSÑTÔTÐTØ�u‰wŒwŒ~˜tÐ. vÐ.Ð.Ð.r-rMrDs@r,rªrªs>ø€€€€€ØBÐBð/ð/ð/ð/ð/ð/ð/ð/ð/r-rªc󈇗eZdZdZdZdZd ˆfd„ Zˆfd„Zd ˆfd„ Zˆfd„Z d ˆfd„ Z ˆfd „Z ˆfd „Z d „Z ed „¦«ZˆxZS)r¬aéA cursor that generates results as `~collections.namedtuple`. `!fetch*()` methods will return named tuples instead of regular tuples, so their elements can be accessed both as regular numeric items as well as attributes. >>> nt_cur = conn.cursor(cursor_factory=psycopg2.extras.NamedTupleCursor) >>> rec = nt_cur.fetchone() >>> rec Record(id=1, num=100, data="abc'def") >>> rec[1] 100 >>> rec.data "abc'def" NicóV•—d|_t¦« ||¦«Sr/)ÚRecordr$rTrUs €r,rTzNamedTupleCursor.execute6s"ø€ØˆŒ ݉wŒw�Š˜u dÑ+Ô+Ð+r-cóV•—d|_t¦« ||¦«Sr/)r¯r$Ú executemanyrUs €r,r±zNamedTupleCursor.executemany:s$ø€ØˆŒ ݉wŒw×"Ò" 5¨$Ñ/Ô/Ð/r-cóV•—d|_t¦« ||¦«Sr/)r¯r$rYrZs €r,rYzNamedTupleCursor.callproc>s$ø€ØˆŒ ݉wŒw×Ò ¨$Ñ/Ô/Ð/r-c󾕗t¦« ¦«}|�9|j}|€| ¦«x}|_| |¦«SdSr/)r$r0r¯Ú_make_ntÚ_make)r(ÚtÚntr+s €r,r0zNamedTupleCursor.fetchoneBsTø€Ý ‰GŒG× Ò Ñ Ô ˆØ ˆ=Ø”ˆB؈zØ#'§=¢=¡?¤?Ð2��T”[Ø—8’8˜A‘;”;Ð ð ˆ=r-cóÒ•—t¦« |¦«}|j}|€| ¦«x}|_t t |j|¦«¦«Sr/)r$r6r¯r´ÚlistÚmaprµ)r(r7Útsr·r+s €r,r6zNamedTupleCursor.fetchmanyJsTø€Ý ‰WŒW× Ò ˜tÑ $Ô $ˆØ Œ[ˆØ ˆ:Ø#Ÿ}š}™œÐ .ˆB�”Ý•C˜œ "Ñ%Ô%Ñ&Ô&Ð&r-cóЕ—t¦« ¦«}|j}|€| ¦«x}|_t t |j|¦«¦«Sr/)r$r9r¯r´r¹rºrµ)r(r»r·r+s €r,r9zNamedTupleCursor.fetchallQsRø€Ý ‰WŒW× Ò Ñ Ô ˆØ Œ[ˆØ ˆ:Ø#Ÿ}š}™œÐ .ˆB�”Ý•C˜œ "Ñ%Ô%Ñ&Ô&Ð&r-c#óL•K— t¦« ¦«}t|¦«}|j}|€| ¦«x}|_| |¦«V— | t|¦«¦«V—Œ%#t $rYdSwxYwr/)r$r;r<r¯r´rµr=)r(Úitr¶r·r+s €r,r;zNamedTupleCursor.__iter__Xs¬øèè€ð Ý‘”×!Ò!Ñ#Ô#ˆBÝ�R‘”ˆAà”ˆB؈zØ#'§=¢=¡?¤?Ð2��T”[à—(’(˜1‘+”+Ð Ð Ð ð )Ø—h’h�t B™xœxÑ(Ô(Ð(Ð(Ð(ð )øåð ð ð Ø ˆFˆFð øøøs…BB B#Â"B#cóz—|jrtd„|jD¦«¦«nd}| |¦«S)Nc3ó&K—|] }|dV—Œ dS)rNržrŸs r,ruz,NamedTupleCursor._make_nt..is&èè€Ð3Ð3˜Q�A�a”DÐ3Ð3Ð3Ð3Ð3Ð3r-rž)r]ÚtupleÚ_cached_make_nt)r(r¦s r,r´zNamedTupleCursor._make_nthsB€Ø7;Ô7GÐO�eÐ3Ð3 $Ô"2Ð3Ñ3Ô3Ñ3Ô3Ð3ÈRˆØ×#Ò# CÑ(Ô(Ð(r-cóâ—g}|D]Y}t d|¦«}|ddksd|dcxkrdkrnnd|z}| |¦«ŒZtd|¦«}|S)NÚ_rÚ0Ú9Úfr¯)Ú _re_cleanÚsubÚappendr)Úclsr¦ÚfieldsÚsr·s r,Ú _do_make_ntzNamedTupleCursor._do_make_ntls�€àˆØð ð ˆAÝ— ’ ˜c 1Ñ%Ô%ˆAð�Œt�sŠ{ˆ{˜c Q q¤TÐ0Ð0Ò0Ð0¨SÒ0Ð0Ð0Ð0Ð0ؘ!‘G�Ø �MŠM˜!Ñ Ô Ð Ð å ˜ &Ñ )Ô )ˆØˆ r-r/)r?r@rArBr¯Ú MAX_CACHErTr±rYr0r6r9r;r´Ú classmethodrÎrCrDs@r,r¬r¬#sø€€€€€ððð€FØ€Ið,ð,ð,ð,ð,ð,ð0ð0ð0ð0ð0ð0ð0ð0ð0ð0ð0ðððððð'ð'ð'ð'ð'ð'ð'ð'ð'ð'ð'ðððððð )ð)ð)ðð ð ñ„[ð ð ð ð ð r-r¬icó,—| |¦«Sr/)rÎ)rËr¦s r,rÂrÂ{s€à �?Š?˜3Ñ Ô Ðr-có@‡—eZdZdZd„Zd„Zd„Zd„Zd„Zˆfd„Z ˆxZ S)ÚLoggingConnectionz~A connection that logs all queries to a file or logger__ object. .. __: https://docs.python.org/library/logging.html có¢—||_tr4t|tjtjf¦«r|j|_dS|j|_dS)zÀInitialize the connection to log to `!logobj`. The `!logobj` parameter can be an open file object or a Logger/LoggerAdapter instance from the standard logging module. N)Ú_logobjÚ_loggingrgÚLoggerÚ LoggerAdapterÚ _logtologgerÚlogÚ _logtofile)r(Úlogobjs r,Ú initializezLoggingConnection.initialize‹sP€ð ˆŒ Ý ð '� Ø�œ­(Ô*@ÐAñCôCð 'àÔ(ˆDŒHˆHˆHà”ˆDŒHˆHˆHr-có—|S)zæFilter the query before logging it. This is the method to overwrite to filter unwanted queries out of the log or to add some extra data to the output. The default implementation just does nothing. rž©r(ÚmsgÚcurss r,ÚfilterzLoggingConnection.filter˜s €ðˆ r-có—| ||¦«}|rit|t¦«r+| tj|jd¦«}|j |tj z¦«dSdS)NÚreplace) rârgÚbytesÚdecodeÚ_extÚ encodingsÚencodingrÕÚwriteÚ_osÚlineseprßs r,rÛzLoggingConnection._logtofile¡sy€Ø�kŠk˜#˜tÑ$Ô$ˆØ ð 2ݘ#�uÑ%Ô%ð KØ—j’j¥¤°´ Ô!>À ÑJÔJ�Ø ŒL× Ò ˜s¥S¤[Ñ0Ñ 1Ô 1Ð 1Ð 1Ð 1ð 2ð 2r-cón—| ||¦«}|r|j |¦«dSdSr/)rârÕÚdebugrßs r,rÙzLoggingConnection._logtologger¨sC€Ø�kŠk˜#˜tÑ$Ô$ˆØ ð $Ø ŒL× Ò ˜sÑ #Ô #Ð #Ð #Ð #ð $ð $r-cóP—t|d¦«s| d¦«‚dS)NrÕz3LoggingConnection object has not been initialize()d)ÚhasattrÚProgrammingErrorr{s r,Ú_checkzLoggingConnection._check­s?€Ý�t˜YÑ'Ô'ð GØ×'Ò'ØEñGôGð Gð Gð Gr-c󢕗| ¦«| d|jpt¦«t ¦«j|i|¤ŽSrH)ròrJrIÚ LoggingCursorr$rrLs €r,rzLoggingConnection.cursor²sJø€Ø � Š ‰ Œ ˆ Ø×ÒÐ*¨DÔ,?Ð,PÅ=ÑQÔQÐQØ�u‰wŒwŒ~˜tÐ. vÐ.Ð.Ð.r-) r?r@rArBrÝrârÛrÙròrrCrDs@r,rÓrÓ…s�ø€€€€€ððð 'ð 'ð 'ðððð2ð2ð2ð$ð$ð$ð GðGðGð /ð/ð/ð/ð/ð/ð/ð/ð/r-rÓcó0‡—eZdZdZdˆfd„ Zdˆfd„ ZˆxZS)rôzCA cursor that logs queries using its connection logging facilities.NcóÔ•— t¦« ||¦«|j |j|¦«S#|j |j|¦«wxYwr/)r$rTrrÚrVrUs €r,rTzLoggingCursor.execute»sZø€ð 2Ý‘7”7—?’? 5¨$Ñ/Ô/à ŒO× Ò  ¤ ¨DÑ 1Ô 1Ð 1Ð 1øˆDŒO× Ò  ¤ ¨DÑ 1Ô 1Ð 1Ð 1øøøó ƒ!AÁ"A'cóÔ•— t¦« ||¦«|j |j|¦«S#|j |j|¦«wxYwr/)r$rYrrÚrVrZs €r,rYzLoggingCursor.callprocÁs\ø€ð 2Ý‘7”7×#Ò# H¨dÑ3Ô3à ŒO× Ò  ¤ ¨DÑ 1Ô 1Ð 1Ð 1øˆDŒO× Ò  ¤ ¨DÑ 1Ô 1Ð 1Ð 1øøør÷r/)r?r@rArBrTrYrCrDs@r,rôrô¸saø€€€€€ØMÐMð2ð2ð2ð2ð2ð2ð 2ð2ð2ð2ð2ð2ð2ð2ð2ð2r-rôcó&—eZdZdZdd„Zd„Zd„ZdS)ÚMinTimeLoggingConnectiona­A connection that logs queries based on execution time. This is just an example of how to sub-class `LoggingConnection` to provide some extra filtering for the logged queries. Both the `initialize()` and `filter()` methods are overwritten to make sure that only queries executing for more than ``mintime`` ms are logged. Note that this connection uses the specialized cursor `MinTimeLoggingCursor`. rcóJ—t ||¦«||_dSr/)rÓrÝÚ_mintime)r(rÜÚmintimes r,rÝz#MinTimeLoggingConnection.initializeÓs#€Ý×$Ò$ T¨6Ñ2Ô2Ð2؈Œ ˆ ˆ r-có—tj¦«|jz dz}||jkrTt |t ¦«r+| tj|j d¦«}|›tj ›d|›d�SdS)Nièräz (execution time: z ms)) Ú_timeÚtimeÚ timestamprürgrårærçrèrérërì)r(ràrár¶s r,râzMinTimeLoggingConnection.filter×s{€Ý ŒZ‰\Œ\˜DœNÑ *¨dÑ 2ˆØ ˆtŒ}Ò Ð Ý˜#�uÑ%Ô%ð KØ—j’j¥¤°´ Ô!>À ÑJÔJ�ØÐB�3œ;ÐBÐB¸1ÐBÐBÐBÐ Bð Ð r-cóp—| d|jpt¦«tj|g|¢Ri|¤ŽSrH)rJrIÚMinTimeLoggingCursorrÓr)r(r)r*s r,rzMinTimeLoggingConnection.cursorÞsJ€Ø×ÒÐ*Ø Ô Ð 7Õ#7ñ 9ô 9ð 9å Ô'¨Ð>¨tÐ>Ð>Ð>°vÐ>Ð>Ð>r-Nr�)r?r@rArBrÝrârržr-r,rúrúÈsS€€€€€ð ð ð ð ð ð ðCðCðCð?ð?ð?ð?ð?r-rúcó"—eZdZdZdd„Zdd„ZdS)rz=The cursor sub-class companion to `MinTimeLoggingConnection`.Ncój—tj¦«|_t |||¦«Sr/)rÿrrrôrT)r(rVrWs r,rTzMinTimeLoggingCursor.executeçs'€Ýœ™œˆŒÝ×$Ò$ T¨5°$Ñ7Ô7Ð7r-cój—tj¦«|_t |||¦«Sr/)rÿrrrôrY)r(r[rWs r,rYzMinTimeLoggingCursor.callprocës'€Ýœ™œˆŒÝ×%Ò% d¨H°dÑ;Ô;Ð;r-r/)r?r@rArBrTrYržr-r,rräsB€€€€€ØGÐGð8ð8ð8ð8ð<ð<ð<ð<ð<ðÐ>Ð>­¨S°¬V°R©¬Ð>Ð>Ð>ˆCˆCà "‘_ zÑ1ÐRÐRÐR°iÀ*Ñ6LÐRÐRÐRˆCà�3‰ˆà �qŠ=ˆ=ØÕ/Ò/Ð/ÝÔ/ØEñGôGðGð Ð. HÐ.Ð.Ñ .ˆGà ð ØÕ0Ò0Ð0ÝÔ/ØSñUôUðUð �t‰OˆGØŸ š ™œð Bð B‘��1Ø×'Ò'¨Ñ,Ô,ð$ؘt‘O�GØ�k¨!¨TÑ2Ô2ÐAÐAµR½¸A¹¼±Z´ZÐAÐAÑA��Ø �s‰NˆGà ×%Ò%Ø ˜F°Oð &ñ Eô Eð Eð Eð Er-có4—|j ¦«Sr/)rÚfilenor{s r,r9zReplicationCursor.filenols€ØŒ×%Ò%Ñ'Ô'Ð'r-©NN)NNrrNFr")r?r@rArBrr!r7r9ržr-r,rr sm€€€€€ØEÐEððððð<ððð=>ØDFð8Eð8Eð8Eð8Eðv(ð(ð(ð(ð(r-rcó*—eZdZdZd„Zd„Zd„Zd„ZdS)Ú UUID_adapterz¿Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__. .. __: https://docs.python.org/library/uuid.html .. __: https://www.postgresql.org/docs/current/static/datatype-uuid.html có—||_dSr/©Ú_uuid)r(Úuuids r,r%zUUID_adapter.__init__yó €ØˆŒ ˆ ˆ r-có&—|tjur|SdSr/©rçÚ ISQLQuote©r(Úprotos r,Ú __conform__zUUID_adapter.__conform__|ó€Ø •D”NÐ "Ð "؈Kð #Ð "r-có>—d|j›d� d¦«S)Nú'ú'::uuidÚutf8)r?Úencoder{s r,Ú getquotedzUUID_adapter.getquoted€s#€Ø'�D”JÐ'Ð'Ð'×/Ò/°Ñ7Ô7Ð7r-có—d|j›d�S)NrJrKr>r{s r,Ú__str__zUUID_adapter.__str__ƒs€Ø&�4”:Ð&Ð&Ð&Ð&r-N)r?r@rArBr%rGrNrPržr-r,r<r<rsZ€€€€€ððð ðððððð8ð8ð8ð'ð'ð'ð'ð'r-r<cóÖ‡—ddlŠ|sd}d}n&t|ttf¦«r|\}}n|}d}t j|fdˆfd„¦«t_t j|fdtj¦«t_t j tj|¦«t j tj|¦«t j ‰jt¦«tjS)aRCreate the UUID type and an uuid.UUID adapter. :param oids: oid for the PostgreSQL :sql:`uuid` type, or 2-items sequence with oids of the type and the array. If not specified, use PostgreSQL standard oids. :param conn_or_curs: where to register the typecaster. If not specified, register it globally. rNi† i‡ ÚUUIDcó6•—|r‰ |¦«pdSr/)rR)rŽrr@s €r,úzregister_uuid..�sø€ Ð!9¨$¯)ª)°D©/¬/Ð!A¸T€r-zUUID[]) r@rgr¹rÁrçÚnew_typerRÚnew_array_typeÚ UUIDARRAYÚ register_typeÚregister_adapterr<)ÚoidsÚ conn_or_cursÚoid1Úoid2r@s @r,Ú register_uuidr^‡sÕø€ð€K€K€Kà ðØˆØˆˆÝ �D�4¥˜-Ñ (Ô (ðØ‰ ˆˆdˆdàˆØˆå” ˜t˜h¨Ø AÐ AÐ AÐ AñCôC…D„IåÔ(¨$¨°(½D¼IÑFÔF…D„NåÔ•t”y ,Ñ/Ô/Ð/ÝÔ•t”~ |Ñ4Ô4Ð4ÝÔ˜$œ)¥\Ñ2Ô2Ð2å Œ9Ðr-có6—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z dS) ÚInetaCWrap a string to allow for correct SQL-quoting of inet values. Note that this adapter does NOT check the passed value to make sure it really is an inet-compatible address but DOES call adapt() on it to make sure it is impossible to execute an SQL-injection by passing an evil value to the initializer. có—||_dSr/)Úaddr)r(rbs r,r%z Inet.__init__±s €ØˆŒ ˆ ˆ r-có0—|jj›d|j›d�S)Nr)r*)r+r?rbr{s r,Ú__repr__z Inet.__repr__´s €Ø”.Ô)Ð:Ð:¨D¬IÐ:Ð:Ð:Ð:r-có—||_dSr/)Ú_conn©r(Úconns r,Úpreparez Inet.prepare·rAr-có¬—t|j¦«}t|d¦«r| |j¦«| ¦«dzS)Nris::inet)r0rbrðrirfrN)r(Úobjs r,rNzInet.getquotedºsH€Ý�”‰mŒmˆÝ �3˜ Ñ "Ô "ð $Ø �KŠK˜œ Ñ #Ô #Ð #Ø�}Š}‰Œ Ñ*Ð*r-có&—|tjur|SdSr/rCrEs r,rGzInet.__conform__ÀrHr-có*—t|j¦«Sr/)r-rbr{s r,rPz Inet.__str__Äs€Ý�4”9‰~Œ~Ðr-N) r?r@rArBr%rdrirNrGrPržr-r,r`r`©sx€€€€€ðððððð;ð;ð;ðððð+ð+ð+ð ðððððððr-r`cóÈ—ddl}| dt¦«|sd}d}n&t|tt f¦«r|\}}n|}d}t j|fdd„¦«t _t j |fdt j¦«t _ t j t j|¦«t j t j |¦«t jS) aLCreate the INET type and an Inet adapter. :param oid: oid for the PostgreSQL :sql:`inet` type, or 2-items sequence with oids of the type and the array. If not specified, use PostgreSQL standard oids. :param conn_or_curs: where to register the typecaster. If not specified, register it globally. rNz4the inet adapter is deprecated, it's not very usefulieiÚINETcó(—|rt|¦«pdSr/)r`)rŽrs r,rTzregister_inet..às€ Ð!4­$¨t©*¬*Ð!<¸€r-Ú INETARRAY) ÚwarningsÚwarnÚDeprecationWarningrgr¹rÁrçrUrorVrqrX)Úoidr[rrr\r]s r,Ú register_inetrvÈsÕ€ð€O€O€OØ ‡M‚MØ>Ýñôðð ðØˆØˆˆÝ �C�$¥˜Ñ 'Ô 'ðØ‰ ˆˆdˆdàˆØˆå” ˜t˜h¨Ø <Ð <ñ>ô>…D„IåÔ(¨$¨°;ÅÄ ÑJÔJ…D„NåÔ•t”y ,Ñ/Ô/Ð/ÝÔ•t”~ |Ñ4Ô4Ð4å Œ9Ðr-cóš—ddl}ddlm}m}m} | ¦«}||krdS||kr+| | ¦«ggg¦«nI||kr+| g| ¦«gg¦«n| d|›�¦«‚n$#t$r|  ¦«YŒ¹wxYwŒ½)aRWait until a connection or cursor has data available. The function is an example of a wait callback to be registered with `~psycopg2.extensions.set_wait_callback()`. This function uses :py:func:`~select.select()` to wait for data to become available, and therefore is able to handle/receive SIGINT/KeyboardInterrupt. rN)ÚPOLL_OKÚ POLL_READÚ POLL_WRITETzbad state from poll: ) ÚselectÚpsycopg2.extensionsrxryrzÚpollr9ÚOperationalErrorÚKeyboardInterruptÚcancel)rhr{rxryrzÚstates r,Ú wait_selectr‚ésþ€ð€M€M€MØBÐBÐBÐBÐBÐBÐBÐBÐBÐBðð Ø—I’I‘K”KˆEؘÒÐØ�ؘ)Ò#Ð#Ø— ’ ˜tŸ{š{™}œ}˜o¨r°2Ñ6Ô6Ð6Ð6ؘ*Ò$Ð$Ø— ’ ˜b 4§;¢;¡=¤= /°2Ñ6Ô6Ð6Ð6à×+Ò+Ð,KÀEÐ,KÐ,KÑLÔLÐLøøÝ ð ð ð Ø �KŠK‰MŒMˆMà ˆHð øøøðs‘B(­A:B(Â(C ÃC cóÖ—|€tjd¦«‚t|d¦«r#|j}| t ¬¦«}n|}| t ¬¦«}||fS)zEReturn the connection and a DBAPI cursor from a connection or cursor.Nz no connection or cursor providedrT)rI)rrñrðrrr¤)r[rhrás r,Ú_solve_conn_cursr„sk€àÐÝÔ'Ð(JÑKÔKÐKåˆ|˜YÑ'Ô'ð3ØÔ&ˆØ�{Š{­'ˆ{Ñ2Ô2ˆˆàˆØ�{Š{­'ˆ{Ñ2Ô2ˆà �ˆ:Ðr-có¼—eZdZdZd„Zd„Zd„Zd„ZeZe j de j ¦«Z e e j d¦«fd„¦«Ze d „¦«Ze d „¦«Zd S) Ú HstoreAdapterz)Adapt a Python dict to the hstore syntax.có—||_dSr/)Úwrapped)r(rˆs r,r%zHstoreAdapter.__init__s €ØˆŒ ˆ ˆ r-cóP—||_|jjdkr|j|_dSdS)Ni�_)rhÚinfoÚserver_versionÚ _getquoted_8rNrgs r,rizHstoreAdapter.prepares1€ØˆŒ ð Œ9Ô # eÒ +Ð +Ø!Ô.ˆDŒNˆNˆNð ,Ð +r-cóÔ—|jsdStj}g}|j ¦«D]�\}}||¦«}| |j¦«| ¦«}|�:||¦«}| |j¦«| ¦«}nd}| d|zdz|zdz¦«Œždd |¦«zdzS)z*Use the operators available in PG pre-9.0.ó ''::hstoreNsNULLó(s => ó)s||) rˆrçr rxrirhrNrÊÚjoin)r(r Úrvr6rns r,rŒzHstoreAdapter._getquoted_8 sê€àŒ|ð !Ø �=å” ˆØ ˆØ”L×&Ò&Ñ(Ô(ð 5ð 5‰DˆAˆqØ��a‘”ˆAØ �IŠI�d”iÑ Ô Ð Ø— ’ ‘ ” ˆAàˆ}Ø�E˜!‘H”H�Ø— ’ ˜$œ)Ñ$Ô$Ð$Ø—K’K‘M”M��à�ð �IŠI�d˜Q‘h Ñ(¨1Ñ,¨tÑ3Ñ 4Ô 4Ð 4Ð 4à�e—j’j ‘n”nÑ$ tÑ+Ð+r-cóÀ—|jsdStjt|j ¦«¦«¦«}| |j¦«tjt|j ¦«¦«¦«}| |j¦«d| ¦«zdz| ¦«zdzS)z(Use the hstore(text[], text[]) function.rŽshstore(s, r�) rˆrçr r¹r|rirhrrN)r(r6rns r,Ú _getquoted_9zHstoreAdapter._getquoted_98s­€àŒ|ð !Ø �=å ŒJ•t˜DœL×-Ò-Ñ/Ô/Ñ0Ô0Ñ 1Ô 1ˆØ � Š �$”)ÑÔÐÝ ŒJ•t˜DœL×/Ò/Ñ1Ô1Ñ2Ô2Ñ 3Ô 3ˆØ � Š �$”)ÑÔÐØ˜AŸKšK™MœMÑ)¨EÑ1°A·K²K±M´MÑAÀDÑHÐHr-am # hstore key: # a string of normal or escaped chars "((?: [^"\\] | \\. )*)" \s*=>\s* # hstore value (?: NULL # the value can be null - not catched # or a quoted string like the key | "((?: [^"\\] | \\. )*)" ) (?:\s*,\s*|$) # pairs separated by comma or end of string. z\\(.)cóä—|€dSi}d}|j |¦«D]¢}|�| ¦«|krtjd|›�¦«‚| d| d¦«¦«}| d¦«}|�| d|¦«}|||<| ¦«}Œ£|t|¦«krtjd|›�¦«‚|S)z»Parse an hstore representation in a Python string. The hstore is represented as something like:: "a"=>"1", "b"=>"2" with backslash-escaped strings. Nrz"error parsing hstore pair at char ú\1réz/error parsing hstore: unparsed data after char ) Ú _re_hstoreÚfinditerÚstartrÚInterfaceErrorrÉÚgroupÚendr_) r(rÍÚcurÚ_bsdecr’ršÚmr6rns r,ÚparsezHstoreAdapter.parseRs€ð ˆ9Ø�4à ˆØˆØ”×)Ò)¨!Ñ,Ô,ð ð ˆA؈y˜AŸGšG™IœI¨Ò.Ð.ÝÔ-Ø@¸Ð@Ð@ñBôBðBà— ’ ˜5 !§'¢'¨!¡*¤*Ñ-Ô-ˆAØ—’˜‘ ” ˆA؈}Ø—J’J˜u aÑ(Ô(�àˆBˆq‰EØ—E’E‘G”GˆEˆEà •3�q‘6”6Š>ˆ>ÝÔ)ØIÀ%ÐIÐIñKôKð Kðˆ r-có”—|€dS| tj|jj¦«}| ||¦«S)z2Parse an hstore returning unicode keys and values.N)rærçrèrrér¡)r(rÍržs r,Ú parse_unicodezHstoreAdapter.parse_unicodess?€ð ˆ9Ø�4à �HŠH•T”^ C¤NÔ$;Ô<Ñ =Ô =ˆØ�zŠz˜!˜SÑ!Ô!Ð!r-cóž—t|¦«\}}|j}|jjdkrdpd}gg}}| d|›d�¦«|D]8}| |d¦«| |d¦«Œ9|t jkr|js|  ¦«t|¦«t|¦«fS)zBReturn the lists of OID of the hstore and hstore[] types. é¬9ÚtyparrayÚNULLzSELECT t.oid, z\ FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid WHERE typname = 'hstore'; rr) r„ÚstatusrŠr‹rTrÊrçÚSTATUS_IN_TRANSACTIONÚ autocommitÚrollbackrÁ) r(r[rhráÚ conn_statusr¦Úrv0Úrv1rZs r,Úget_oidszHstoreAdapter.get_oids|sî€õ& lÑ3Ô3‰ ˆˆdð”kˆ ð”9Ô+¨uÒ4ÐC¸ÐMÀvˆà�rˆSˆð � Š ð¨ðððñ ô ð ð ð ð ˆDØ �JŠJ�t˜A”wÑ Ô Ð Ø �JŠJ�t˜A”wÑ Ô Ð Ð ð �4Ô5Ò 5Ð 5Ø”ð 6à �MŠM‰OŒOˆOå�S‰zŒz�5 ™:œ:Ð%Ð%r-N)r?r@rArBr%rirŒr”rNÚ_reÚcompileÚVERBOSEr˜rÐr¡r£r¯ržr-r,r†r†s倀€€€Ø3Ð3ðððð/ð/ð/ð,ð,ð,ð0 Ið Ið Ið€Ià�”ð ð Œñ ô €JðØ#. 3¤;¨xÑ#8Ô#8ðððñ„[ðð@ð"ð"ñ„[ð"ðð&ð&ñ„[ð&ð&ð&r-r†FcóL—|€Ht |¦«}|�|dstjd¦«‚|d}|d}t |t ¦«r|f}|�2t |t ¦«r|f}nt d„|D¦«¦«}tj|dtj ¦«}tj || r|pd¦«tj tt¦«|r2tj |d|¦«}tj || r|pd¦«dSdS)aRegister adapter and typecaster for `!dict`\-\ |hstore| conversions. :param conn_or_curs: a connection or cursor: the typecaster will be registered only on this object unless *globally* is set to `!True` :param globally: register the adapter globally, not only on *conn_or_curs* :param unicode: if `!True`, keys and values returned from the database will be `!unicode` instead of `!str`. The option is not available on Python 3 :param oid: the OID of the |hstore| type if known. If not, it will be queried on *conn_or_curs*. :param array_oid: the OID of the |hstore| array type if known. If not, it will be queried on *conn_or_curs*. The connection or cursor passed to the function will be used to query the database and look for the OID of the |hstore| type (which may be different across databases). If querying is not desirable (e.g. with :ref:`asynchronous connections `) you may specify it in the *oid* parameter, which can be found using a query such as :sql:`SELECT 'hstore'::regtype::oid`. Analogously you can obtain a value for *array_oid* using a query such as :sql:`SELECT 'hstore[]'::regtype::oid`. Note that, when passing a dictionary from Python to the database, both strings and unicode keys and values are supported. Dictionaries returned from the database have keys/values according to the *unicode* parameter. The |hstore| contrib module must be already installed in the database (executing the ``hstore.sql`` script in your ``contrib`` directory). Raise `~psycopg2.ProgrammingError` if the type is not found. Nrz\hstore type not found in the database. please install it from your 'contrib/hstore.sql' filercó—g|]}|¯|‘ŒSržrž)rrrks r,r¡z#register_hstore..Ìs€Ð9Ð9Ð9 Q°qÐ9˜qÐ9Ð9Ð9r-ÚHSTOREÚ HSTOREARRAY)r†r¯rrñrgrhrÁrçrUr¡rXrYÚdictrV)r[ÚgloballyÚunicoderuÚ array_oidrµr¶s r,Úregister_hstorer»œsI€ð> €{Ý×$Ò$ \Ñ2Ô2ˆØ ˆ;˜c !œfˆ;ÝÔ+ðHñIôIð Ið˜AœˆIØ�a”&ˆCå�#•sÑÔð؈fˆàÐÝ �i¥Ñ %Ô %ð ;Ø"˜ ˆIˆIåÐ9Ð9¨)Ð9Ñ9Ô9Ñ:Ô:ˆIõŒ]˜3 ­-Ô*=Ñ >Ô >€FÝÔ�v 8˜|Ð<° ÐDÀÑEÔEÐEÝÔ�$¥ Ñ.Ô.Ð.àðOÝÔ)¨)°]ÀFÑKÔKˆ Ý Ô˜;¨H¨ Ð(E¸Ð(MÈÑNÔNÐNÐNÐNðOðOr-có¤—eZdZdZd d„Zd„Zd„Zejdej ¦«Z ejd¦«Z e d„¦«Z d „Ze d „¦«ZdS) ÚCompositeCasteramHelps conversion of a PostgreSQL composite type into a Python object. The class is usually created by the `register_composite()` function. You may want to create and register manually instances of the class if querying the database at registration time is not desirable (such as when using an :ref:`asynchronous connections `). NcóX—||_||_||_||_d„|D¦«|_d„|D¦«|_| ||j¦«tj|f||j ¦«|_ |r&tj |f|›d�|j ¦«|_ dSd|_ dS)Ncó—g|] }|d‘Œ Sr�rž©rrÚas r,r¡z,CompositeCaster.__init__..çó€Ð-Ð-Ð- !˜˜1œÐ-Ð-Ð-r-có—g|] }|d‘Œ S)rržrÀs r,r¡z,CompositeCaster.__init__..èrÂr-ÚARRAY) ÚnameÚschemarurºÚattnamesÚatttypesÚ _create_typerçrUr¡Ú typecasterrVÚarray_typecaster)r(rÅruÚattrsrºrÆs r,r%zCompositeCaster.__init__ás½€ØˆŒ ؈Œ ؈ŒØ"ˆŒà-Ð- uÐ-Ñ-Ô-ˆŒ Ø-Ð- uÐ-Ñ-Ô-ˆŒ Ø ×Ò˜$ ¤ Ñ.Ô.Ð.Ýœ-¨¨°°d´jÑAÔAˆŒØ ð )Ý$(Ô$7Ø�  ˜n˜n˜n¨d¬oñ%?ô%?ˆDÔ !Ð !Ð !ð%)ˆDÔ !Ð !Ð !r-cóh‡—|€dS| |¦«}t|¦«t|j¦«kr>tjdt|j¦«|jt|¦«fz¦«‚ˆfd„t |j|¦«D¦«}| |¦«S)Nz9expecting %d components for the type %s, %d found insteadcóB•—g|]\}}‰ ||¦«‘ŒSrž)Úcast)rrruÚtokenrás €r,r¡z)CompositeCaster.parse..ûs;ø€ð:ð:ð:Ù��Uð—)’)˜C Ñ'Ô'ð:ð:ð:r-)Útokenizer_rÈrÚ DataErrorrÅÚzipÚmake)r(rÍráÚtokensrs ` r,r¡zCompositeCaster.parseñsºø€Ø ˆ9Ø�4à—’˜qÑ!Ô!ˆÝ ˆv‰;Œ;�#˜dœmÑ,Ô,Ò ,Ð ,ÝÔ$ØKÝ�T”]Ñ#Ô# T¤Yµ°F± ´ Ð<ñ=ñ>ô>ð >ð:ð:ð:ð:Ý! $¤-°Ñ8Ô8ð:ñ:ô:ˆð�yŠy˜Ñ Ô Ð r-có,—| |¦«S)aReturn a new Python object representing the data being casted. *values* is the list of attributes, already casted into their Python representation. You can subclass this method to :ref:`customize the composite cast `. )Ú_ctor)r(rs r,rÔzCompositeCaster.makes€ð�zŠz˜&Ñ!Ô!Ð!r-z \(? ([,)]) # an empty token, representing NULL | \(? " ((?: [^"] | "")*) " [,)] # or a quoted string | \(? ([^",)]+) [,)] # or an unquoted string z (["\\])\1c óÊ—g}|j |¦«D]Å}|€tjd|›�¦«‚| d¦«�| d¦«ŒF| d¦«�B| |j d| d¦«¦«¦«Œ�| | d¦«¦«ŒÆ|S)Nzcan't parse type: rr—r–é)Ú _re_tokenizer™rr›rœrÊÚ _re_undoublerÉ)r(rÍr’r s r,rÑzCompositeCaster.tokenizesÍ€à ˆØÔ"×+Ò+¨AÑ.Ô.ð &ð &ˆA؈yÝÔ-Ð.HÀ1Ð.HÐ.HÑIÔIÐIØ�wŠw�q‰zŒzÐ%Ø— ’ ˜$‘”��Ø—’˜‘”Ð'Ø— ’ ˜$Ô+×/Ò/°°q·w²w¸q±z´zÑBÔBÑCÔCÐCÐCà— ’ ˜!Ÿ'š' !™*œ*Ñ%Ô%Ð%Ð%àˆ r-cóˆ—t d|¦«}t||¦«|_|jj|_dS)NrÄ)rÈrÉrr,rµr×)r(rÅrÇs r,rÉzCompositeCaster._create_type#s5€Ý�}Š}˜S $Ñ'Ô'ˆÝ˜t XÑ.Ô.ˆŒ Ø”Y”_ˆŒ ˆ ˆ r-cóˆ—t|¦«\}}|j}d|vr| dd¦«\}}n|}d}|jjdkrdpd}| d|z||f¦«| ¦«} | sÆ d} |jtjkr| d ¦«d } | d |z|f¦«| ¦«} | r| d d }| d d}n#tj $rYnwxYw| r| d¦«n#| r| d¦«wwxYw|tjkr|j s|  ¦«| stj d|›d�¦«‚| d d } | d d} d„| D¦«} ||| | | |¬¦«S)z}Return a `CompositeCaster` instance for the type *name*. Raise `ProgrammingError` if the type is not found. ú.rÚpublicr¥r¦r§zëSELECT t.oid, %s, attname, atttypid FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid JOIN pg_attribute a ON attrelid = typrelid WHERE typname = %%s AND nspname = %%s AND attnum > 0 AND NOT attisdropped ORDER BY attnum; FzSAVEPOINT register_typeTzòSELECT t.oid, %s, attname, atttypid, typname, nspname FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid JOIN pg_attribute a ON attrelid = typrelid WHERE t.oid = %%s::regtype AND attnum > 0 AND NOT attisdropped ORDER BY attnum; rééz#ROLLBACK TO SAVEPOINT register_typezPostgreSQL type 'z ' not foundcó.—g|]}|d|df‘ŒS)r—rÙrž)rrÚrs r,r¡z,CompositeCaster._from_db..us$€Ð1Ð1Ð1 q�q˜”t˜Q˜qœT�lÐ1Ð1Ð1r-)rºrÆ) r„r¨r.rŠr‹rTr9rçr©rrñrªr«)r(rÅr[rhrár¬rÆÚtnamer¦ÚrecsÚ savepointÚtype_oidrºÚ type_attrss r,Ú_from_dbzCompositeCaster._from_db(sS€õ & lÑ3Ô3‰ ˆˆdð”kˆ ð �$ˆ;ˆ;Ø ŸJšJ s¨AÑ.Ô.‰MˆF�E�EàˆE؈Fð”9Ô+¨uÒ4ÐC¸ÐMÀvˆð � Š ððñð˜�ñ !ô !ð !ð�}Š}‰Œˆàð Hð HØ!� ð”;¥$Ô"<Ò<Ð<Ø—L’LÐ!:Ñ;Ô;Ð;Ø $�Ià— ’ ððñð�ñôðð—}’}‘”�Øð(Ø  œG AœJ�EØ! !œW QœZ�Føøõ Ô,ð ð ð Ø�ð øøøððHØ—L’LÐ!FÑGÔGÐGøøððHØ—L’LÐ!FÑGÔGÐGÐGðHøøøð �$Ô4Ò 4Ð 4¸T¼_Ð 4Ø �MŠM‰OŒOˆOàð 7ÝÔ+Ø5 DÐ5Ð5Ð5ñ7ô7ð 7ð˜”7˜1”:ˆØ˜”G˜A”Jˆ Ø1Ð1¨DÐ1Ñ1Ô1ˆ àˆt�E˜8 Zبð0ñ0ô0ð 0s+ÂAC=à 3D*Ã=DÄ D*ÄDÄD*Ä*Er:)r?r@rArBr%r¡rÔr°r±r²rÚrÛrÐrÑrÉréržr-r,r½r½ØsÌ€€€€€ððð)ð)ð)ð)ð !ð !ð !ð "ð "ð "ð�3”;ð ð Œñ ô€Lð �3”;˜|Ñ,Ô,€Làð ð ñ„[ð ð%ð%ð%ð ðO0ðO0ñ„[ðO0ðO0ðO0r-r½cóΗ|€t}| ||¦«}tj|j| r|pd¦«|j�tj|j| r|pd¦«|S)aRegister a typecaster to convert a composite type into a tuple. :param name: the name of a PostgreSQL composite type, e.g. created using the |CREATE TYPE|_ command :param conn_or_curs: a connection or cursor used to find the type oid and components; the typecaster is registered in a scope limited to this object, unless *globally* is set to `!True` :param globally: if `!False` (default) register the typecaster only on *conn_or_curs*, otherwise register it globally :param factory: if specified it should be a `CompositeCaster` subclass: use it to :ref:`customize how to cast composite types ` :return: the registered `CompositeCaster` or *factory* instance responsible for the conversion N)r½rérçrXrÊrË)rÅr[r¸ÚfactoryÚcasters r,Úregister_compositerí{s�€ð€Ý!ˆà × Ò ˜d LÑ 1Ô 1€FÝÔ�vÔ(¨h¨,Ð*G¸<Ð*OÈ4ÑPÔPÐPà ÔÐ*Ý ÔØ Ô #¨ \Ð%B°lÐ%JÀdñ Lô Lð Lð €Mr-c#óÒK—g}t|¦«} t|¦«D]$}| t|¦«¦«Œ%|V—g}n#t$r |r|V—YdSwxYwŒT)zwConsume an iterable and return it in chunks. Every chunk is at most `page_size`. Never return an empty chunk. TN)rzr^rÊr<r=)ÚseqÚ page_sizeÚpager¾r`s r,Ú _paginaterò—sœèè€ð €DÝ ˆc‰Œ€Bð ð ݘ9Ñ%Ô%ð &ð &�Ø— ’ �D ™HœHÑ%Ô%Ð%Ð%؈JˆJˆJ؈DˆDøÝð ð ð Øð Ø� � � Ø ˆFˆFð øøøð s–:AÁA%Á$A%édc󠇇—t||¬¦«D]9}ˆˆfd„|D¦«}‰ d |¦«¦«Œ:dS)a…Execute groups of statements in fewer server roundtrips. Execute *sql* several times, against all parameters set (sequences or mappings) found in *argslist*. The function is semantically similar to .. parsed-literal:: *cur*\.\ `~cursor.executemany`\ (\ *sql*\ , *argslist*\ ) but has a different implementation: Psycopg will join the statements into fewer multi-statement commands, each one containing at most *page_size* statements, resulting in a reduced number of server roundtrips. After the execution of the function the `cursor.rowcount` property will **not** contain a total result. ©rðcó<•—g|]}‰ ‰|¦«‘ŒSrž)Úmogrify)rrr)ržÚsqls €€r,r¡z!execute_batch..¿s'ø€Ð8Ð8Ð8¨4�— ’ ˜C Ñ&Ô&Ð8Ð8Ð8r-ó;N)ròrTr‘)ržrøÚargslistrðrñÚsqlss`` r,Ú execute_batchrüªsgøø€õ(˜(¨iÐ8Ñ8Ô8ð%ð%ˆØ8Ð8Ð8Ð8Ð8°4Ð8Ñ8Ô8ˆØ � Š �D—I’I˜d‘O”OÑ$Ô$Ð$Ð$ð%ð%r-c óî—ddlm}t||¦«r| |¦«}t|t¦«s/| t j|jj ¦«}t|¦«\}}|rgnd} t||¬¦«D]Û} |€2dd  dgt| d¦«z¦«zdz}|dd…} | D]@} |  | || ¦«¦«|  d¦«ŒA|| d d…<| d   | ¦«¦«|r'|  | ¦«¦«ŒÜ| S) aA Execute a statement using :sql:`VALUES` with a sequence of parameters. :param cur: the cursor to use to execute the query. :param sql: the query to execute. It must contain a single ``%s`` placeholder, which will be replaced by a `VALUES list`__. Example: ``"INSERT INTO mytable (id, f1, f2) VALUES %s"``. :param argslist: sequence of sequences or dictionaries with the arguments to send to the query. The type and content must be consistent with *template*. :param template: the snippet to merge to every item in *argslist* to compose the query. - If the *argslist* items are sequences it should contain positional placeholders (e.g. ``"(%s, %s, %s)"``, or ``"(%s, %s, 42)``" if there are constants value...). - If the *argslist* items are mappings it should contain named placeholders (e.g. ``"(%(id)s, %(f1)s, 42)"``). If not specified, assume the arguments are sequence and use a simple positional template (i.e. ``(%s, %s, ...)``), with the number of placeholders sniffed by the first element in *argslist*. :param page_size: maximum number of *argslist* items to include in every statement. If there are more items the function will execute more than one statement. :param fetch: if `!True` return the query results into a list (like in a `~cursor.fetchall()`). Useful for queries with :sql:`RETURNING` clause. .. __: https://www.postgresql.org/docs/current/static/queries-values.html After the execution of the function the `cursor.rowcount` property will **not** contain a total result. While :sql:`INSERT` is an obvious candidate for this function it is possible to use it with other statements, for example:: >>> cur.execute( ... "create table test (id int primary key, v1 int, v2 int)") >>> execute_values(cur, ... "INSERT INTO test (id, v1, v2) VALUES %s", ... [(1, 2, 3), (4, 5, 6), (7, 8, 9)]) >>> execute_values(cur, ... """UPDATE test SET v1 = data.v1 FROM (VALUES %s) AS data (id, v1) ... WHERE test.id = data.id""", ... [(1, 20), (4, 50)]) >>> cur.execute("select * from test order by id") >>> cur.fetchall() [(1, 20, 3), (4, 50, 6), (7, 8, 9)]) r)Ú ComposableNrõr�ó,s%sr�éÿÿÿÿr-)Ú psycopg2.sqlrþrgÚ as_stringrårMrçrèrréÚ _split_sqlròr‘r_rÊr÷rTÚextendr9) ržrørúÚtemplaterðÚfetchrþÚpreÚpostÚresultrñÚpartsr)s r,Úexecute_valuesr Ãsy€ðx(Ð'Ð'Ð'Ð'Ð'Ý�#�zÑ"Ô"ð!Ø�mŠm˜CÑ Ô ˆõ �c�5Ñ !Ô !ðBØ�jŠj�œ¨¬Ô(?Ô@ÑAÔAˆÝ˜3‘”�I€CˆàÐ "ˆRˆR˜d€Fݘ(¨iÐ8Ñ8Ô8ð *ð *ˆØ РؘdŸiši¨¨µ#°d¸1´g±,´,Ñ(>Ñ?Ô?Ñ?À$ÑFˆHØ�A�A�A”ˆØð ð ˆDØ �LŠL˜Ÿš X¨tÑ4Ô4Ñ 5Ô 5Ð 5Ø �LŠL˜Ñ Ô Ð Ð Øˆˆbˆcˆc‰ Ø � Š �C—H’H˜U‘O”OÑ$Ô$Ð$Ø ð *Ø �MŠM˜#Ÿ,š,™.œ.Ñ )Ô )Ð )øà €Mr-cóÈ—gx}}g}tjd|¦«}|D]®}t|¦«dks|dd…dkr| |¦«Œ9|dd…dkr||ur|}ŒNt d¦«‚|dd…dkr| d¦«Œ�t d|dd… d d ¦«z¦«‚||urt d ¦«‚||fS) z‰Split *sql* on a single ``%s`` placeholder. Split on the %s, perform %% replacement and return pre, post lists of snippets. s(%.)r—Nró%ósz1the query contains more than one '%s' placeholderz"unsupported format character: '%s'Úasciiräz.the query doesn't contain any '%s' placeholder)r°r.r_rÊÚ ValueErrorræ)røÚcurrrrrÕrÐs r,rrs$€ð €O€Dˆ3Ø €DÝ ŒY�x Ñ %Ô %€FØð8ð8ˆÝ ˆu‰:Œ:˜Š?ˆ?˜e B Q Bœi¨4Ò/Ð/Ø �KŠK˜Ñ Ô Ð Ø à ���Œ9˜Ò Ð Ø�sˆ{ˆ{Ø��å ØGñIôIðIà �1�2�2ŒY˜$Ò Ð Ø �KŠK˜Ñ Ô Ð Ð åÐAؘ˜˜”)×"Ò" 7¨IÑ6Ô6ñ7ñ8ô8ð 8ð ˆs€{€{ÝÐIÑJÔJÐJà �ˆ9Ðr-ú[z !"#$%&'()*+,-./:;<=>?@[\]^`{|}~ú]r:)FFNN)FN)ró)NróF)VrBÚosrërrÿÚrer°Ú collectionsrrÚloggingrÖrrrçrr¤rÚ _connectionr r0r Ú functoolsr Úpsycopg2._psycopgr r rÚ_replicationConnectionrÚ_replicationCursorrÚpsycopg2._jsonrrrrrÚpsycopg2._rangerrrrrrrrÚpsycopg2._ipaddressrr rFrKr¹rPr’r”r—rªr¬rÂrÐrÓrôrúrrrr�rr<r^r`rvr‚r„r†r»r½ríròrür rr±ÚescaperÈržr-r,úr!s¡ðððð8ÐÐÐØÐÐÐØÐÐÐØ/Ð/Ð/Ð/Ð/Ð/Ð/Ð/àÐÐÐà€€€Ø'Ð'Ð'Ð'Ð'Ð'Ø)Ð)Ð)Ð)Ð)Ð)Ø1Ð1Ð1Ð1Ð1Ð1Ø0Ð0Ð0Ð0Ð0Ð0Ð0Ð0ØÐÐÐÐÐðððððððððððððððNðNðNðNðNðNðNðNðNðNðNðNðNðNð /ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð/ð 3Ð2Ð2Ð2Ð2Ð2ð9ð9ð9ð9ð9�Wñ9ô9ð9ðx/ð/ð/ð/ð/�[ñ/ô/ð/ð)ð)ð)ð)ð)�ñ)ô)ð)ð83ð3ð3ð3ð3ˆdñ3ô3ð3ðl/ð/ð/ð/ð/˜ñ/ô/ð/ð)ð)ð)ð)ð)�^ñ)ô)ð)ð8 (ð (ð (ð (ð (�+ñ (ô (ð (ðF/ð/ð/ð/ð/˜;ñ/ô/ð/ðUðUðUðUðU�wñUôUðUðp €ˆ3�„ð ð ñ„ð ð $/ ;¨Ñ#?Ô#?ÐÔ ð0/ð0/ð0/ð0/ð0/˜ ñ0/ô0/ð0/ðf 2ð 2ð 2ð 2ð 2�Gñ 2ô 2ð 2ð ?ð?ð?ð?ð?Ð0ñ?ô?ð?ð8 <ð <ð <ð <ð <˜=ñ <ô <ð <ð*ð*ð*ð*ð*Ð#9ñ*ô*ð*ð*ð*ð*ð*ð*Ð$:ñ*ô*ð*ð  ð  ð  ð  ð  �iñ  ô  ð  ðc(ðc(ðc(ðc(ðc(Ð*ñc(ôc(ðc(ðP'ð'ð'ð'ð'ñ'ô'ð'ð*ððððDððððñôðð>ððððBððð8 ð ð ðE&ðE&ðE&ðE&ðE&ñE&ôE&ðE&ðP;@Ø(,ð9Oð9Oð9Oð9Oðx`0ð`0ð`0ð`0ð`0ñ`0ô`0ð`0ðFðððð8ððð&%ð%ð%ð%ð2TðTðTðTðnðððB ˆCŒK؈*ˆ#Œ*Ð9Ñ :Ô :Ñ:¸SÑ@ñ Bô B€ € € r-