Files
boc/aamos-command-center/target/release/deps/libsqlx-c5d18dd9e1ce6482.rlib
T

419 lines
154 KiB
Plaintext
Raw Normal View History

!<arch>
/ 0 0 0 0 98 `
½€½€_ZN4sqlx3any23install_default_drivers17ha00bf8975ade7282EDW.ref.rust_eh_personality// 58 `
sqlx-c5d18dd9e1ce6482.sqlx.c36bb20ac71af7b3-cgu.0.rcgu.o/
lib.rmeta/ 0 0 0 644 113704 `
ELF·¨º@@GNUÀrust
¸#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Á sqlx_macrosÁE­:“òÌË1aO;åÐ-6b848a68f8fd98a9Á sqlx_coreÁÿ/vÍüB@Ô{EQ¶)-7f96e2c2945f07dcÁ futures_coreÁÔ #0€ŒlÏ/œ%áàæ!-54e00c79609f6de3Á futures_utilÁ}h"gœ«ìj¾<G-a74bc5f08cd6c96fÁ
futures_macroÁboÆ$¾É æðGô}-cbbe8d74ceaf6376Á futures_taskÁ+ÓÅfÐ4Pú{-¸*1¨-dcd8a3e2825c89abÁ futures_sinkÁݬwÞÚ7Žª _°à\-005b1f0a7b5abe4aÁpin_project_liteÁc:ž“èqPÔ² låî-fa08336265b0d278Áfutures_channelÁ¿êû„ñ’ óÓ¹-89600126d4fe9190ÁslabÁ˜ìòͺܓ$® %ãÕ6-940e9d610b73c48bÁ
futures_ioÁµ] óŽe_a€FµwBM-52cc55b2510d5c5fÁì46¯¦ŒïõÅ’Z/¯-a454f505f30bc1f2Áevent_listenerÁàÓö±R€P7ˆù;-82fc96b2cc5af504ÁeitherÁÖÖjmì¦å“٤⿥-19d064815a8d8d65ÁserdeÁ£p/oŒÄf ™ðN'ÖŒ×-adfb72fccb405e33Á serde_deriveÁK6ŽŠSöMv×8£<¯-c3e144455e8966deÁ
serde_coreÁ4ô¥’,JÕ„¾­À7&-32e929951ee3d08aÁcrossbeam_queueÁîæLž×ªƒq­ìâ-224f01e201c18748Ácrossbeam_utilsÁ:¯¶äáPÈŠÆ °¯ØxÖ-55d5552e13fd23eeÁlogÁ9:¢¡Áªú:¦#%%%-5bc5b815000aa8c8ÁurlÁÈÞ[ã<lì·»’\.ÑO-34f06a7b5be4ba48Áform_urlencodedÁ™Ù¦)ž-´Ï«Bó¹«i8-b21a6453ec4c6027Ápercent_encodingÁÙSõU<Zj€ËfYê±-608213e915e95613ÁidnaÁ0òd7ÞVϤÉVQ^QzT-0b27c80ee15b2052Á idna_adapterÁå.2,
z+&润§;¥-3894fd78d4e7d69cÁicu_normalizerÁÓ¯J}Û‹q3n,BY:6*-1ff97b6300c65a3bÁ icu_providerÁfý ecVoÒ–×%aƲ-26ba06420635a5f4ÁzerotrieÁÖjxÄ’Rðo„u˜¤îm-8213996ed0004d51Á
displaydocÁ¯Ü-{6È€Ûù˜ˆÈ
|-e6cd9a7bbe869315ÁzerofromÁÚwóÌ77¬R„Jzðè-b5e12a50bee7a139Ázerofrom_deriveÁ#/\(Ûåè
•Ø‹
Ì÷-b0a52e57dcf964fcÁyokeÁC6€2N‹¢ ˜ox4å-693d60a54f4f9cdeÁstable_deref_traitÁÃ2¯c!#wõáÖZÛd¿-1053a3f8bccf45f4Á yoke_deriveÁÓ‚. I©]F@šÔ¶€~-2347d6299a9342ddÁzerovecÁj†o!AÒwþý"»c Z[-a26db0a583c313b8Ázerovec_deriveÁšÚ¾#Àµlþk¸Úéìí¨-e1300b4489bd91f1Á writeableÁŠÚZVd^GmÕĉé2ÏÌ`-eeb981e21830c22aÁicu_locale_coreÁóÍ>­‹ñ§  «©,Û
-f42a734f84d1ee3dÁlitemapÁ^¿V4êg"ˬçˆÅ2Qi&-4f065ea63c011d48ÁtinystrÁ¸˜›s-ªsV¯™j-c7a86e007016634eÁicu_collectionsÁ’!]úâ?ëòPÞQà™N-b882f5a5cafdd8d3Á
potential_utfÁP°g®œH rUæ™-b10cb335d8d170deÁ utf8_iterÁK——Ø]áR.ý#k-ed71523c288ce9d1Áicu_normalizer_dataÁð¯O´¥lȃb­_ls^u-2cc53e133ce07707ÁsmallvecÁ¥uÓöù¤_êÛc6ÃèÏ-57e80a5b3ccd3003Áicu_propertiesÁlÌ;Øßjyq.ê~žCs(-dc4cdd823550a516Áicu_properties_dataÁ“w‘ŠMXöù\ãmq˜õs-1181beec2790515cÁ
serde_jsonÁóN9G;{=ð“÷f×[áSÔ-5cfb308f35ab7820ÁzmijÁ®“ZCE„–/ZÜ&-d24768eed8a8ed6fÁitoaÁû”­eºùîÉ/Þ ÷ŽÚ<¯-8b71445f6e5565f1ÁuuidÁO]±8BˆßQNI$¥ª-4a6263db0768acd5Á getrandomÁqi÷®~*^e¬6ëø1-b4a33f586d36bdb6Á®Ÿ=ê @Êq{0¡¡£ª-c28393f1568b0153Á`ãŒN€ZÛ:õ\-7ce82f3507212cabÁchronoÁ”™i/6zW@Zqÿ¡-8b6d91dfd9c87b8dÁ
num_traitsÁJb_1³*ŸŒ;«º4½-dd2977d8ba4893dbÁiana_time_zoneÁƒCVæ¶–·?¬–56¡î-85071ef9353bd1ffÁhashlinkÁ•iqrª[ÇŽ.ƒ«Ö-e31d491b2bda4c0cÁÐLx+ÁqSôõ‡ØY-1238f8c7406eef35Áallocator_api2Áúd[^Yñ8ȃ$WãC-db2be312fdeda873ÁahashÁí½&“I´yéžÕèÛ>‰\-ddf9877df20145c3ÁzerocopyÁ Nf<Þß§1*²Es-a1936efa8b233a0bÁ once_cellÁ¢ºWšä\S~ò5Î0¤¹-012a7aaa45f49f1fÁõÿõ¥z±ø'p¦²·Ä-ee9662acccf8949dÁbytesÁ1ž;›¢¥³3t´÷¬-9ab8679fb35a705dÁtokioÁ~í˜ÑFN­ˆ‘Û&ÕǬ‚F-2e8a35e14ae82399Á parking_lotÁ‘{%#NÕÆÇî×Âó³®-d304a3d2e3fa0badÁlock_apiÁ6JÂÉ–Coó;³u‰‰×}³-a58f13f6ba8e2585Á
scopeguardÁ±hú`Ã+ú=*ž)$ý-14a1bf74f002cc8bÁparking_lot_coreÁ+G÷-)¢3ñ6w ÷-96dda93fe1f45ff2ÁmioÁjUa?{`å3c@½åk«üj-e2adf0334040c489Á tokio_macrosÁÅm6‡Ä”蚬îAôGôâ-d13c5e580899166cÁsocket2ÁŒí”l.,.O¦Ýžw ê¸_-477bf62e8b01439eÁsignal_hook_registryÁóÓêܤÞß\ÏÍZ¤êk1„-0df3f4b575f2ad33ÁerrnoÁAX'2k$~t—üt]-06a2f72be8b8e935Á sqlformatÁ]ðÊÃÞŽœ^'Ò
-46096afdf397d8a8ÁnomÁþ¼ó$K€
¯C-æC•Ê-e49733404004917cÁunicode_categoriesÁ|äÇCT)T>Õýã:3-1c856d740c512a59Á¹
ý°-V]S8¤ú
õD 0-a3148a17b1a5f781ÁdigestÁP±µÖ+û•Þ¡•ª´¾À-4789fcc75ff26d88Á
crypto_commonÁQs}
[dPiç•éë£-022979c1362b6763Á
generic_arrayÁîŸÑ[óBãzTi
-23ceb53c09b1f24aÁtypenumÁŘ¼ÿÄs7Äo°‹×Õ
-343b991ff7c0c319Á block_bufferÁ"d•œF,Ú¥ùØÕ\-7b70ef144a3336c4ÁsubtleÁ •òeôÝ9鳪pŠ
½-89a615d2f874ad55ÁindexmapÁ’š= ”½‚•ci¡Œ&¤2-654a95d39e9dd495ÁÐmH¯°gÌÕJÂ/d¿V³-1e5c574056266302Á
equivalentÁÆÞ•©¼ôÙ»wÌ’F¬D-4a285f80be49dab1Á thiserrorÁôæ+V£6MÞ]e3\Ó^è-8921bcad3f43f13cÁthiserror_implÁ“Na%9wJx3Ó<¯bx-2cc63a179908345dÁtracingÁ›t*j[6gôˆ×™¡å©-1143666b7efa7da6Á tracing_coreÁƒZ¦øsÞÝŸädY4`-f43ff70b0c5d0314Átracing_attributesÁ©åûFÔ0"õØcΫ±Î-0dabcc58bbccf33aÁ
sqlx_postgresÁñ¸CŽÿºçM©]×™ -88f1726638cb2df2ÁhkdfÁõyjªóÛU•&ÿ£4QF-e8e388965c6f1efaÁhmacÁÑC(¼È[ƒËÔ`Õë-46aebcc1ed280377ÁrandÁ;"¬ð°©äP½üC¾Òf-35a5403282aab811Á rand_coreÁ®Ö CÚ"uÍÿ?ê% ½(-53036fee12357457ÁÝô+šçT ÕÒ>£+4ð-aa0343546db87a82Á rand_chachaÁË!|’¬MŠþ¨ ½¢Ë-959580a3d97bee75Á
ppv_lite86Á¡í8ÉLЇ% ®c¾-2314cc2b118bc50cÁ
stringprepÁyvDçö¨\ê`øEÓܵ-c7f957e16220cd5cÁ unicode_bidiÁ&<Ž®“€—îùdÝ©8v -3620a7802968d356Áunicode_normalizationÁÙLÒ&®Ã}»4~Q#Ó¾\-1a1c38039164aeb6ÁtinyvecÁÖö&^»â(¨"ئ°=-b78005b730023ef3Átinyvec_macrosÁÑð\ÁpŽ¥ƒÁ yÒz¬Úñ-7b606265eeb25177Áunicode_propertiesÁ2^ÓÕœ!4V­3^¿-a0bc00b182b38371Ábase64Á*ø{6± S¬oK=i¦½-56ada73a3c1aa3caÁatoiÁà F)æRZ³^yQz-6e299a341d90d959Á byteorderÁÒQmÖ£¶³³#<Cn-6e3a8fd85d179480Ámd5Á½E¦‘N¾¼ý¥œ†WP-b7ee55712cf79b54ÁbitflagsÁ¨7AvÖb,* èh©¯³Ö-765f98ff397854cfÁhomeÁZ·êòŸD¢qYÌ8-859daca3dc6351abÁwhoamiÁ¡Á‘Ÿ³šÃ(Œ¢Ñ‰-76d1f1b9c77473caÁhexÁ|¥"àè–ïôr
Û%A-e958af846a0557d7ÁcrcÁª§lU$@68À8µ»Á-9c880b0ef6c7b4dfÁ crc_catalogÁ{Ó‚Ä ]J€Ô7!¼us-acdad7ed5cd000c9ÁdotenvyÁ9Þ+ ùÔ‰¬]k"F-fc52930004df5672ÁmysqlÁ,¢
»è5Œ± MySqlÁ,©
»è5MySqlConnectionÁ|°
ȏ5>@
MySqlExecutorÁlÁ
»è5_a MySqlPoolÁLÐ
»è5|~sqliteÁ4
»ý6”› SqliteÁ4—
»ý6SqliteConnectionÁ„Ÿ
»ý6@BSqliteExecutorÁt±
»ý6bd
SqlitePoolÁTÁ
»ý6À 
  
 !"#$%&'()*+,-./0123456789:;<=Ä>?@ABCºGGGGGGGGGG G
