| 1 | use craterust-analyzer cargo sqlx-postgres 0.8.3 crate/::{ |
| 2 | Eitherrust-analyzer cargo either 1.18.0 Either#, PgColumnrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#, PgConnectOptionsrust-analyzer cargo sqlx-postgres 0.8.3 options/PgConnectOptions#, PgConnectionrust-analyzer cargo sqlx-postgres 0.8.3 connection/PgConnection#, PgQueryResultrust-analyzer cargo sqlx-postgres 0.8.3 query_result/PgQueryResult#, PgRowrust-analyzer cargo sqlx-postgres 0.8.3 row/PgRow#, PgTransactionManagerrust-analyzer cargo sqlx-postgres 0.8.3 transaction/PgTransactionManager#, |
| 3 | PgTypeInforust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo#, Postgresrust-analyzer cargo sqlx-postgres 0.8.3 database/Postgres#, |
| 4 | }; |
| 5 | 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#; |
| 6 | 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#; |
| 7 | 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#}; |
| 8 | 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/; |
| 9 | |
| 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 | |
| 15 | use craterust-analyzer cargo sqlx-postgres 0.8.3 crate/::type_inforust-analyzer cargo sqlx-postgres 0.8.3 type_info/::PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#; |
| 16 | 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#; |
| 17 | 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#; |
| 18 | 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#; |
| 19 | 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#; |
| 20 | use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::extrust-analyzer cargo sqlx-core 0.8.3 ext/::ustrrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/::UStrrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/UStr#; |
| 21 | 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#; |
| 22 | |
| 23 | 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-postgres 0.8.3 any/DRIVER. = Postgresrust-analyzer cargo sqlx-postgres 0.8.3 database/Postgres#); |
| 24 | |
| 25 | impl AnyConnectionBackendrust-analyzer cargo sqlx-core 0.8.3 any/connection/backend/AnyConnectionBackend# for PgConnectionrust-analyzer cargo sqlx-postgres 0.8.3 connection/PgConnection# { |
| 26 | fn namerust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]name().(&self) -> &str { |
| 27 | <Postgresrust-analyzer cargo sqlx-postgres 0.8.3 database/Postgres# as Databaserust-analyzer cargo sqlx-core 0.8.3 database/Database#>::NAMErust-analyzer cargo sqlx-postgres 0.8.3 database/impl#[Postgres][Database]NAME. |
| 28 | } |
| 29 | |
| 30 | fn closerust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]close().(self: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 31 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::closerust-analyzer cargo sqlx-postgres 0.8.3 connection/impl#[PgConnection][Connection]close().(*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().self) |
| 32 | } |
| 33 | |
| 34 | fn close_hardrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]close_hard().(self: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 35 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::close_hardrust-analyzer cargo sqlx-postgres 0.8.3 connection/impl#[PgConnection][Connection]close_hard().(*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().self) |
| 36 | } |
| 37 | |
| 38 | fn pingrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 39 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::pingrust-analyzer cargo sqlx-postgres 0.8.3 connection/impl#[PgConnection][Connection]ping().(self) |
| 40 | } |
| 41 | |
| 42 | fn beginrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 43 | PgTransactionManagerrust-analyzer cargo sqlx-postgres 0.8.3 transaction/PgTransactionManager#::beginrust-analyzer cargo sqlx-postgres 0.8.3 transaction/impl#[PgTransactionManager][TransactionManager]begin().(self) |
| 44 | } |
| 45 | |
| 46 | fn commitrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 47 | PgTransactionManagerrust-analyzer cargo sqlx-postgres 0.8.3 transaction/PgTransactionManager#::commitrust-analyzer cargo sqlx-postgres 0.8.3 transaction/impl#[PgTransactionManager][TransactionManager]commit().(self) |
| 48 | } |
| 49 | |
| 50 | fn rollbackrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 51 | PgTransactionManagerrust-analyzer cargo sqlx-postgres 0.8.3 transaction/PgTransactionManager#::rollbackrust-analyzer cargo sqlx-postgres 0.8.3 transaction/impl#[PgTransactionManager][TransactionManager]rollback().(self) |
| 52 | } |
| 53 | |
| 54 | fn start_rollbackrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]start_rollback().(&mut self) { |
| 55 | PgTransactionManagerrust-analyzer cargo sqlx-postgres 0.8.3 transaction/PgTransactionManager#::start_rollbackrust-analyzer cargo sqlx-postgres 0.8.3 transaction/impl#[PgTransactionManager][TransactionManager]start_rollback().(self) |
| 56 | } |
| 57 | |
| 58 | fn shrink_buffersrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]shrink_buffers().(&mut self) { |
| 59 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::shrink_buffersrust-analyzer cargo sqlx-postgres 0.8.3 connection/impl#[PgConnection][Connection]shrink_buffers().(self); |
| 60 | } |
| 61 | |
| 62 | fn flushrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][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#<()>> { |
| 63 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::flushrust-analyzer cargo sqlx-postgres 0.8.3 connection/impl#[PgConnection][Connection]flush().(self) |
| 64 | } |
| 65 | |
| 66 | fn should_flushrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]should_flush().(&self) -> bool { |
| 67 | Connectionrust-analyzer cargo sqlx-core 0.8.3 connection/Connection#::should_flushrust-analyzer cargo sqlx-postgres 0.8.3 connection/impl#[PgConnection][Connection]should_flush().(self) |
| 68 | } |
| 69 | |
| 70 | #[cfg(feature = "migrate")] |
| 71 | fn as_migraterust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]as_migrate().( |
| 72 | &mut self, |
| 73 | ) -> 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)> { |
| 74 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(self) |
| 75 | } |
| 76 | |
| 77 | fn fetch_manyrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]fetch_many().<'q>( |
| 78 | &'q mut self, |
| 79 | query: &'q str, |
| 80 | persistent: bool, |
| 81 | 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>>, |
| 82 | ) -> 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#>>> { |
| 83 | let persistent = persistent && arguments.is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().(); |
| 84 | 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().() { |
| 85 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(arguments) => arguments, |
| 86 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(error) => { |
| 87 | 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().() |
| 88 | } |
| 89 | }; |
| 90 | |
| 91 | 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().( |
| 92 | self.runrust-analyzer cargo sqlx-postgres 0.8.3 connection/executor/impl#[PgConnection]run().(query, arguments, 0, persistent, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) |
| 93 | .try_flatten_streamrust-analyzer cargo futures-util 0.3.34 future/try_future/TryFutureExt#try_flatten_stream().() |
| 94 | .maprust-analyzer cargo futures-util 0.3.34 stream/stream/StreamExt#map().( |
| 95 | move |res: 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#<PgQueryResultrust-analyzer cargo sqlx-postgres 0.8.3 query_result/PgQueryResult#, PgRowrust-analyzer cargo sqlx-postgres 0.8.3 row/PgRow#>>| match res?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 96 | Eitherrust-analyzer cargo either 1.18.0 Either#::Leftrust-analyzer cargo either 1.18.0 Either#Left#(result) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Eitherrust-analyzer cargo either 1.18.0 Either#::Leftrust-analyzer cargo either 1.18.0 Either#Left#(map_resultrust-analyzer cargo sqlx-postgres 0.8.3 any/map_result().(result))), |
| 97 | Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(row) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(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-postgres 0.8.3 any/impl#[AnyRow][`TryFrom<&'a PgRow>`]try_from().(&row)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)), |
| 98 | }, |
| 99 | ), |
| 100 | ) |
| 101 | } |
| 102 | |
| 103 | fn fetch_optionalrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnection][AnyConnectionBackend]fetch_optional().<'q>( |
| 104 | &'q mut self, |
| 105 | query: &'q str, |
| 106 | persistent: bool, |
| 107 | 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>>, |
| 108 | ) -> 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#>>> { |
| 109 | let persistent = persistent && arguments.is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().(); |
| 110 | let arguments = arguments |
| 111 | .as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().() |
| 112 | .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().) |
| 113 | .transposerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<Result<T, E>>`]transpose().() |
| 114 | .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#); |
| 115 | |
| 116 | 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 { |
| 117 | let arguments = arguments?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 118 | let stream = self.runrust-analyzer cargo sqlx-postgres 0.8.3 connection/executor/impl#[PgConnection]run().(query, arguments, 1, persistent, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#).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().; |
| 119 | futures_utilrust-analyzer cargo futures-util 0.3.34 crate/::pin_mutrust-analyzer cargo futures-util 0.3.34 macros/pin_mut!!(stream); |
| 120 | |
| 121 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(row)) = 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(). { |
| 122 | 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-postgres 0.8.3 any/impl#[AnyRow][`TryFrom<&'a PgRow>`]try_from().(&row)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)); |
| 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-postgres 0.8.3 any/impl#[PgConnection][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-postgres 0.8.3 connection/executor/impl#[`&'c mut PgConnection`][`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-postgres 0.8.3 statement/PgStatement#metadata..column_namesrust-analyzer cargo sqlx-postgres 0.8.3 statement/PgStatementMetadata#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-postgres 0.8.3 any/impl#[PgConnection][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-postgres 0.8.3 connection/executor/impl#[`&'c mut PgConnection`][`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 | |
| 148 | let columns = describe |
| 149 | .columnsrust-analyzer cargo sqlx-core 0.8.3 describe/Describe#columns. |
| 150 | .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 151 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(AnyColumnrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#::try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a PgColumn>`]try_from().) |
| 152 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>, _>>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 153 | |
| 154 | let parameters = match describe.parametersrust-analyzer cargo sqlx-core 0.8.3 describe/Describe#parameters. { |
| 155 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Eitherrust-analyzer cargo either 1.18.0 Either#::Leftrust-analyzer cargo either 1.18.0 Either#Left#(parameters)) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Eitherrust-analyzer cargo either 1.18.0 Either#::Leftrust-analyzer cargo either 1.18.0 Either#Left#( |
| 156 | parameters |
| 157 | .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 158 | .enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() |
| 159 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|(i, type_info)| { |
| 160 | AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#::try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a PgTypeInfo>`]try_from().(type_info).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| { |
| 161 | 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#( |
| 162 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 163 | "Any driver does not support type {type_info} of parameter {i}" |
| 164 | ) |
| 165 | .intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 166 | ) |
| 167 | }) |
| 168 | }) |
| 169 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>, _>>()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., |
| 170 | )), |
| 171 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(count)) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Eitherrust-analyzer cargo either 1.18.0 Either#::Rightrust-analyzer cargo either 1.18.0 Either#Right#(count)), |
| 172 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 173 | }; |
| 174 | |
| 175 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Describerust-analyzer cargo sqlx-core 0.8.3 describe/Describe# { |
| 176 | columnsrust-analyzer cargo sqlx-core 0.8.3 describe/Describe#columns., |
| 177 | parametersrust-analyzer cargo sqlx-core 0.8.3 describe/Describe#parameters., |
| 178 | nullablerust-analyzer cargo sqlx-core 0.8.3 describe/Describe#nullable.: describe.nullablerust-analyzer cargo sqlx-core 0.8.3 describe/Describe#nullable., |
| 179 | }) |
| 180 | }) |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a PgTypeInforust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo#> for AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo# { |
| 185 | type Errorrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a PgTypeInfo>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 186 | |
| 187 | fn try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a PgTypeInfo>`]try_from().(pg_type: &'a PgTypeInforust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a PgTypeInfo>`], Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a PgTypeInfo>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 188 | 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# { |
| 189 | kindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#kind.: match &pg_type.0rust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo#0. { |
| 190 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Boolrust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Bool# => AnyTypeInfoKindrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#::Boolrust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfoKind#Bool#, |
| 191 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Voidrust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Void# => 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#, |
| 192 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Int2rust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Int2# => 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#, |
| 193 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Int4rust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Int4# => 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#, |
| 194 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Int8rust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Int8# => 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#, |
| 195 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Float4rust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Float4# => 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#, |
| 196 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Float8rust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Float8# => 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#, |
| 197 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Bytearust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Bytea# => 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#, |
| 198 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Textrust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Text# | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::Varcharrust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#Varchar# => 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#, |
| 199 | PgTyperust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#::DeclareWithNamerust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgType#DeclareWithName#(UStrrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/UStr#::Staticrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/UStr#Static#("citext")) => 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#, |
| 200 | _ => { |
| 201 | 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#( |
| 202 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("Any driver does not support the Postgres type {pg_type:?}").intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 203 | )) |
| 204 | } |
| 205 | }, |
| 206 | }) |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a PgColumnrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#> for AnyColumnrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn# { |
| 211 | type Errorrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a PgColumn>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 212 | |
| 213 | fn try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a PgColumn>`]try_from().(col: &'a PgColumnrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a PgColumn>`], Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyColumn][`TryFrom<&'a PgColumn>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 214 | let type_info = |
| 215 | AnyTypeInforust-analyzer cargo sqlx-core 0.8.3 any/type_info/AnyTypeInfo#::try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyTypeInfo][`TryFrom<&'a PgTypeInfo>`]try_from().(&col.type_inforust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#type_info.).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#::ColumnDecoderust-analyzer cargo sqlx-core 0.8.3 error/Error#ColumnDecode# { |
| 216 | indexrust-analyzer cargo sqlx-core 0.8.3 error/Error#ColumnDecode#index.: col.namerust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#name..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), |
| 217 | sourcerust-analyzer cargo sqlx-core 0.8.3 error/Error#ColumnDecode#source.: e.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 218 | })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 219 | |
| 220 | 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# { |
| 221 | ordinalrust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#ordinal.: col.ordinalrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#ordinal., |
| 222 | namerust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#name.: col.namerust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#name..clonerust-analyzer cargo sqlx-core 0.8.3 ext/ustr/impl#[UStr][Clone]clone().(), |
| 223 | type_inforust-analyzer cargo sqlx-core 0.8.3 any/column/AnyColumn#type_info., |
| 224 | }) |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | impl<'a> TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<&'a PgRowrust-analyzer cargo sqlx-postgres 0.8.3 row/PgRow#> for AnyRowrust-analyzer cargo sqlx-core 0.8.3 any/row/AnyRow# { |
| 229 | type Errorrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyRow][`TryFrom<&'a PgRow>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 230 | |
| 231 | fn try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyRow][`TryFrom<&'a PgRow>`]try_from().(row: &'a PgRowrust-analyzer cargo sqlx-postgres 0.8.3 row/PgRow#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyRow][`TryFrom<&'a PgRow>`], Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[AnyRow][`TryFrom<&'a PgRow>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 232 | 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.metadatarust-analyzer cargo sqlx-postgres 0.8.3 row/PgRow#metadata..column_namesrust-analyzer cargo sqlx-postgres 0.8.3 statement/PgStatementMetadata#column_names..clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc sync/impl#[`Arc<T, A>`][Clone]clone().()) |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | 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 PgConnectOptionsrust-analyzer cargo sqlx-postgres 0.8.3 options/PgConnectOptions# { |
| 237 | type Errorrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnectOptions][`TryFrom<&'a AnyConnectOptions>`]Error# = sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#; |
| 238 | |
| 239 | fn try_fromrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnectOptions][`TryFrom<&'a AnyConnectOptions>`]try_from().(value: &'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-postgres 0.8.3 any/impl#[PgConnectOptions][`TryFrom<&'a AnyConnectOptions>`], Selfrust-analyzer cargo sqlx-postgres 0.8.3 any/impl#[PgConnectOptions][`TryFrom<&'a AnyConnectOptions>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> { |
| 240 | let mut opts = PgConnectOptionsrust-analyzer cargo sqlx-postgres 0.8.3 options/PgConnectOptions#::parse_from_urlrust-analyzer cargo sqlx-postgres 0.8.3 options/parse/impl#[PgConnectOptions]parse_from_url().(&value.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().; |
| 241 | opts.log_settingsrust-analyzer cargo sqlx-postgres 0.8.3 options/PgConnectOptions#log_settings. = value.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().(); |
| 242 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(opts) |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | fn map_resultrust-analyzer cargo sqlx-postgres 0.8.3 any/map_result().(res: PgQueryResultrust-analyzer cargo sqlx-postgres 0.8.3 query_result/PgQueryResult#) -> AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult# { |
| 247 | AnyQueryResultrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult# { |
| 248 | rows_affectedrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#rows_affected.: res.rows_affectedrust-analyzer cargo sqlx-postgres 0.8.3 query_result/impl#[PgQueryResult]rows_affected().(), |
| 249 | last_insert_idrust-analyzer cargo sqlx-core 0.8.3 any/query_result/AnyQueryResult#last_insert_id.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 250 | } |
| 251 | } |