diff --git a/scylla-cql/src/frame/response/result.rs b/scylla-cql/src/frame/response/result.rs index a3cab27a5..71d91db9a 100644 --- a/scylla-cql/src/frame/response/result.rs +++ b/scylla-cql/src/frame/response/result.rs @@ -549,7 +549,7 @@ impl<'a> ResultMetadata<'a> { } #[inline] - pub fn col_specs(&self) -> &[ColumnSpec] { + pub fn col_specs(&self) -> &[ColumnSpec<'a>] { &self.col_specs } } diff --git a/scylla/src/statement/prepared_statement.rs b/scylla/src/statement/prepared_statement.rs index dd26c8d2e..8ecb86a4f 100644 --- a/scylla/src/statement/prepared_statement.rs +++ b/scylla/src/statement/prepared_statement.rs @@ -407,7 +407,7 @@ impl PreparedStatement { } /// Access column specifications of the bind variables of this statement - pub fn get_variable_col_specs(&self) -> &[ColumnSpec] { + pub fn get_variable_col_specs(&self) -> &[ColumnSpec<'static>] { &self.shared.metadata.col_specs } @@ -422,7 +422,7 @@ impl PreparedStatement { } /// Access column specifications of the result set returned after the execution of this statement - pub fn get_result_set_col_specs(&self) -> &[ColumnSpec] { + pub fn get_result_set_col_specs(&self) -> &[ColumnSpec<'static>] { self.shared.result_metadata.col_specs() } diff --git a/scylla/src/transport/iterator.rs b/scylla/src/transport/iterator.rs index 4457e47fd..7ae248d80 100644 --- a/scylla/src/transport/iterator.rs +++ b/scylla/src/transport/iterator.rs @@ -396,7 +396,7 @@ impl RowIterator { } /// Returns specification of row columns - pub fn get_column_specs(&self) -> &[ColumnSpec] { + pub fn get_column_specs(&self) -> &[ColumnSpec<'static>] { self.current_page.metadata.col_specs() } @@ -904,7 +904,7 @@ impl TypedRowIterator { } /// Returns specification of row columns - pub fn get_column_specs(&self) -> &[ColumnSpec] { + pub fn get_column_specs(&self) -> &[ColumnSpec<'static>] { self.row_iterator.get_column_specs() } } diff --git a/scylla/src/transport/query_result.rs b/scylla/src/transport/query_result.rs index 0750624c9..b60485afb 100644 --- a/scylla/src/transport/query_result.rs +++ b/scylla/src/transport/query_result.rs @@ -138,7 +138,7 @@ impl QueryResult { /// Returns column specifications. #[inline] - pub fn col_specs(&self) -> &[ColumnSpec] { + pub fn col_specs(&self) -> &[ColumnSpec<'static>] { self.metadata .as_ref() .map(|metadata| metadata.col_specs()) @@ -147,7 +147,7 @@ impl QueryResult { /// Returns a column specification for a column with given name, or None if not found #[inline] - pub fn get_column_spec<'a>(&'a self, name: &str) -> Option<(usize, &'a ColumnSpec)> { + pub fn get_column_spec<'a>(&'a self, name: &str) -> Option<(usize, &'a ColumnSpec<'static>)> { self.col_specs() .iter() .enumerate()