G G G
GGG reexportsÁXXGinstall_default_driversÁ[ONCEÁ[ macrosÁ^queryÁ^query_uncheckedÁ^
query_fileÁ^query_file_uncheckedÁ^query_asÁ^
query_file_asÁ^query_as_uncheckedÁ^query_file_as_uncheckedÁ^ query_scalarÁ^query_file_scalarÁ^query_scalar_uncheckedÁ^query_file_scalar_uncheckedÁ^migrateÁty_matchÁll same_typeÁn¥lWrapSameÁp
p¥p¦pˆplv¥v¦væ l WrapSameExtÁzWrappedÁz wrap_sameÁl}¥}¦}÷>l¥¦÷>l MatchBorrowÁ
¥¦ˆl¥¦æ lMatchBorrowExtÁMatchedÁ match_borrowÁl'aÁ³@lÚ@³@l˜Ú@˜³@lÚ@³@lžÚ@ž³@l ¡Ú@¡³@l
¤¥¤³@l §¥§³@l ª¥ª³@l
­¥­³@l°¥°³@l³¥³³@l¥³@l¹¥¹³@l¼¥¼¦¼³@l
conjure_valueÁÀ¥l
dupe_valueÁÂ¥DtypesÁÅÅencodeÁÈÈÈÈEdecodeÁÎÎFÓ;ÒÒÒÒÒ¥ ØØØØØØØØØØ Ø
n
n
y

Ž
¤
§
§
ª
­
­
°
³
³

