Skip to content

Commit 64262a4

Browse files
committed
RowSerializationContext: Add a more direct constructor
There is no need to create whole PreparedMetadata in order to create RowSerializationContext.
1 parent 7b6d73d commit 64262a4

File tree

1 file changed

+6
-0
lines changed
  • scylla-cql/src/serialize

1 file changed

+6
-0
lines changed

scylla-cql/src/serialize/row.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ impl<'a> RowSerializationContext<'a> {
3737
}
3838
}
3939

40+
/// Creates the serialization context directly from column specs.
41+
#[inline]
42+
pub fn from_specs(specs: &'a [ColumnSpec<'a>]) -> Self {
43+
Self { columns: specs }
44+
}
45+
4046
/// Constructs an empty `RowSerializationContext`, as if for a statement
4147
/// with no bind markers.
4248
#[inline]

0 commit comments

Comments
 (0)