@@ -19,6 +19,7 @@ use crate::frame::response::result::PreparedMetadata;
1919use crate :: frame:: types:: { Consistency , SerialConsistency } ;
2020use crate :: observability:: history:: HistoryListener ;
2121use crate :: policies:: retry:: RetryPolicy ;
22+ use crate :: response:: query_result:: ColumnSpecs ;
2223use crate :: routing:: partitioner:: { Partitioner , PartitionerHasher , PartitionerName } ;
2324use crate :: routing:: Token ;
2425
@@ -398,8 +399,8 @@ impl PreparedStatement {
398399 }
399400
400401 /// Access column specifications of the bind variables of this statement
401- pub fn get_variable_col_specs ( & self ) -> & [ ColumnSpec < ' static > ] {
402- & self . shared . metadata . col_specs
402+ pub fn get_variable_col_specs ( & self ) -> ColumnSpecs < ' _ , ' static > {
403+ ColumnSpecs :: new ( & self . shared . metadata . col_specs )
403404 }
404405
405406 /// Access info about partition key indexes of the bind variables of this statement
@@ -413,8 +414,8 @@ impl PreparedStatement {
413414 }
414415
415416 /// Access column specifications of the result set returned after the execution of this statement
416- pub fn get_result_set_col_specs ( & self ) -> & [ ColumnSpec < ' static > ] {
417- self . shared . result_metadata . col_specs ( )
417+ pub fn get_result_set_col_specs ( & self ) -> ColumnSpecs < ' _ , ' static > {
418+ ColumnSpecs :: new ( self . shared . result_metadata . col_specs ( ) )
418419 }
419420
420421 /// Get the name of the partitioner used for this statement.
0 commit comments