| 1 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::protocolrust-analyzer cargo sqlx-mysql 0.8.3 protocol/::textrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/::ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#; |
| 2 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::{ |
| 3 | MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#, MySqlColumnrust-analyzer cargo sqlx-mysql 0.8.3 column/MySqlColumn#, MySqlConnectOptionsrust-analyzer cargo sqlx-mysql 0.8.3 options/MySqlConnectOptions#, MySqlConnectionrust-analyzer cargo sqlx-mysql 0.8.3 connection/MySqlConnection#, MySqlQueryResultrust-analyzer cargo sqlx-mysql 0.8.3 query_result/MySqlQueryResult#, MySqlRowrust-analyzer cargo sqlx-mysql 0.8.3 row/MySqlRow#, |
| 4 | MySqlTransactionManagerrust-analyzer cargo sqlx-mysql 0.8.3 transaction/MySqlTransactionManager#, MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#, |
| 5 | }; |
| 6 | use eitherrust-analyzer cargo either 1.18.0 crate/::Eitherrust-analyzer cargo either 1.18.0 Either#; |
| 7 | use futures_corerust-analyzer cargo futures-core 0.3.34 crate/::futurerust-analyzer cargo futures-core 0.3.34 future/::BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#; |
| 8 | use futures_corerust-analyzer cargo futures-core 0.3.34 crate/::streamrust-analyzer cargo futures-core 0.3.34 stream/::BoxStreamrust-analyzer cargo futures-core 0.3.34 stream/BoxStream#; |
| 9 | use futures_utilrust-analyzer cargo futures-util 0.3.34 crate/::{streamrust-analyzer cargo futures-util 0.3.34 stream/, StreamExtrust-analyzer cargo futures-util 0.3.34 stream/stream/StreamExt#, TryFutureExtrust-analyzer cargo futures-util 0.3.34 future/try_future/TryFutureExt#, TryStreamExtrust-analyzer cargo futures-util 0.3.34 stream/try_stream/TryStreamExt#}; |
| 10 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::{ |
| 11 | Anyrust-analyzer cargo sqlx-core 0.8.3 any/database/Any#, AnyArgumentsrust-analyzer cargo sqlx-core 0.8.3 any/arguments/AnyArguments#, AnyColumnrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#, AnyConnectOptionsrust-analyzer cargo sqlx-core 0.8.3 any/options/AnyConnectOptions#, AnyConnectionBackendrust-analyzer cargo sqlx-core 0.8.3 any/connection/backend/AnyConnectionBackend#, AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#, AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#, |
| 12 | AnyStatementrust-analyzer cargo sqlx-core 0.8.3 any/statement/AnyStatement#, AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#, AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#, |
| 13 | }; |
| 14 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::connectionrust-analyzer cargo sqlx-core 0.8.3 connection/::Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#; |
| 15 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::databaserust-analyzer cargo sqlx-core 0.8.3 database/::Databaserust-analyzer cargo sqlx-core 0.8.3 database/Database#; |
| 16 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::describerust-analyzer cargo sqlx-core 0.8.3 describe/::Describerust-analyzer cargo sqlx-core 0.8.3 describe/Describe#; |
| 17 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::executorrust-analyzer cargo sqlx-core 0.8.3 executor/::Executorrust-analyzer cargo sqlx-core 0.8.3 executor/Executor#; |
| 18 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::transactionrust-analyzer cargo sqlx-core 0.8.3 transaction/::TransactionManagerrust-analyzer cargo sqlx-core 0.8.3 transaction/TransactionManager#; |
| 19 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/; |
| 20 | |
| 21 | sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::declare_driver_with_optional_migraterust-analyzer cargo sqlx-core 0.8.3 any/driver/declare_driver_with_optional_migrate!!(DRIVERrust-analyzer cargo sqlx-mysql 0.8.3 any/DRIVER. = MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#); |
| 22 | |
| 23 | impl AnyConnectionBackendrust-analyzer cargo sqlx-core 0.8.3 any/connection/backend/AnyConnectionBackend# for MySqlConnectionrust-analyzer cargo sqlx-mysql 0.8.3 connection/MySqlConnection# { |
| 24 | fn namerust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]name().(&self) -> &str { |
| 25 | <MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql# as Databaserust-analyzer cargo sqlx-core 0.8.3 database/Database#>::NAMErust-analyzer cargo sqlx-mysql 0.8.3 database/impl#[MySql][Database]NAME. |
| 26 | } |
| 27 | |
| 28 | fn closerust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]close().(self: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]>) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'static, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 29 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::closerust-analyzer cargo sqlx-mysql 0.8.3 connection/impl#[MySqlConnection][Connection]close().(*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().self) |
| 30 | } |
| 31 | |
| 32 | fn close_hardrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]close_hard().(self: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]>) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'static, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 33 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::close_hardrust-analyzer cargo sqlx-mysql 0.8.3 connection/impl#[MySqlConnection][Connection]close_hard().(*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().self) |
| 34 | } |
| 35 | |
| 36 | fn pingrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]ping().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 37 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::pingrust-analyzer cargo sqlx-mysql 0.8.3 connection/impl#[MySqlConnection][Connection]ping().(self) |
| 38 | } |
| 39 | |
| 40 | fn beginrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]begin().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 41 | MySqlTransactionManagerrust-analyzer cargo sqlx-mysql 0.8.3 transaction/MySqlTransactionManager#::beginrust-analyzer cargo sqlx-mysql 0.8.3 transaction/impl#[MySqlTransactionManager][TransactionManager]begin().(self) |
| 42 | } |
| 43 | |
| 44 | fn commitrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]commit().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 45 | MySqlTransactionManagerrust-analyzer cargo sqlx-mysql 0.8.3 transaction/MySqlTransactionManager#::commitrust-analyzer cargo sqlx-mysql 0.8.3 transaction/impl#[MySqlTransactionManager][TransactionManager]commit().(self) |
| 46 | } |
| 47 | |
| 48 | fn rollbackrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]rollback().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 49 | MySqlTransactionManagerrust-analyzer cargo sqlx-mysql 0.8.3 transaction/MySqlTransactionManager#::rollbackrust-analyzer cargo sqlx-mysql 0.8.3 transaction/impl#[MySqlTransactionManager][TransactionManager]rollback().(self) |
| 50 | } |
| 51 | |
| 52 | fn start_rollbackrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]start_rollback().(&mut self) { |
| 53 | MySqlTransactionManagerrust-analyzer cargo sqlx-mysql 0.8.3 transaction/MySqlTransactionManager#::start_rollbackrust-analyzer cargo sqlx-mysql 0.8.3 transaction/impl#[MySqlTransactionManager][TransactionManager]start_rollback().(self) |
| 54 | } |
| 55 | |
| 56 | fn shrink_buffersrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]shrink_buffers().(&mut self) { |
| 57 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::shrink_buffersrust-analyzer cargo sqlx-mysql 0.8.3 connection/impl#[MySqlConnection][Connection]shrink_buffers().(self); |
| 58 | } |
| 59 | |
| 60 | fn flushrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]flush().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<()>> { |
| 61 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::flushrust-analyzer cargo sqlx-mysql 0.8.3 connection/impl#[MySqlConnection][Connection]flush().(self) |
| 62 | } |
| 63 | |
| 64 | fn should_flushrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]should_flush().(&self) -> bool { |
| 65 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::should_flushrust-analyzer cargo sqlx-mysql 0.8.3 connection/impl#[MySqlConnection][Connection]should_flush().(self) |
| 66 | } |
| 67 | |
| 68 | #[cfg(feature = "migrate")] |
| 69 | fn as_migraterust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]as_migrate().( |
| 70 | &mut self, |
| 71 | ) -> sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<&mut (dyn sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::migraterust-analyzer cargo sqlx-core 0.8.3 migrate/::Migraterust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send# + 'static)> { |
| 72 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(self) |
| 73 | } |
| 74 | |
| 75 | fn fetch_manyrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]fetch_many().<'q>( |
| 76 | &'q mut self, |
| 77 | query: &'q str, |
| 78 | persistent: bool, |
| 79 | arguments: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<AnyArgumentsrust-analyzer cargo sqlx-core 0.8.3 any/arguments/AnyArguments#<'q>>, |
| 80 | ) -> BoxStreamrust-analyzer cargo futures-core 0.3.34 stream/BoxStream#<'q, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<Eitherrust-analyzer cargo either 1.18.0 Either#<AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#, AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#>>> { |
| 81 | let persistent = persistent && arguments.is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().(); |
| 82 | let arguments = match arguments.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(AnyArgumentsrust-analyzer cargo sqlx-core 0.8.3 any/arguments/AnyArguments#::convert_torust-analyzer cargo sqlx-core 0.8.3 any/arguments/impl#[`AnyArguments<'q>`]convert_to().).transposerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<Result<T, E>>`]transpose().() { |
| 83 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(arguments) => arguments, |
| 84 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(error) => { |
| 85 | return streamrust-analyzer cargo futures-util 0.3.34 stream/::oncerust-analyzer cargo futures-util 0.3.34 stream/once/once().(futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/::readyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/ready/ready().(Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#::Encoderust-analyzer cargo sqlx-core 0.8.3 error/Error#Encode#(error)))).boxedrust-analyzer cargo futures-util 0.3.34 stream/stream/StreamExt#boxed().() |
| 86 | } |
| 87 | }; |
| 88 | |
| 89 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().( |
| 90 | self.runrust-analyzer cargo sqlx-mysql 0.8.3 connection/executor/impl#[MySqlConnection]run().(query, arguments, persistent) |
| 91 | .try_flatten_streamrust-analyzer cargo futures-util 0.3.34 future/try_future/TryFutureExt#try_flatten_stream().() |
| 92 | .maprust-analyzer cargo futures-util 0.3.34 stream/stream/StreamExt#map().(|res| { |
| 93 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(match res?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 94 | Eitherrust-analyzer cargo either 1.18.0 Either#::Leftrust-analyzer cargo either 1.18.0 Either#Left#(result) => Eitherrust-analyzer cargo either 1.18.0 Either#::Leftrust-analyzer cargo either 1.18.0 Either#Left#(map_resultrust-analyzer cargo sqlx-mysql 0.8.3 any/map_result().(result)), |
| 95 | Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(row) => Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#::try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyRow][`TryFrom<&'a MySqlRow>`]try_from().(&row)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().), |
| 96 | }) |
| 97 | }), |
| 98 | ) |
| 99 | } |
| 100 | |
| 101 | fn fetch_optionalrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]fetch_optional().<'q>( |
| 102 | &'q mut self, |
| 103 | query: &'q str, |
| 104 | persistent: bool, |
| 105 | arguments: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<AnyArgumentsrust-analyzer cargo sqlx-core 0.8.3 any/arguments/AnyArguments#<'q>>, |
| 106 | ) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'q, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#>>> { |
| 107 | let persistent = persistent && arguments.is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().(); |
| 108 | let arguments = arguments |
| 109 | .as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().() |
| 110 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(AnyArgumentsrust-analyzer cargo sqlx-core 0.8.3 any/arguments/AnyArguments#::convert_torust-analyzer cargo sqlx-core 0.8.3 any/arguments/impl#[`AnyArguments<'q>`]convert_to().) |
| 111 | .transposerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<Result<T, E>>`]transpose().() |
| 112 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#::Encoderust-analyzer cargo sqlx-core 0.8.3 error/Error#Encode#); |
| 113 | |
| 114 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async move { |
| 115 | let arguments = arguments?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 116 | let stream = self.runrust-analyzer cargo sqlx-mysql 0.8.3 connection/executor/impl#[MySqlConnection]run().(query, arguments, persistent).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 117 | futures_utilrust-analyzer cargo futures-util 0.3.34 crate/::pin_mutrust-analyzer cargo futures-util 0.3.34 macros/pin_mut!!(stream); |
| 118 | |
| 119 | while let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(result) = stream.try_nextrust-analyzer cargo futures-util 0.3.34 stream/try_stream/TryStreamExt#try_next().().rust-analyzer cargo futures-util 0.3.34 stream/try_stream/try_next/impl#[`TryNext<'_, St>`][Future]poll().awaitrust-analyzer cargo futures-util 0.3.34 stream/try_stream/try_next/impl#[`TryNext<'_, St>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 120 | if let Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(row) = result { |
| 121 | return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#::try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyRow][`TryFrom<&'a MySqlRow>`]try_from().(&row)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) |
| 126 | }) |
| 127 | } |
| 128 | |
| 129 | fn prepare_withrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]prepare_with().<'c, 'q: 'c>( |
| 130 | &'c mut self, |
| 131 | sql: &'q str, |
| 132 | _parameters: &[AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#], |
| 133 | ) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'c, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<AnyStatementrust-analyzer cargo sqlx-core 0.8.3 any/statement/AnyStatement#<'q>>> { |
| 134 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async move { |
| 135 | let statement = Executorrust-analyzer cargo sqlx-core 0.8.3 executor/Executor#::prepare_withrust-analyzer cargo sqlx-mysql 0.8.3 connection/executor/impl#[`&'c mut MySqlConnection`][`Executor<'c>`]prepare_with().(self, sql, &[]).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 136 | AnyStatementrust-analyzer cargo sqlx-core 0.8.3 any/statement/AnyStatement#::try_from_statementrust-analyzer cargo sqlx-core 0.8.3 any/statement/impl#[`AnyStatement<'q>`]try_from_statement().( |
| 137 | sql, |
| 138 | &statement, |
| 139 | statement.metadatarust-analyzer cargo sqlx-mysql 0.8.3 statement/MySqlStatement#metadata..column_namesrust-analyzer cargo sqlx-mysql 0.8.3 statement/MySqlStatementMetadata#column_names..clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/impl#[`Arc<T, A>`][Clone]clone().(), |
| 140 | ) |
| 141 | }) |
| 142 | } |
| 143 | |
| 144 | fn describerust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnection][AnyConnectionBackend]describe().<'q>(&'q mut self, sql: &'q str) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'q, sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Resultrust-analyzer cargo sqlx-core 0.8.3 error/Result#<Describerust-analyzer cargo sqlx-core 0.8.3 describe/Describe#<Anyrust-analyzer cargo sqlx-core 0.8.3 any/database/Any#>>> { |
| 145 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async move { |
| 146 | let describe = Executorrust-analyzer cargo sqlx-core 0.8.3 executor/Executor#::describerust-analyzer cargo sqlx-mysql 0.8.3 connection/executor/impl#[`&'c mut MySqlConnection`][`Executor<'c>`]describe().(self, sql).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 147 | describe.try_into_anyrust-analyzer cargo sqlx-core 0.8.3 describe/impl#[`Describe<DB>`]try_into_any().() |
| 148 | }) |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#> for AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo# { |
| 153 | type Errorrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a MySqlTypeInfo>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 154 | |
| 155 | fn try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a MySqlTypeInfo>`]try_from().(type_info: &'a MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a MySqlTypeInfo>`], Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a MySqlTypeInfo>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 156 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo# { |
| 157 | kindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#kind.: match &type_info.r#typerust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#`r#type`. { |
| 158 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Nullrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#Null# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Nullrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Null#, |
| 159 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Shortrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#Short# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::SmallIntrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#SmallInt#, |
| 160 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Longrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#Long# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Integerrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Integer#, |
| 161 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::LongLongrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#LongLong# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::BigIntrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#BigInt#, |
| 162 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Floatrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#Float# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Realrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Real#, |
| 163 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Doublerust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#Double# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Doublerust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Double#, |
| 164 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Blobrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#Blob# |
| 165 | | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::TinyBlobrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#TinyBlob# |
| 166 | | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::MediumBlobrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#MediumBlob# |
| 167 | | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::LongBlobrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#LongBlob# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Blobrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Blob#, |
| 168 | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::Stringrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#String# | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::VarStringrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#VarString# | ColumnTyperust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#::VarCharrust-analyzer cargo sqlx-mysql 0.8.3 protocol/text/column/ColumnType#VarChar# => { |
| 169 | AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Textrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Text# |
| 170 | } |
| 171 | _ => { |
| 172 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#::AnyDriverErrorrust-analyzer cargo sqlx-core 0.8.3 error/Error#AnyDriverError#( |
| 173 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("Any driver does not support MySql type {type_info:?}").intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 174 | )) |
| 175 | } |
| 176 | }, |
| 177 | }) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a MySqlColumnrust-analyzer cargo sqlx-mysql 0.8.3 column/MySqlColumn#> for AnyColumnrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn# { |
| 182 | type Errorrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a MySqlColumn>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 183 | |
| 184 | fn try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a MySqlColumn>`]try_from().(column: &'a MySqlColumnrust-analyzer cargo sqlx-mysql 0.8.3 column/MySqlColumn#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a MySqlColumn>`], Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a MySqlColumn>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 185 | let type_info = AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#::try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a MySqlTypeInfo>`]try_from().(&column.type_inforust-analyzer cargo sqlx-mysql 0.8.3 column/MySqlColumn#type_info.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 186 | |
| 187 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(AnyColumnrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn# { |
| 188 | ordinalrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#ordinal.: column.ordinalrust-analyzer cargo sqlx-mysql 0.8.3 column/MySqlColumn#ordinal., |
| 189 | namerust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#name.: column.namerust-analyzer cargo sqlx-mysql 0.8.3 column/MySqlColumn#name..clonerust-analyzer cargo sqlx-core 0.8.3 ext/ustr/impl#[UStr][Clone]clone().(), |
| 190 | type_inforust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#type_info., |
| 191 | }) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a MySqlRowrust-analyzer cargo sqlx-mysql 0.8.3 row/MySqlRow#> for AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow# { |
| 196 | type Errorrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyRow][`TryFrom<&'a MySqlRow>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 197 | |
| 198 | fn try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyRow][`TryFrom<&'a MySqlRow>`]try_from().(row: &'a MySqlRowrust-analyzer cargo sqlx-mysql 0.8.3 row/MySqlRow#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyRow][`TryFrom<&'a MySqlRow>`], Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[AnyRow][`TryFrom<&'a MySqlRow>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 199 | AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow#::map_fromrust-analyzer cargo sqlx-core 0.8.3 any/row/impl#[AnyRow]map_from().(row, row.column_namesrust-analyzer cargo sqlx-mysql 0.8.3 row/MySqlRow#column_names..clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/impl#[`Arc<T, A>`][Clone]clone().()) |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a AnyConnectOptionsrust-analyzer cargo sqlx-core 0.8.3 any/options/AnyConnectOptions#> for MySqlConnectOptionsrust-analyzer cargo sqlx-mysql 0.8.3 options/MySqlConnectOptions# { |
| 204 | type Errorrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnectOptions][`TryFrom<&'a AnyConnectOptions>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 205 | |
| 206 | fn try_fromrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnectOptions][`TryFrom<&'a AnyConnectOptions>`]try_from().(any_opts: &'a AnyConnectOptionsrust-analyzer cargo sqlx-core 0.8.3 any/options/AnyConnectOptions#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnectOptions][`TryFrom<&'a AnyConnectOptions>`], Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnectOptions][`TryFrom<&'a AnyConnectOptions>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 207 | let mut opts = Selfrust-analyzer cargo sqlx-mysql 0.8.3 any/impl#[MySqlConnectOptions][`TryFrom<&'a AnyConnectOptions>`]::parse_from_urlrust-analyzer cargo sqlx-mysql 0.8.3 options/parse/impl#[MySqlConnectOptions]parse_from_url().(&any_opts.database_urlrust-analyzer cargo sqlx-core 0.8.3 any/options/AnyConnectOptions#database_url.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 208 | opts.log_settingsrust-analyzer cargo sqlx-mysql 0.8.3 options/MySqlConnectOptions#log_settings. = any_opts.log_settingsrust-analyzer cargo sqlx-core 0.8.3 any/options/AnyConnectOptions#log_settings..clonerust-analyzer cargo sqlx-core 0.8.3 connection/impl#[LogSettings][Clone]clone().(); |
| 209 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(opts) |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | fn map_resultrust-analyzer cargo sqlx-mysql 0.8.3 any/map_result().(result: MySqlQueryResultrust-analyzer cargo sqlx-mysql 0.8.3 query_result/MySqlQueryResult#) -> AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult# { |
| 214 | AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult# { |
| 215 | rows_affectedrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#rows_affected.: result.rows_affectedrust-analyzer cargo sqlx-mysql 0.8.3 query_result/MySqlQueryResult#rows_affected., |
| 216 | // Don't expect this to be a problem |
| 217 | #[allow(clippy::cast_possible_wrap)] |
| 218 | last_insert_idrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#last_insert_id.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(result.last_insert_idrust-analyzer cargo sqlx-mysql 0.8.3 query_result/MySqlQueryResult#last_insert_id. as i64), |
| 219 | } |
| 220 | } |