¹
¹
¼
Â
zzppq>tˆlul ß,(¥Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¦z 8ppq>tˆlul ß,(¥¦Ê?ˆlŠl ¦×˜ó‘`“(Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Ú@Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙúHúHßûHÁ‘4Ý­f‰úM÷Ê?ˆlŠl ¦×˜ó‘`“(Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Ú@
Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙªBªBö­BbufÁ÷<®B÷<9)
-ÜnLÁKçEçEèEGlobalÁ ¿±‡§í#Ê?ˆlŠl ¦×˜ó‘`“(ñHÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Ú@„JÊ?ˆlŠl ¦×˜ó‘`“(õJÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Ú@ŠLÊ?ˆlŠl ¦×˜ó‘`“(¶I„JÊ?ˆlŠl ¦×˜ó‘`“(ºKŠLÊ?ˆlŠl ¦×˜ó‘`“( 8¡H¡HÊ?ˆlŠl ¦×˜ó‘`“( 8 8¥ÎQÊ?ˆlŠl ¦×˜ó‘`“(¡HõPÊ?ˆlŠl ¦×˜ó‘`“(ÎQÄQÊ?ˆlŠl ¦×˜ó‘`“(Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙõPÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¡HÊ?ˆlŠl ¦×˜ó‘`“(Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÄQÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÎQÊ?ˆlŠl ¦×˜ó‘`“(öS®SÊ?ˆlŠl ¦×˜ó‘`“(ÉUU 8Ê?ˆlŠl ¦×˜ó‘`“(¡H§H}p
˜ž¡¤§ª­°³¹¼
zq
nüÚ&ý ŽGî•Yö_1Á_2ÁJ­
yüÞ Oppq>tˆlul ß,(ŽGÙG ÙG_argÁnùž"#  Õö“U…”•–™
 %–™
 ý–™
 ÁK
´™
 M § ïíe¼îËè¿*ÁK
ý¨” …·”e·” =·”
-¹” ¥ã†
  Þ‡[ ÀK­é(

 5 O 

”
~
 3
Æ” ² § ïíe¼îËè¿*‚È‚ÈArgumentÁ„È´ÀbökÏ®ÝWj´
Ç”ýГ äÈ
Ö”
ù@#
ÜW:" ¼ üç
V|ý ’Ƕcýä˜W
â|E‡”ý¾(F
×|Ëý×…¨
à|Uî(

{
µ`
ÅäÈäÈ ArgumentsÁæÈtemplateÁ `çÈÀ `üöMõô]Td;‡[Cä['Ê[%Ü]¤Ä]¡Ä]ŸÄ] Dè\}é(
²?™_ƒµ`a
ÚsÁK°üñ
* ¹Ê?ˆlŠl ¦×˜ó‘`“(ŽGÙG¡ŽüÁ
`ŽGÀb
ŽG Ì
¹ZÒ
¿_uÁIùž"# ‡[~ { x Ê[r ¼ ä[B?;8 5
2 /  
‡[è\*
 ] x 
8]*
¥
 [Ä]( × Ü]¿¼ äÈ·¾Iù@#Ç™_h üÞY³¶c¬®â|ª§×|o¤à|Ÿ
µ`µ`¬Ò`‡[
ä[uÊ[sÜ]òÄ]ïÄ]íÄ]ëàaè\MaØ™_µ`ù–bóùý*#ø
àW‡[#,Àüç/ŽG Nÿh^ùý*#cÿhm‡[#)Âü˜2ŽG ¸•Y­Tý3ÿhqÌ‚  pŽGÙG q,öY7 PhantomDataÁFu\»ŸŽGoŸjFu\»ŸÙGœ£äß  ŽGÙG!.Àb9k@ÉkGNÒG^lÅÈÎØÀG<eÖÞ_L
IntoArgumentsÁl˜£ColumnÁ4Ãé ColumnIndexÁ\æîConnectOptionsÁt“±
ConnectionÁT£ databaseÁ$ÎÈ 
DatabaseÁDÔÔ DescribeÁDüáExecuteÁ<¤À
ExecutorÁD­
FromRowÁ<ÕÙ
¶n
BpoolÁ$ø±PoolÁ$þÏÓ;,  ÄÓ;_
query_withÁT§ Æ¡<DÒ Â¡<c
query_as_withÁlÜ Ç
query_builderÁ$Ø QueryBuilderÁd•éû<dÆ !û<gquery_scalar_withÁŒÔ "raw_sqlÁ<… ©$RawSqlÁ4Ž¥%RowÁ¯Ü& StatementÁLÒ' TransactionÁ\þÌ)TransactionManagerÁ”‹Æ*TypeInfoÁD¾Ñ+ó,ó CValueÁ,ƒà.ValueRefÁDŠñ/EitherÁ4¨!„0errorÁ$ÛX2ErrorÁ,áð3Ía4å=<¡ ÷5å=kpostgresÁDÝ q7 PgConnectionÁdç 8
PgExecutorÁTõ 9PgPoolÁ4 :PostgresÁD‰ ;Òt;AnyÁ¹Í!>KütÎ!>K AnyExecutorÁ\¾¡?NÄ@
DtestingÁ<ªE
test_block_onÁl½ ±Fß;|î„`õ;Tó’a†<¤ù–b°<l€ÚdÄ<”ÙÞeÝ<¼×ãfŽ=Œúðh¦=´ÖöiÃ=ÜÒüj__rtÁ$ùÄEncodeÁ4ÅÍÊÃwÍÌDecodeÁ4ÂÑÏówÑÐAnyPoolÁ<ÇŸ=Y
AnyConnectionÁlñÉ!=¨"øµü' µThe async SQL toolkit for Rust, built with â¤ï¸ by [the LaunchBadge team].
See our [README] to get started or [browse our example projects].
Have a question? [Check our FAQ] or [open a discussion].
### Runtime Support
SQLx supports both the [Tokio] and [async-std] runtimes.
You choose which runtime SQLx uses by default by enabling one of the following features:
* `runtime-async-std`
* `runtime-tokio`
The `runtime-actix` feature also exists but is an alias of `runtime-tokio`.
If more than one runtime feature is enabled, the Tokio runtime is used if a Tokio context exists on the current
thread, i.e. [`tokio::runtime::Handle::try_current()`] returns `Ok`; `async-std` is used otherwise.
Note that while SQLx no longer produces a compile error if zero or multiple runtime features are enabled,
which is useful for libraries building on top of it,
**the use of nearly any async function in the API will panic without at least one runtime feature enabled**.
The chief exception is the SQLite driver, which is runtime-agnostic, including its integration with the query macros.
However, [`SqlitePool`][crate::sqlite::SqlitePool] _does_ require runtime support for timeouts and spawning
internal management tasks.
### TLS Support
For securely communicating with SQL servers over an untrusted network connection such as the internet,
you can enable Transport Layer Security (TLS) by enabling one of the following features:
* `tls-native-tls`: Enables the [`native-tls`] backend which uses the OS-native TLS capabilities:
* SecureTransport on macOS.
* SChannel on Windows.
* OpenSSL on all other platforms.
* `tls-rustls`: Enables the [RusTLS] backend, a crossplatform TLS library.
* Only supports TLS revisions 1.2 and 1.3.
* If you get `HandshakeFailure` errors when using this feature, it likely means your database server does not support
these newer revisions. This might be resolved by enabling or switching to the `tls-native-tls` feature.
If more than one TLS feature is enabled, the `tls-native-tls` feature takes precedent so that it is only necessary to enable
it to see if it resolves the `HandshakeFailure` error without disabling `tls-rustls`.
Consult the user manual for your database to find the TLS versions it supports.
If your connection configuration requires a TLS upgrade but TLS support was not enabled, the connection attempt
will return an error.
The legacy runtime+TLS combination feature flags are still supported, but for forward-compatibility, use of the separate
runtime and TLS feature flags is recommended.
[the LaunchBadge team]: https://www.launchbadge.com
[README]: https://www.github.com/launchbadge/sqlx/tree/main/README.md
[browse our example projects]: https://www.github.com/launchbadge/sqlx/tree/main/examples
[Check our FAQ]: https://www.github.com/launchbadge/sqlx/tree/main/FAQ.md
[open a discussion]: https://github.com/launchbadge/sqlx/discussions/new?category=q-a
[Tokio]: https://www.tokio.rs
[async-std]: https://www.async.rs
[`tokio::runtime::Handle::try_current()`]: https://docs.rs/tokio/latest/tokio/runtime/struct.Handle.html#method.try_current
[`native-tls`]: https://docs.rs/native-tls/latest/native_tls/
[RusTLS]: https://docs.rs/rustls/latest/rustls/
ÁÒG^lÅÈÎØÀ>G?ÖÞ_?¯l1£Íl*éälî€m±
Ÿm ºmûÈ 
ÓmòÔ ìméá…náÀ
nØ
¶nÐÙ
¶nà
BÝṉònÇÏÓ;Æ ÄÓ;Ö_¥o¼ Æ¡<» ¡<ËcÞo® Çüo Øšpéû< !û<¢gÕp "÷py ©$qr¥%¦qnÜ&ºqd'ÔqXÌ)ðqEÆ*“r<Ñ+ó;,óK CÌr6à.âr-ñ/ûr&!„0s X2§sð3Ía4å=÷5å=(kësq7ƒt8 tø9»tñ:Òtè;Òtø;ütåÍ!>KütøÎ!>K§uÚ¡?NÄÙ@Ø
DçuЪEÿu ±Fß;Á`õ;¿a†<½b°<»dÄ<¹eÝ<·fŽ=µh¦=³iÃ=±j­w«ùÄÃw¤ÍÊÃw¹ÍÌówžÑÏów³ÑУxŸ=Y¾xÉ!=ZåèëÜQâ¤vØÛÀÃ̰³ôÓž¬ûqtœ¸bPSìçAœŽ03 äÀòäçÝ໾œ¼´·Äô{lÿeh¼¬^a58”ð'*œŸ ü¼ú´ååèÈËô¨¹´Ð¯„ð~Œq„ÈbTWIL”– C (úýéìÖÙ¿Âä÷ˆŒ»”‚~ä®güFC **SEE DOCUMENTATION BEFORE USE**. Runtime-generic database driver.Áø
ÕüG1Õ
The underlying database drivers are chosen at runtime from the list set via
[`install_drivers`][crate::any::install_drivers]. Any use of [`AnyConnection`] or [`AnyPool`]
without this will panic.
It is recommended to use [`install_default_drivers`][crate::any::install_default_drivers] to activate all currently compiled-in drivers.
Á»º¼ÍíX[OnceÁ$‰ï8GHinstall_driversÁ|° ÚIütàÍ!KütÎ!K AnyArgumentsÁdåLAnyConnectOptionsÁŒóÝ!M§u\†¡NAnyKindÁ<“Ñ!OAnyPoolOptionsÁtœ PAnyQueryResultÁt¬ä!QAnyRowÁ4Àë!R AnyStatementÁdȯSAnyTransactionManagerÁ¬ÖÎT‚¥ÏT AnyTypeInfoÁ\í…"UAnyValueÁDúÎ"V AnyValueRefÁ\„Ô"W|~¸ü˜'žloPSEH36ðò×Ùµ·vx^`Ä•£xAŸY¾x0É!Z¼·bìáHü¬ üƒKH Install all currently compiled-in drivers for [`AnyConnection`] to use.ÁÏúüÓ\Y May be called multiple times; only the first call will install drivers, subsequent callsÁİ will have no effect.ÁÉú ### PanicsÁüÜOL If [`install_drivers`] has already been called *not* through this function.Á¼³ŒY
[ŒÓGï8ï8Ï¢ð8innerÁé8ãTPàVçaBˆ [<closure_kind>Á]<closure_signature>Á]<upvars>Á]][]]ŒYŒYŒYTŽ»Æ;”ùÔó4’”„{ü@= Statically checked SQL query with `println!()` style syntax.ÁAúüEeb This expands to an instance of [`query::Map`][crate::query::Map] that outputs an ad-hoc anonymousÁü«jg struct type, if the query has at least one output column that is not `Void`, or `()` (unit) otherwise:Áú”š ```rust,ignoreÁÄ­ # use sqlx::Connect;ÁüÆ?< # #[cfg(all(feature = "mysql", feature = "_rt-async-std"))]ÁĆ # #[async_std::main]ÁüŸ*' # async fn main() -> sqlx::Result<()>{ÁüÊSP # let db_url = dotenvy::var("DATABASE_URL").expect("DATABASE_URL must be set");Áü¤ZW # if !(db_url.starts_with("mysql") || db_url.starts_with("mariadb")) { return Ok(()) }ÁüÿC@ # let mut conn = sqlx::MySqlConnection::connect(db_url).await?;ÁüÃ,) // let mut conn = <impl sqlx::Executor>;ÁüðLI let account = sqlx::query!("select (1) as id, 'Herp Derpinson' as name")Áì½ .fetch_one(&mut conn)Á„Û
.await?;Áìúüð>; // anonymous struct has `#[derive(Debug)]` for convenienceÁä¯ println!("{account:?}");ÁüÌ1. println!("{}: {}", account.id, account.name);Áþúd # Ok(())Á< # }Á,—¶±üIF # #[cfg(any(not(feature = "mysql"), not(feature = "_rt-async-std")))]Á”ç # fn main() {}Á ```Á úü† HE The output columns will be mapped to their corresponding Rust types.ÁüÏ 85 See the documentation for your database for details:Áˆ
úüŒ
(% * Postgres: [crate::postgres::types]Áüµ
" * MySQL: [crate::mysql::types]矯
SP * Note: due to wire protocol limitations, the query macros do not know whenÁü¬ WT a column should be decoded as `bool`. It will be inferred to be `i8` instead.Áü„ )& See the link above for details.Áü® $! * SQLite: [crate::sqlite::types]ÁÓ úü× \Y **The method you want to call on the result depends on how many rows you're expecting.**Á´
úü¸
ro | Number of Rows | Method to Call* | Returns | Notes |Áü«ro |----------------| ----------------------------|-----------------------------------------------------|-------|Áüž¢Ÿ | None† | `.execute(...).await` | `sqlx::Result<DB::QueryResult>` | For `INSERT`/`UPDATE`/`DELETE` without `RETURNING`. |ÁüÁ | Zero or One | `.fetch_optional(...).await`| `sqlx::Result<Option<{adhoc struct}>>` | Extra rows are ignored. |ÁüÆÂ¿ | Exactly One | `.fetch_one(...).await` | `sqlx::Result<{adhoc struct}>` | Errors if no rows were returned. Extra rows are ignored. Aggregate queries, use this. |Áü‰š | At Least One | `.fetch(...)` | `impl Stream<Item = sqlx::Result<{adhoc struct}>>` | Call `.try_next().await` to get each row result. |Áü§]Z | Multiple | `.fetch_all(...)` | `sqlx::Result<Vec<{adhoc struct}>>` | |Áúü‰[X \* All methods accept one of `&mut {connection type}`, `&mut Transaction` or `&Pool`. Áüåvs † Only callable if the query returns no columns; otherwise it's assumed the query *may* return at least one row.ÁœÜ ## RequirementsÁüð^[ * The `DATABASE_URL` environment variable must be set at build-time to point to a databaseÁüÏda server with the schema that the query string will be checked against. All variants of `query!()`Áü´EB use [dotenv]<sup>1</sup> so this can be in a `.env` file instead.Áúúüþvs * Or, `.sqlx` must exist at the workspace root. See [Offline Mode](#offline-mode-requires-the-offline-feature)Á„õ
below.ÁúüŠ_\ * The query must be a string literal, or concatenation of string literals using `+` (usefulÁüêb_ for queries generated by macro), or else it cannot be introspected (and thus cannot be dynamicÁüÍ$! or the result of another macro).Áòúüö_\ * The `QueryAs` instance will be bound to the same database type as `query!()` was compiledÁüÖ]Z against (e.g. you cannot build against a Postgres database and then run the query againstÁ´´ a MySQL database).ÁËúüÏ[X * The schema of the database URL (e.g. `postgres://` or `mysql://`) will be used toÁü«&# determine the database type.ÁÒúüÖ~ <sup>1</sup> The `dotenv` crate itself appears abandoned as of [December 2021](https://github.com/dotenv-rs/dotenv/issues/74)ÁüØKH so we now use the [dotenvy] crate instead. The file format is the same.Á¤ úü¨ -* [dotenv]: https://crates.io/crates/dotenvÁüÖ /, [dotenvy]: https://crates.io/crates/dotenvyÁ´†! ## Query ArgumentsÁü!^[ Like `println!()` and the other formatting macros, you can add bind parameters to your SQLÁüü!MJ and this macro will typecheck passed arguments and error on missing ones:ÁÊ"ú”Î"ÿ®Äá"š¯üú"?¼¯ĺ#„°üÓ#*¦°üþ#SÚ°,Ò$¶±üØ$Zűü³%JG # let mut conn = sqlx::mysql::MySqlConnection::connect(db_url).await?;Áüþ%,ö²ü«& let account = sqlx::query!(ÁüË&63 // just pretend "accounts" is a real tableÁü‚'_\ "select * from (select (1) as id, 'Herp Derpinson' as name) accounts where id = ?",Á„â'
1i32ÁLó'ìý'´„›(§´¬(úä°(”µüÍ(1ºµdÿ(€¶<Œ)•¶,”)¶±üš)I³¶”ä)…·<÷) ·ÿ)úüƒ*KH Bind paramete
$†“& Š“8«<‹“*”“ —“ ß“ ˜“ Þ“, ¢“8,£“'¨“8Ä\ª“'µ“8Àµd·“ Ó Ä“ Ø“8 source_fileÁ\Å“ Ñ“, Ó“8õ
$Ô“% à“ æ“ ‚”, ç“8õ
$è“& ì“8«<í“$ ô“, ö“ ÷“ €”, ø“8À$ù“& ý“8¯þ“
*„” ‡” ã” ˆ” â”, ’”8,“”'˜”8Ä\š”'¥”8Àµd§” ³” ´” Ü”8€Ì\µ” Á”, Ô8õ
$Ä”$ È”8À$Ê” Ï” Ñ” Û”, Ò” Ó” Ù”, Ô”8À$Õ”
Ú”üì–!üé”da A variant of [query_file!] which does not check the input or output types. This still does parseÁüΕ[šº(|ª–?; Ž— —™ ”— ¢—, •—8õ
$–—& š—8«<›—*¤— §— €˜ ¨— ÿ—, ²—8,³—'¸—8Ä\º—'Å—8ÀµdÇ— Ó— Ô— ù—8€Ì\Õ— á—, ã—8õ
$ä—$ è—8ò¼<ê— ò—8 ,ô—% ˜ ‡˜ £˜, ˆ˜8õ
$‰˜& ˜8«<Ž˜$ •˜, —˜ ˜˜ ¡˜, ™˜8À$š˜& ž˜8¯Ÿ˜
¢˜*¥˜ ¨˜ •™ ©˜ ”™, ³˜8,´˜'¹˜8Ä\»˜'Ƙ8ÀµdȘ Ô˜ Õ˜ Ž™ 8€Ì\Ö˜ â˜, ä˜8õ
$å˜$ é˜8À$ë˜ ð˜ ò˜ ü˜, ó˜ ô˜ ú˜, õ˜8À$ö˜
û˜$ ý˜8ò¼<ÿ˜ ‡™8 ,‰™¬ÔÎü›™`] A variant of [query!] which takes a path to an explicitly defined struct as the output type.Áü™úü€šZW This lets you return the struct from a function or add your own trait implementations.ÁÛšúüßšb_ **This macro does not use [`FromRow`][crate::FromRow]**; in fact, no trait implementations areÁü›?< required at all, though this may change in future versions.Á‚œúü†œc` The macro maps rows using a struct literal where the names of columns in the query are expectedÁüêœ\Y to be the same as the fields of the struct (but the order does not need to be the same).ÁüÇc` The types of the columns are based on the query and not the corresponding fields of the struct,Áü«ž! so this is type-safe as well.ÁÍžúüÑž This enforces a few things:Áüñž0- * The query must output at least one column.Áü¢ŸMJ * The column names of the query must match the field names of the struct.ÁüðŸb_ * The field types must be the Rust equivalent of their SQL counterparts; see the correspondingÁüÓ *' module for your database for mappings:Áüþ ,) * Postgres: [crate::postgres::types]Áü«¡&# * MySQL: [crate::mysql::types]ÁüÒ¡WT * Note: due to wire protocol limitations, the query macros do not know whenÁüª¢[X a column should be decoded as `bool`. It will be inferred to be `i8` instead.Áü†£-* See the link above for details.Áü´£(% * SQLite: [crate::sqlite::types]ÁüÝ£_\ * If a column may be `NULL`, the corresponding field's type must be wrapped in `Option<_>`.Áü½¤>; * Neither the query nor the struct may have unused fields.Áü¤úü€¥b_ The only modification to the `query!()` syntax is that the struct name is given before the SQLÁ\㥠string:Á”ï¥ÿ®Ä‚¦š¯ü›¦?¼¯ÄÛ¦„°üô¦*¦°üŸ§SÚ°,ó§¶±üù§ZűüÔ¨C©²¤˜© #[derive(Debug)]Á¤­© struct Account {Á„©
id: i32,Á¤Ó© name: StringÁ,è©î©úüò©,ö²üŸª" let account = sqlx::query_as!(Á¤Âª Account,Áüת_øÖ„·«à×LÈ«ù×ìÒ«´„ð«§´¬úä…¬”µü¢¬1ºµÔ¬údج€¶<嬕¶,í¬¶±üó¬I³¶”½­…·<Э ·Ø­úüÜ­NK **The method you want to call depends on how many rows you're expecting.**Á«®úü¯®eb | Number of Rows | Method to Call* | Returns (`T` being the given struct) | Notes |Áü•¯eb |----------------| ----------------------------|----------------------------------------|-------|Áüû¯wt | Zero or One | `.fetch_optional(...).await`| `sqlx::Result<Option<T>>` | Extra rows are ignored. |Áüó°µ² | Exactly One | `.fetch_one(...).await` | `sqlx::Result<T>` | Errors if no rows were returned. Extra rows are ignored. Aggregate queries, use this. |Áü©² | At Least One | `.fetch(...)` | `impl Stream<Item = sqlx::Result<T>>` | Call `.try_next().await` to get each row result. |Áüº³PM | Multiple | `.fetch_all(...)` | `sqlx::Result<Vec<T>>` | |Á‹´úü´YV \* All methods accept one of `&mut {connection type}`, `&mut Transaction` or `&Pool`.Áüé´XU (`.execute()` is omitted as this macro requires at least one column to be returned.)ÁµúüƵ52 ### Column Type Override: Infer from Struct FieldÁüüµ]Z In addition to the column type overrides supported by [query!], `query_as!()` supports anÁüÚ¶ additional override option:Áú¶úüþ¶_\ If you select a column `foo as "foo: _"` (Postgres/SQLite) or `` foo as `foo: _` `` (MySQL)ÁüÞ·b_
out_structÁTòÎ& üÎ8õ
$ýÎ$ Ï, ƒÏ8Ó;,„Ï& ‰Ï8$ŠÏ*Ï “Ï îÏ •Ï íÏ, ŸÏ8, Ï'¥Ï8Ä\§Ï'²Ï8Àµd´Ï ÀÏ ÁÏ çÏ 8recordÁ4ÂÏ ÉÏ, ËÏ8ìŽTÌÏ$ ÖÏ8ëµ4ØÏ ßÏ, áÏ8Ó;,âÏ% ïÏ õÏ ¡Ð
, öÏ8ìŽT÷Ï& Ð8õ
$‚Ð$ †Ð, ˆÐ8Ó;,‰Ð& ŽÐ8$Ð$ “Ð, •Ð –Ð ŸÐ, —Ð8À$˜Ð& œÐ8¯Ð
 Ð*£Ð ¦Ð •Ñ ¨Ð ”Ñ, ²Ð8,³Ð'¸Ð8Ä\ºÐ'ÅÐ8ÀµdÇÐ ÓÐ ÔÐ ŽÑ
8¿4ÕÐ ÜÐ, ÞÐ8ìŽTßÐ$ éÐ8ëµ4ëÐ òÐ, ôÐ8Ó;,õÐ$ úÐ8À$üÐ Ñ ƒÑ Ñ, „Ñ …Ñ ‹Ñ, †Ñ8À$‡Ñ
ŒÑÔóÙü›Ñ;8 Combines the syntaxes of [query_as!] and [query_file!].Á×ÑúüÛÑ?< Enforces requirements of both macros; see them for details.Á›Òú”ŸÒÿ®IJÒš¯üËÒ?¼¯Ä‹Ó„°ü¤Ó*¦°üÏÓSÚ°,£Ô¶±ü©ÔZűü„ÕC©²¤ÈÕŒæ¤ÝÕªæ„òÕÈæ¤ƒÖâæ,˜Ö€çžÖúü¢Ö,ö²üÏÖ[X let account = sqlx::query_file_as!(Account, "tests/test-query-account-by-id.sql", 1i32)Áì«×´„É×§´Ú×úäÞ×”µüû×1ºµ­Øúd±Ø€¶<¾Ø•¶,ÆØ¶±üÌØI³¶”–Ù…·<©Ù ·(|±ÙO; ŽÚ ÇÜ ”Ú ´Ú , •Ú8ìŽT–Ú&  Ú8õ
$¡Ú$ ¥Ú, §Ú8õ
$¨Ú& ¬Ú8«<­Ú*¶Ú ¹Ú ˜Û »Ú —Û, ÅÚ8,ÆÚ'ËÚ8Ä\ÍÚ'ØÚ8ÀµdÚÚ æÚ çÚ ‘Û 8¿4èÚ ïÚ, ñÚ8ìŽTòÚ$ üÚ8€Ì\þÚ ŠÛ, ŒÛ8õ
$Û% ™Û ŸÛ ÍÛ
,  Û8ìŽT¡Û& «Û8õ
$¬Û$ °Û, ²Û8õ
$³Û& ·Û8«<¸Û$ ¿Û, ÁÛ ÂÛ ËÛ, ÃÛ8À$ÄÛ& ÈÛ8¯ÉÛ
ÌÛ*ÏÛ ÒÛ ÅÜ ÔÛ ÄÜ, ÞÛ8,ßÛ'äÛ8Ä\æÛ'ñÛ8ÀµdóÛ ÿÛ €Ü ¾Ü
8¿4Ü ˆÜ, ŠÜ8ìŽT‹Ü$ •Ü8€Ì\—Ü £Ü, ¥Ü8õ
$¦Ü$ ªÜ8À$¬Ü ±Ü ³Ü ½Ü, ´Ü µÜ »Ü, ¶Ü8À$·Ü
¼ÜüÌÞüËÜb_ A variant of [query_as!] which does not check the input or output types. This still does parseÁü®Ý[šº(|ŠÞ_; ìÞ ¼á òÞ ß , óÞ8ìŽTôÞ& þÞ8õ
$ÿÞ$ ƒß, …ß8Ó;,†ß& ‹ß8$Œß*’ß •ß à —ß €à, ¡ß8,¢ß'§ß8Ä\©ß'´ß8Àµd¶ß Âß Ãß úß
8¿4Äß Ëß, Íß8ìŽTÎß$ Øß8ëµ4Úß áß, ãß8Ó;,äß$ éß8ò¼<ëß óß8 ,õß% ‚à ‰à µà
, Šà8ìŽT‹à& •à8õ
$–à$ šà, œà8Ó;,à& ¢à8$£à$ §à, ©à ªà ³à, «à8À$¬à& °à8¯±à
´à*·à ºà ºá ¼à ¹á, Æà8,Çà'Ìà8Ä\Îà'Ùà8ÀµdÛà çà èà ³á8¿4éà ðà, òà8ìŽTóà$ ýà8ëµ4ÿà †á, ˆá8Ó;,‰á$ Žá8À$á •á —á ¡á, ˜á ™á Ÿá, šá8À$›á
 á$ ¢á8ò¼<¤á ¬á8 ,®áüÊã$üÀáVS A variant of [query_file_as!] which does not check the input or output types. ThisÁü—âRO still does parse the query to ensure it's syntactically and semantically validÁìêâ for the current database.Á(|ˆão; ïã Ëæ õã •ä , öã8ìŽT÷ã& ä8õ
$‚ä$ †ä, ˆä8õ
$‰ä& ä8«<Žä*—ä šä Šå œä ‰å, ¦ä8,§ä'¬ä8Ä\®ä'¹ä8Àµd»ä Çä Èä ƒå
8¿4Éä Ðä, Òä8ìŽTÓä$ Ýä8€Ì\ßä ëä, íä8õ
$îä$ òä8ò¼<ôä üä8 ,þä% ‹å ’å Àå
, “å8ìŽT”å& žå8õ
$Ÿå$ £å, ¥å8õ
$¦å& ªå8«<«å$ ²å, ´å µå ¾å, ¶å8À$·å& »å8¯¼å
¿å*Âå Åå Éæ Çå Èæ, Ñå8,Òå'×å8Ä\Ùå'äå8Àµdæå òå óå Âæ8¿4ôå ûå, ýå8ìŽTþå$ ˆæ8€Ì\Šæ –æ, ˜æ8õ
$™æ$ æ8À$Ÿæ ¤æ ¦æ °æ, §æ ¨æ ®æ, ©æ8À$ªæ
¯æ$ ±æ8ò¼<³æ »æ8 ,½æÌÑíüÏæZW A variant of [query!] which expects a single column from the query and evaluates to anÁüªç96 instance of [QueryScalar][crate::query::QueryScalar].Áäçúüèç_\ The name of the column is not required to be a valid Rust identifier, however you can stillÁüÈè_\ use the column type override syntax in which case the column name _does_ have to be a validÁü¨é]Z Rust identifier for the override to parse properly. If the override parse fails the errorÁü†ê_\ is silently ignored (we just don't have a reliable way to tell the difference). **If you'reÁüæêb_ getting a different type than expected, please check to see if your override syntax is correctÁôÉë before opening an issue.**ÁèëúüìëZW Wildcard overrides like in [query_as!] are also allowed, in which case the output typeÁäÇì is left up to inference.Áäìúüèì&# See [query!] for more information.Á(|ídÞí ëí Úï ñí ýí, òí8Ó;,óí& øí8$ùí*ÿí ‚î Ðî, Œî8,î'’î8Ä\”î'Ÿî8Àµd¡î ­î ®î Êî8scalarÁ4¯î ¶î8 ¸î$ ¹î8ëµ4»î Âî, Äî8Ó;,Åî% Ñî ×î ñî, Øî8Ó;,Ùî& Þî8$ßî$ ãî, åî æî ïî, çî8À$èî& ìî8¯íî
ðî*óî öî Øï, €ï8,ï'†ï8Ä\ˆï'“ï8Àµd•ï ¡ï ¢ï Òï 8»4£ï ªï8 ¬ï$ ­ï8ëµ4¯ï ¶ï, ¸ï8Ó;,¹ï$ ¾ï8À$Àï Åï Çï Ñï, Èï Éï Ïï, Êï8À$Ëï
ÐïôíðüÞïLI A variant of [query_scalar!] which takes a file path like [query_file!].Á(|«ð; Œñ ‡ó ’ñ  ñ, “ñ8õ
$”ñ& ˜ñ8«<™ñ*¢ñ ¥ñ ÷ñ, ¯ñ8,°ñ'µñ8Ä\·ñ'Âñ8ÀµdÄñ Ðñ Ññ ññ8»4Òñ Ùñ8 Ûñ$ Üñ8€Ì\Þñ êñ, ìñ8õ
$íñ% øñ þñ šò, ÿñ8õ
$€ò& „ò8«<…ò$ Œò, Žò ò ˜ò, ò8À$‘ò& •ò8¯–ò
™ò*œò Ÿò …ó, ©ò8,ªò'¯ò8Ä\±ò'¼ò8Àµd¾ò Êò Ëò ÿò 8»4Ìò Óò8 Õò$ Öò8€Ì\Øò äò, æò8õ
$çò$ ëò8À$íò òò ôò þò, õò öò üò, ÷ò8À$øò
ýòüÉö#ü‹óda A variant of [query_scalar!] which does not typecheck bind parameters and leaves the output typeÁüðó]Z to inference. The query itself is still checked that it is syntactically and semanticallyÁüÎôc` valid for the database, that it only produces one column and that the number of bind parametersÁ|²õ is correct.ÁÂõúüÆõ@= For this macro variant the name of the column is irrelevant.Á(|‡ö; íö þø óö ÿö, ôö8Ó;,õö& úö8$ûö*÷ „÷ ã÷, Ž÷8,÷'”÷8Ä\–÷'¡÷8Àµd£÷ ¯÷ °÷ Ý÷ 8»4±÷ ¸÷8 º÷$ »÷8ëµ4½÷ Ä÷, Æ÷8Ó;,Ç÷$ Ì÷8ò¼<Î÷ Ö÷8 ,Ø÷% ä÷ ê÷ „ø, ë÷8Ó;,ì÷& ñ÷8$ò÷$ ö÷, ø÷ ù÷ ‚ø, ú÷8À$û÷& ÿ÷8¯€ø
ƒø*†ø ‰ø üø, “ø8,”ø'™ø8Ä\›ø'¦ø8Àµd¨ø ´ø µø öø8»4¶ø ½ø8 ¿ø$ Àø8ëµ4Âø Éø, Ëø8Ó;,Ìø$ Ñø8À$Óø Øø Úø äø, Ûø Üø âø, Ýø8À$Þø
ãø$ åø8ò¼<çø ïø8 ,ñøüÅü(ü‚ùda A variant of [query_file_scalar!] which does not typecheck bind parameters and leaves the outputÁüçùUR type to inference. The query itself is still checked that it is syntactically andÁü½ú`] semantically valid for the database, that it only produces one column and that the number ofÁüžû bind parameters is correct.Á¾ûúüÂû@£È(|ƒüŸ; îü ‹ÿ ôü ‚ý, õü8õ
$öü& úü8«<ûü*„ý ‡ý êý, ‘ý8,’ý'—ý8Ä\™ý'¤ý8Àµd¦ý ²ý ³ý äý 8»4´ý »ý8 ½ý$ ¾ý8€Ì\Àý Ìý, Îý8õ
$Ïý$ Óý8ò¼<Õý Ýý8 ,ßý% ëý ñý þ, òý8õ
$óý& ÷ý8«<øý$ ÿý, þ ‚þ ‹þ, ƒþ8À$„þ& ˆþ8¯‰þ
Œþ*þ ’þ ‰ÿ, œþ8,þ'¢þ8Ä\¤þ'¯þ8Àµd±þ ½þ ¾þ ƒÿ8»4¿þ Æþ8 Èþ$ Éþ8€Ì\Ëþ ×þ, Ùþ8õ
$Úþ$ Þþ8À$àþ åþ çþ ñþ, èþ éþ ïþ, êþ8À$ëþ
ðþ$ òþ8ò¼<ôþ üþ8 ,þþ¤˜üÿpm Embeds migrations into the binary by expanding to a static instance of [Migrator][crate::migrate::Migrator].Á€€ú”„€ÿ®ü—€# sqlx::migrate!("db/migrations")Áœ»€ .run(&pool)Á„Ï€§´<à€ ·è€ú”ì€ÿ®üÿ€  use sqlx::migrate::Migrator;Á úü¤OL static MIGRATOR: Migrator = sqlx::migrate!(); // defaults to "./migrations"Á ·üúü€‚_\ The directory must be relative to the project root (the directory containing `Cargo.toml`),Áüà‚^šÄ„¿ƒ‚ÅЃúüÔƒro See [MigrationSource][crate::migrate::MigrationSource] for details on structure of the ./migrations directory.ÁÇ„úüË„41 ## Triggering Recompilation on Migration ChangesÁü€…da In some cases when making changes to embedded migrations, such as adding a new migration withoutÁüå…c` changing any Rust source files, you might find that `cargo build` doesn't actually do anything,ÁüɆYV or when you do `cargo run` your application isn't applying new migrations on startup.Á£‡úü§‡XU This is because our ability to tell the compiler to watch external files for changesÁü€ˆ\Y from a proc-macro is very limited. The compiler by default only re-runs proc macros whenÁü݈c` one or more source files have changed, because normally it shouldn't have to otherwise. SQLx isÁüÁ‰da just weird in that external factors can change the output of proc macros, much to the chagrin ofÁü¦Š-* the compiler team and IDE plugin authors.ÁÔŠúüØŠ\Y As of 0.5.6, we emit `include_str!()` with an absolute path for each migration, but thatÁüµ‹SP only works to get the compiler to watch _existing_ migration files for changes.Á‰ŒúüŒa^ Our only options for telling it to watch the whole `migrations/` directory are either via theÁüïŒ\Y user creating a Cargo build script in their project, or using an unstable API on nightlyÁìÌ governed by a `cfg`-flag.Áêúüî)& ##### Stable Rust: Cargo Build ScriptÁü˜Ž`] The only solution on stable Rust right now is to create a Cargo build script in your projectÁüùŽ:7 and have it print `cargo:rerun-if-changed=migrations`:Á´út¸ `build.rs`Á · fn main() {Áüß63 println!("cargo:rerun-if-changed=migrations");Á,€ç ·¤úü¨PM You can run `sqlx migrate build-script` to generate this file automatically.Áùúüýª§ See: [The Cargo Book: 3.8 Build Scripts; Outputs of the Build Script](https://doc.rust-lang.org/stable/cargo/reference/build-scripts.html#outputs-of-the-build-script)Á¨’úü¬’! #### Nightly Rust: `cfg` FlagÁüÎ’ZW The `migrate!()` macro also listens to `--cfg sqlx_macros_unstable`, which will enableÁü©“`] the `track_path` feature to directly tell the compiler to watch the `migrations/` directory:ÁŠ”ú„Ž”
```sh,ignoreÁüŸ”<9 $ env RUSTFLAGS='--cfg sqlx_macros_unstable' cargo buildÁ<Ü” ·ä”úüè”a^ Note that this unfortunately will trigger a fully recompile of your dependency tree, at leastÁüÊ•YV for the first time you use it. It also, of course, requires using a nightly compiler.Á¤–úü¨–EB You can also set it in `build.rustflags` in `.cargo/config.toml`:Á”î– ```toml,ignoreÁ\ [build]Áü.+ rustflags = ["--cfg=sqlx_macros_unstable"]Á<¼— ·Ä—úüÈ—A> And then continue building and running your project normally.ÁŠ˜úüŽ˜XU If you're building on nightly anyways, it would be extremely helpful to help us testÁüç˜)& this feature and find any bugs in it.Á‘™úü•™b_ Subscribe to [the `track_path` tracking issue](h

zzÍìµ`
zœ„œ„{|{|Íì²`
Ì„|

zzüç
#
µ`²`zz
|µ`Æ/üÁ 1¥~¦~¬€ Æ  É ×F€{  }}Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙŽGü– -8祦ƒƒçÍì¡H Íì§H ž åG„{  ¡H‡5 ¥¦ˆˆ¬€ ö  ù Àb¦×˜ó‘`“(Š‘kÉkÀb‡5il‘kÉkÀb
ŽGÙGwy|~ l‘ktŒ
lÉkäž
¥Œ¦Œ¬€ £
 ¦
ÀbŽüÁ
%È
èŽG èÙGŸc Ö

ŽŽGÙG¿/1Ïb81ü¥œ„,¿œ„œ„ÍìÏgŒüÞ&µ`Ïg
µ`b3ü»HÚ@µH”À<ñHü­JÚ@¹J—²õJü¢LÚ@ýLš§˜˜ñHü˜NÚ@œœ’NõJü‘8Ú@ŸŸ§O žž¶Iüë:Ú@¢¢ðO£ð¡¡ºKüÈ08饥饭‡ ͹P¦dÿ<„¤¤¡Hü”48ê8륨ê¨ëÍìÎQ ˆQ©§§ÎQüä08쥫«ì­‡ éàQ¬d< ªª¡Hü°48í8®îí»‘ µ©R¯­­ÎQü€@8辰ﱭ‡ òR²°°öSüäD8ð8ñ¥´ñð´»‘ éÅTµ<´³³ÉUüÌ@8ò¥·ò·­‡ јV¸d“<˜öSü°D8ó8ô¥ºô󺻑 µáV»<€¹¹ÉUü˜38õ¥½¦¾õ¾½­‡ ½‡  ªW¿<×¼¼§HôçŽG¥ÁÁ¬€ ü
ÀŽG ü˜!ö öŽGŽG¥Ãà ±¬€ ª
ÂŽGý¦4l€³;lÂü˜+( Conversions between Rust and SQL types.ÁÄúüÈ_\ To see how each SQL type maps to a Rust type, see the corresponding `types` module for eachÁ
database:Áúüº" * Postgres: [postgres::types]ÁäÝ * MySQL: [mysql::types]Áôú * SQLite: [sqlite::types]Áä™ * MSSQL: [mssql::types]Áúüº]Z Any external types that have had [`Type`] implemented for, are re-exported in this moduleÁü˜^[ for convenience as downstream users need to use a compatible version of the external crateÁü÷,) to take advantage of the implementation.Á¤ų́ [`Type`]: types::TypeÁó$¿Æó ÇþÆØFÆUuidÁ%«ÆJsonÁ%ÿÿÆÖžÆ JsonRawValueÁe…Æ JsonValueÁM“C“ÆTextÁ%®ƒÆ»ŸÆ„ÞŒ²òt–üÈMJ Provides [`Encode`](encode::Encode) for encoding values for the database.ÁÃw4ÇÊÃwÌIsNullÁ4ÏËŒ³;=œ—¤·Ë;tüÎNK Provides [`Decode`](decode::Decode) for decoding values from the database.Áów4ÍÏówÐ̺#œ”¤´û;lüËDA Types and traits for the `query` family of functions and macros.Á,˜MapÁ¿»ÔQueryÁ,ijÕQueryAsÁ<íÖ QueryScalarÁ\Ãׄ¬`bMOäØ<ü‚$&|×ü«+( Convenience re-export of common traits.ÁG<üÖÙ€mt˜ ±Ú
ŸmT» Û ów4Ú ÜÑÏówÜÑÐÃw4õ ÝÍÊÃwÝÍÌnD!
Þ¶n<­!Ù
ß¶n
ßB¯llÉ!£à¦që!Üá&ºqLƒ"â'ó$¡"ã,ó ãCtõH¬‘ :Œ´ ,ó|‰!Çt¦!¸¤Â!Tä!‡„ü!x\š"i:- ú--² -Ü-ð-¼-À--Û-ß-¯----ê-î-·-G-v
crate::sqliteÁÚCÃwpostgres::typesÁq€ :https://www.github.com/launchbadge/sqlx/tree/main/examplesÁ
Check our FAQÁ8https://www.github.com/launchbadge/sqlx/tree/main/FAQ.mdÁtokio::runtimeÁ=https://docs.rs/tokio/latest/tokio/runtime/struct.Handle.htmlÁcrate::sqlite::SqlitePoolÁÚCÃwësbrowse our example projectsÁ›©Ú©tokio::runtime::HandleÁ©ª¼ªÚCÈ;https://www.github.com/launchbadge/sqlx/tree/main/README.mdÁ°«›©ësÜ«©ªý6ÄCREADMEÁ¬°«ësqÜ«ý6ÄChttps://www.launchbadge.comÁô¬¬decode::DecodeÁ%tokio::runtime::Handle::try_current()Áý6!ÄCÅthe LaunchBadge teamÁ¨­ô¬encode::EncodeÁÔ­https://www.async.rsÁì­›!®®¨­ types::TypeÁ Ó®Ô­ async-stdÁñ®ì­ó %https://docs.rs/rustls/latest/rustls/Á!mssqlÁ©¯®®Ó®https://www.tokio.rsÁϯñ®óRusTLSÁó¯ów mssql::typesÁ¢°©¯TokioÁðϯó-https://docs.rs/native-tls/latest/native_tls/Áí°ó¯ÿCów
sqlite::typesÁˆ±¢°@https://github.com/launchbadge/sqlx/discussions/new?category=q-aÁª±ðù7
native-tlsÁʱí°ÿC mysql::typesÁ’²ˆ±ówopen a discussionÁ°²ª±ù7è5樆³ʱ‚©¦³ÿCÎ’²ì©ͳ°²è5ù7þªæ¨†³Ãw‚©¦³Ú©ì©ͳè5¼ªþª£xcrate::any::install_driversÁ Ú
crate::anyÁG梾x™;#crate::any::install_default_driversÁ£x”µ¹µæ¢ Ú¾x™;ൣx”µ¾x¹µæ¢™; [ൠ[£x”µ Ú¹µG梾xÉ!™;ൣxŸ”µ¹µæ¢¾x™;ൣx”µ¾x¹µæ¢™;ൠ樶n$proc-macro2 docs / Unstable FeaturesÁ/https://docs.rs/proc-macro2/1.0.27/proc_macro2/Á Offline ModeÁ
December 2021Á-https://github.com/dotenv-rs/dotenv/issues/74Á query_as!Á query_file!Áquery_file_as!Á.https://github.com/rust-lang/rust/issues/73921Á™¸¸https://crates.io/crates/dotenvÁö¸‡¹!https://crates.io/crates/sqlx-cliÁ˹Ù¹õ;the track_path tracking issueÁü¹û<g™¸dotenvÁ»ºö¸the README for sqlx-cliÁëº˹õ;Chttps://doc.rust-lang.org/stable/cargo/reference/build-scripts.htmlÁ¢»û<crate::sqlite::typesÁÚ»ü¹»ºÞ£+https://github.com/rust-lang/rfcs/pull/3307Áñ»ëºõ;>The Cargo Book: 3.8 Build Scripts; Outputs of the Build ScriptÁž¼¢» crate::mysqlÁñ¼Ú»û<°<RFC 3307Á¢½ñ»Þ£crate::migrate::MigratorÁcrate::migrate::MigrationSourceÁ㽞¼crate::mysql::typesÁ¶¾ñ¼ú see belowÁݾ¢½°<Þ£MigratorÁ·5ü¾crate::migrateÁk¡<crate::postgresÁÍ¿¶¾™¿ã½ú>https://dev.mysql.com/doc/internals/en/com-query-response.htmlÁö¿ݾ°<query_file_scalar!Á·5›Àü¾°!³À™¿å¡<crate::postgres::typesÁØÀÍ¿ú.the ColumnDefinition structure in COM_QUERY_OKÁ‰Áö¿
query_scalar!ÁÝÁ·5›ÀMigrationSourceÁÓ;³À÷ crate::queryÁ_ ÂØÀq¡<bhttps://dev.mysql.com/doc/dev/mysql-server/8.0.12/group__group__cs__column__definition__flags.htmlÁ̉Ácrate::query::QueryScalarÁ‹ÃÝÁ®ÃÓ;crate::query::MapÁÒà ĠÂq€ the NOT_NULL flagÁýÃÌÂcrate::FromRowÁ
ðċîÃÓ;
query::MapÁ¥ÅÒÃÒ https://crates.io/crates/dotenvyÁÑÅýÃquery!ÁóÅðÄÃŽ=h樶n¢Æ¥Å»™¹ÂÆÑÅé¹óÆóÅÙ
Ž=樶n¢Æ¸‡¹™¹ÂÆÙ¹é¹óÆŽ=Ö£éî±Ô À

Ù
ÜÆÑàñ¡ØŠ ³ºµßíßÃLðì ãàéæŒ""“""Û Þ ã ŒMÃMÐLÇLùMÌìÍì“í²—6¡ØŠ ³ºµßíßÃLðì ãàéæŒ""“""Û Þ ã ŒMÃMÐLÇLùMÌìÍì“í²—6ØŠ ³ºµßíßÃLðì ãàéæŒ""“""Û Þ ã ŒMÃMÐLÇLùMÌìÍì“í²—6ØŠ ³ºµßíßÃLðì ãàéæŒ""“""Û Þ ã ŒMÃMÐLÇLùMÌìÍì“í²—6only for type resolutionexplicit panicû˚̳÷Ç
²kÃ^”x
€Þp1&ŒHÕ8QV´Óˆ´º-ëš,6Ú÷ÊútÕZt®,´C6Ì3Jyã°\äVHN²’辑°|“<÷Ú·¸ËhwÇ`AðÓ"‘…àÎ(ÔXÄ-pè;³ Ôv©õS|É×R¶Ëž}íðQ
±æÜc^óqú¡:ð¦⤾ówÙÙ Þœ«5Ri„Ÿ¾äcy­ ?'ÿðÑ•xµÖôž£‰Ø¢yvhš0Cbƒý‹ÄðxðŽ×¶yæ:‚û}S_'íí2Þî$­ÖàK%!»·ï³¢œ3O­Bm‰éî&Í—…1Re)qv•ìÊòŽëvë©øú>û- an¹*˜2çô"`M¶ß¨E¢ —Pȸ‡ -&Wmq®B2×_,eBYÃÕ'Xœ-—G}œí3Øš‘WBÛ%¨8¢b;=
µNðèvú_˜û“’Œ\)ZëÖ¥cñ–=ÉNÖAçÞ‚â$±¤0}IØšjÊ.e¨ÔÏ„~“¤¹ÌžúÉ–oâlVMñSVfQö}ÿ$¨)FÁ³4ï\òLÎ,EºšãëÃëf!ÀÅÑrª¹o`л†*Ç<\h§hÌö~×x=b9«…v)ƒŠ­ÏÕ– ŒÁw.rÔÔOMªiøoh“MÂ’wªËË5PLQÀŸùÂM¦#O[…K>hÏKIkœ24×û—àÅŽðzVÂ-mqÃjðÕ‹Âð"íª«ÉBxNʉvh$ wÔâŸ{HSv
ÜÂÈE3ïŒ)e@Î3GržvKçªÈB¸[kÄ1É«0|4LÕª—Àe®;ÑÜBGlˆJÑ:Góö/?cMX³ Ô,}ÌYm«‰ÞRQÒYIlsó–[·0¥pÄiæ%ë2ÔÂU_èMP×èJêÞ9á&´µW0Ú"'ðLR›ÿ,AÂ¥¹¶èÚlZ>6Ë•5»ÿwU…sªÏNÞR¥SdSÕmc\U·×.ë)Á$CìáˆkŒA×ÔWð5rnDœ!çÉ®_[PÔƒ„€¦ëpZé[;À„@!Q¹$y±u/_Y|‰ç.¥µ{­/æ)½;h[’E’ÀMèa™–%듘­F‡¿Ks<& µI¸D(·ï=i'ÆEÄ®råº ô½äÖ®×3¾éÀ²W$]+šy½tH€üŽ rI"úÓ(
Ú1М}˜Ï˜Brˆ$Іôa]×<"êç± sÏAâúX¶„‹Àëí÷'+
·¼ò~9ëœ]Dwà"²þ´ïÅŠ‹n»5¦2tŒb®ü6xòå¹%waܲN¸âZ]`lx¯±Äá)u¤“ÉÂý¹h;‹ˆðGžqJPÞQ¥É%-ø~äëg5ò+,íRÛ Ú/îÖ`ÙLáÃw5}ü¬öã¯>Ò¥œõö(+\ Ç@Jágc„Mî0‚(¯(Šäèá ßõ.i°µ<«îþ.!t_ØÊcBÔÔwp§;´™ô˜`·lb8Aìý0×PVνN„¿KJÙ÷ÝZ]¿ºFbŽý¶¦Å =ºšNY¼Ñºú{›ÈÍ¿ŸÒŠZ_>råÈÀ¾è²×Ä›JÔwDD;4Çög‰ÌÚ_‹ª†³êIÔÈÉÅ4ùdñŸf– Žüt@)æ‚7Ón 2×a4R«çzÀÓk%N6{w¿t¦r
@H÷£¹À>!i'Å «°Ú¸Áõt£4¤ŒøBc&^ÉåEõ°wÆj=ÿÛgŽ†Ù¼Â©ùTa¯²m¢“¡`ß}y÷¤ýÔÐq©º$NŽÙT¨>å}(Ó÷d¡”?GÇa
GB~ Áa
U€£¥+æ½L4
<¨»,
O&5隆¢ï5|Sã¼9Y4O|h&•Ün$bd}ez2Äxw²ö®šýbB]
¯
ÎWõãƵZOëû÷£xI@ÞÎå.*ñ„°(;tàxv]¹™)p¸‹L6ícv±¤´xÏ'©ä°vŸ Ÿ‡=k#1Cõ¶ôvIø B½C_]€äT¼ÄLo/t•áˆò®–Û×àYóÃrAõ$ñÀŽ]@˜?ZäX¢Änüù§ ?rµ‘`ûùF'š“ÓI ôþˆDHy$$Õ»7é0Ý&dÌeqpµá5 99ÁØnlЫÆcÒtÁÕÒ;ÏÌ2¶Åm½’%§qaÛÉÚønT
0$ðVer÷^ Q.ï8þû”²4WmÛ
aàmª+ʉÝc0Åê&9ÐÏS4É`I\gnÏ÷¯%ö«"{C¤I€áí€Dewt=Q$ßX¶Ì³Þt·Xßî9s§ÿ@…|FéÀ 5Éd~/8Ü3ejÉbߣâú"cŸ‰ü-´„uy}SÛ|5ˆX“ÙsÆô@yl ¥Tã{zü½Š5Ž“ã¦Þªb_+x•“ënkI3$RÁäV']!>c ý8۪ʢxš‰m³Ýá—Âs  :;°øÚ,ÝJe¹¹ým,
ô{1üLÐEr&kjŸßNS‹£AñdÃ)ËŽÛžºyÀ`a<JINQjS

g

Õ
ï
[ t Í H ò©C/ILQjS/V ÿÆ÷P˜S<ÈvNä½"g¬ñ6{ÖL® ~ ì N
¼
5  +++++++++++++ '  


'  















.IKQhSUGU-VчÕìÜàøèÿgÿæÿa¨¾@îŸw Um÷J²Ý8}ÂLóiË9  
k
Ù
_  ä öOR^<æMìMïMõMøMþMN NNNN"N&N-N3N:N>NDNJNQNUN\NbNfNlNrNvN|NN†NN“N—NN£N§N­N³NºNÂNÆNÌNÒNÙNàNäNêNðN÷NûNOOOOO O&O,O2O8O<O@OFOLOSOWO]OcOjOqOxO
SSSS"S(S.S4S:S@SFSJSNSRSVSZS^SŠSS˜S,UŽUV/VŸœ¾§«ÊÔٗߦâîëÚþFÿKÿÐÿÝÿIˆ¢¸Î %|æû;}ŠóUboˆó5BOgÁÎÛ?ªÁ*0IouŽ´ºÓùÿ>D]ƒ¢ÞëTazÃÜ$ 1 J ¬ ô 

V
c
|
Ä
Ñ
ê
= J W p » È 0 = D äèž¥*08?úþ  §®µ»ÁÇÍÓÙßåìòùÿ
")07>ELSZéMòMûMNNNNN)N0N7NANGNNNXN_NiNoNyNN‰NNšN NªN°N·N¿NÉNÏNÖNÝNçNíNôNþNO OOO#O)O/O5OCOIOPO[OaOgOnOuOGQ
SSS%S+S1S7S=SCSHSLSPSTSXS\SdSŽS•SU0U)V~Ñ„ÕçÜýßõèÿIÿPÿÒÿâÿLЦ¼
)êŒWdsö7DSkÃÐàF®Æ.4sy¸¾ýBHàïVe¸Ç& 5 ˆ ö 
X
g
Æ
Õ
? L [ t ½ Í 2 A òìKš¢.4<
N¤«²¹¿ÅËÑ×Ýâéïöü
&-4;BIPW]&UOU÷U©ÿÚÿ xŸ²Èô"g÷*b¨*_l¸#?L`x©ËØ!_¼ñBc¨Ìí2VwÊèý8^s¢ÀÕ . C r  ¥ à þ 
B
`
u
°
Î
ã
! G T i © Å  :  UIU¥U’ÿÔÿéÿpŒªÀÔ[ï"BŽ úYfx9FWoÅÒK³è 9P~ÃÚMd©âô XjºÌã( : Q Š œ ³ ø 
!
Z
l
ƒ
È
Ú
ñ
A N `  ¿ þ 4 (UQUûU»ÿ#~Ìk.t¬LÊ*e}»&ö GeŒªÑï4[y ÔJx¬Ú H | ª ê 
L