reifydb_core/value/column/push/
uuid.rs1use reifydb_value::value::{
5 identity::IdentityId,
6 uuid::{Uuid4, Uuid7},
7};
8
9use crate::value::column::{
10 builder::{ColumnBuilder, TypedBuilder, append_fixed},
11 push::Push,
12};
13
14impl Push<Uuid4> for ColumnBuilder {
15 fn push(&mut self, value: Uuid4) {
16 match &mut self.inner {
17 TypedBuilder::Uuid4(builder) => append_fixed(builder, value.as_bytes()),
18 other => {
19 panic!(
20 "called `push::<Uuid4>()` on incompatible ColumnBuilder::{:?}",
21 other.get_type()
22 );
23 }
24 }
25 }
26}
27
28impl Push<Uuid7> for ColumnBuilder {
29 fn push(&mut self, value: Uuid7) {
30 match &mut self.inner {
31 TypedBuilder::Uuid7(builder) => append_fixed(builder, value.as_bytes()),
32 other => {
33 panic!(
34 "called `push::<Uuid7>()` on incompatible ColumnBuilder::{:?}",
35 other.get_type()
36 );
37 }
38 }
39 }
40}
41
42impl Push<IdentityId> for ColumnBuilder {
43 fn push(&mut self, value: IdentityId) {
44 match &mut self.inner {
45 TypedBuilder::IdentityId(builder) => append_fixed(builder, value.as_bytes()),
46 other => {
47 panic!(
48 "called `push::<IdentityId>()` on incompatible ColumnBuilder::{:?}",
49 other.get_type()
50 );
51 }
52 }
53 }
54}