Skip to content

Commit

Permalink
Merge pull request scylladb#1082 from wprzytula/column-spec-lifetime-…
Browse files Browse the repository at this point in the history
…generic

make `ResultMetadata` lifetime-generic
  • Loading branch information
wprzytula authored Oct 7, 2024
2 parents 1a2c51b + 80027e2 commit 92254fe
Show file tree
Hide file tree
Showing 24 changed files with 594 additions and 493 deletions.
3 changes: 3 additions & 0 deletions scylla-cql/src/frame/frame_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub use super::request::{
startup::StartupSerializationError,
};

use super::response::result::TableSpec;
use super::response::CqlResponseKind;
use super::TryFromPrimitiveError;
use crate::types::deserialize::DeserializationError;
Expand Down Expand Up @@ -372,6 +373,8 @@ pub struct ColumnSpecParseError {
pub enum ColumnSpecParseErrorKind {
#[error("Invalid table spec: {0}")]
TableSpecParseError(#[from] TableSpecParseError),
#[error("Table spec differs across columns - got specs: {0:?} and {1:?}")]
TableSpecDiffersAcrossColumns(TableSpec<'static>, TableSpec<'static>),
#[error("Malformed column name: {0}")]
ColumnNameParseError(#[from] LowLevelDeserializationError),
#[error("Invalid column type: {0}")]
Expand Down
2 changes: 1 addition & 1 deletion scylla-cql/src/frame/response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl Response {
features: &ProtocolFeatures,
opcode: ResponseOpcode,
buf_bytes: bytes::Bytes,
cached_metadata: Option<&Arc<ResultMetadata>>,
cached_metadata: Option<&Arc<ResultMetadata<'static>>>,
) -> Result<Response, CqlResponseParseError> {
let buf = &mut &*buf_bytes;
let response = match opcode {
Expand Down
Loading

0 comments on commit 92254fe

Please sign in to comment.