Attempts to convert into an ExecuteResponse. Returns an error if not possible without actually executing a statement.
(self)
| 745 | /// Attempts to convert into an ExecuteResponse. Returns an error if not possible without |
| 746 | /// actually executing a statement. |
| 747 | fn try_into(self) -> Result<ExecuteResponse, Self::Error> { |
| 748 | match self { |
| 749 | ExecuteResponseKind::AlteredDefaultPrivileges => { |
| 750 | Ok(ExecuteResponse::AlteredDefaultPrivileges) |
| 751 | } |
| 752 | ExecuteResponseKind::AlteredObject => Err(()), |
| 753 | ExecuteResponseKind::AlteredRole => Ok(ExecuteResponse::AlteredRole), |
| 754 | ExecuteResponseKind::AlteredSystemConfiguration => { |
| 755 | Ok(ExecuteResponse::AlteredSystemConfiguration) |
| 756 | } |
| 757 | ExecuteResponseKind::ClosedCursor => Ok(ExecuteResponse::ClosedCursor), |
| 758 | ExecuteResponseKind::Comment => Ok(ExecuteResponse::Comment), |
| 759 | ExecuteResponseKind::Copied => Err(()), |
| 760 | ExecuteResponseKind::CopyTo => Err(()), |
| 761 | ExecuteResponseKind::CopyFrom => Err(()), |
| 762 | ExecuteResponseKind::CreatedConnection => Ok(ExecuteResponse::CreatedConnection), |
| 763 | ExecuteResponseKind::CreatedDatabase => Ok(ExecuteResponse::CreatedDatabase), |
| 764 | ExecuteResponseKind::CreatedSchema => Ok(ExecuteResponse::CreatedSchema), |
| 765 | ExecuteResponseKind::CreatedRole => Ok(ExecuteResponse::CreatedRole), |
| 766 | ExecuteResponseKind::CreatedCluster => Ok(ExecuteResponse::CreatedCluster), |
| 767 | ExecuteResponseKind::CreatedClusterReplica => { |
| 768 | Ok(ExecuteResponse::CreatedClusterReplica) |
| 769 | } |
| 770 | ExecuteResponseKind::CreatedIndex => Ok(ExecuteResponse::CreatedIndex), |
| 771 | ExecuteResponseKind::CreatedSecret => Ok(ExecuteResponse::CreatedSecret), |
| 772 | ExecuteResponseKind::CreatedSink => Ok(ExecuteResponse::CreatedSink), |
| 773 | ExecuteResponseKind::CreatedSource => Ok(ExecuteResponse::CreatedSource), |
| 774 | ExecuteResponseKind::CreatedTable => Ok(ExecuteResponse::CreatedTable), |
| 775 | ExecuteResponseKind::CreatedView => Ok(ExecuteResponse::CreatedView), |
| 776 | ExecuteResponseKind::CreatedViews => Ok(ExecuteResponse::CreatedViews), |
| 777 | ExecuteResponseKind::CreatedMaterializedView => { |
| 778 | Ok(ExecuteResponse::CreatedMaterializedView) |
| 779 | } |
| 780 | ExecuteResponseKind::CreatedNetworkPolicy => Ok(ExecuteResponse::CreatedNetworkPolicy), |
| 781 | ExecuteResponseKind::CreatedType => Ok(ExecuteResponse::CreatedType), |
| 782 | ExecuteResponseKind::Deallocate => Err(()), |
| 783 | ExecuteResponseKind::DeclaredCursor => Ok(ExecuteResponse::DeclaredCursor), |
| 784 | ExecuteResponseKind::Deleted => Err(()), |
| 785 | ExecuteResponseKind::DiscardedTemp => Ok(ExecuteResponse::DiscardedTemp), |
| 786 | ExecuteResponseKind::DiscardedAll => Ok(ExecuteResponse::DiscardedAll), |
| 787 | ExecuteResponseKind::DroppedObject => Err(()), |
| 788 | ExecuteResponseKind::DroppedOwned => Ok(ExecuteResponse::DroppedOwned), |
| 789 | ExecuteResponseKind::EmptyQuery => Ok(ExecuteResponse::EmptyQuery), |
| 790 | ExecuteResponseKind::Fetch => Err(()), |
| 791 | ExecuteResponseKind::GrantedPrivilege => Ok(ExecuteResponse::GrantedPrivilege), |
| 792 | ExecuteResponseKind::GrantedRole => Ok(ExecuteResponse::GrantedRole), |
| 793 | ExecuteResponseKind::Inserted => Err(()), |
| 794 | ExecuteResponseKind::Prepare => Ok(ExecuteResponse::Prepare), |
| 795 | ExecuteResponseKind::Raised => Ok(ExecuteResponse::Raised), |
| 796 | ExecuteResponseKind::ReassignOwned => Ok(ExecuteResponse::ReassignOwned), |
| 797 | ExecuteResponseKind::RevokedPrivilege => Ok(ExecuteResponse::RevokedPrivilege), |
| 798 | ExecuteResponseKind::RevokedRole => Ok(ExecuteResponse::RevokedRole), |
| 799 | ExecuteResponseKind::SetVariable => Err(()), |
| 800 | ExecuteResponseKind::StartedTransaction => Ok(ExecuteResponse::StartedTransaction), |
| 801 | ExecuteResponseKind::Subscribing => Err(()), |
| 802 | ExecuteResponseKind::TransactionCommitted => Err(()), |
| 803 | ExecuteResponseKind::TransactionRolledBack => Err(()), |
| 804 | ExecuteResponseKind::Updated => Err(()), |
no outgoing calls
no test coverage detected