JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr ғg#<dZddlZddlmZddlmZmZmZmZddl m Z m Z ddl m Z mZmZmZddlmZdd lmZmZmZmZmZmZmZmZmZmZdd lmZm Z 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.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9d Z:d Z;dZdZ?gdZ@y)z$MySQL X DevAPI Python implementationN) constants) STRING_TYPESurlparseunquote parse_qsl)XSession NodeSession)Schema CollectionTableView)DbDoc) ErrorWarningInterfaceError DatabaseErrorNotSupportedError DataErrorIntegrityErrorProgrammingErrorOperationalError InternalError)ColumnMetaDataRowResultBufferingResult RowResult SqlResult ColumnType) StatementFilterableStatement SqlStatement FindStatement AddStatementRemoveStatementModifyStatementSelectStatementInsertStatementDeleteStatementUpdateStatementCreateCollectionIndexStatementDropCollectionIndexStatementCreateViewStatementAlterViewStatement ColumnDefGeneratedColumnDef ForeignKeyDefExprc"tjd}tjd}tjd}g}|j|r#|jd}|j |}n3t dj |}|j|jdS|ri}|jdj}|j|}|r<|jdj}t|jd |d <t dj |}|jstd j ||j|d <|j|d <|j||rd |iS)zParses a list of host, port pairs Args: address_list: String containing a list of routers or just router Returns: Returns a dict with parsed values of host, port and priority if specified. z^\[(?![^,]*\]).*]$z,(?![^\(\)]*\))zJ^\(address\s*=\s*(?P
.+)\s*,\s*priority\s*=\s*(?P\d+)\)$z[]z//{0})hostportraddresspriorityzInvalid address: {0}r5r6routers)recompilematchstripsplitrformathostnamer6popgroupintrappend) address_listis_listhst_listpri_addrr9r<routerr7s f/opt/hc_python/lib64/python3.12/site-packages/../../../lib/python3.12/site-packages/mysqlx/__init__.py_parse_address_listrK1sWzz/0Gzz,-HzzghHG}}\"#))$/ ~~l3  56NNJJ  ""1%++-w' kk),224G!$U[[%!>w!GH Hvvv   !!cRddi}dj|jdrdnd|}|jdd\}}|jdddd \}}|jd ddd \}}|j d }||dj d d ur|dkDr|j d d\}|d<|jd}|r|rd|vrtdj||jdd\|d<|d<|jdrt||d<n6|jdr td|jt|tt|djD]&\}} t| jdxsd||<(|S)aParses the connection string and returns a dictionary with the connection settings. Args: uri: mysqlx URI scheme to connect to a MySQL server/farm. Returns: Returns a dict with parsed values of credentials and address of the MySQL server/farm. schemaz{0}{1}z mysqlx://z://r@N?/)rz():zMalformed URI '{0}'userpassword)rSz...socketz\.zWindows Pipe is not supported.T)r? startswithr> partitionrfindfindrsplitr=rrupdaterKdictritems) urisettingsschemetempuserinfor5 query_strposoptvals rJ_parse_connection_urirl\s"~H //{ ;"*C 1C99UA&LFD^^C(1-NHdnnS)#A#.OD) **S/C CDzsr!cAg#';;sA#6 hx ::d D x3h#6299#>??-5^^C-C*HVhz* '($T]  =>>+D129d34::<S $08D = OrLcd|vr|dr t|d|d<d|vr|dr t|d|d<yd|vrd|d<yy#t$r tdwxYw#t$r tdwxYw)aValidates the settings to be passed to a Session object the port values are converted to int if specified or set to 33060 otherwise. The priority values for each router is converted to int if specified. Args: settings: dict containing connection settings. r8zInvalid priorityr6z Invalid portr5i$N)rC NameErrorr)rds rJ_validate_settingsrosX(:"6 5#&x ';#rs0+ >>-11HHH,,,AAAAAA)"V$L!. D"!( rL