mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Bump uuid to 1.1.2
This commit is contained in:
parent
62692c171d
commit
1bfdcfc84f
@ -37,7 +37,7 @@ smartstring = "1.0.1"
|
|||||||
tempfile = "3.3.0"
|
tempfile = "3.3.0"
|
||||||
thiserror = "1.0.31"
|
thiserror = "1.0.31"
|
||||||
time = { version = "0.3.7", features = ["serde-well-known", "formatting", "parsing", "macros"] }
|
time = { version = "0.3.7", features = ["serde-well-known", "formatting", "parsing", "macros"] }
|
||||||
uuid = { version = "0.8.2", features = ["v4"] }
|
uuid = { version = "1.1.2", features = ["v4"] }
|
||||||
|
|
||||||
filter-parser = { path = "../filter-parser" }
|
filter-parser = { path = "../filter-parser" }
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ impl<'a, 'i> Transform<'a, 'i> {
|
|||||||
// it, transform it into a string and validate it, and then update it in the
|
// it, transform it into a string and validate it, and then update it in the
|
||||||
// document. If none is found, and we were told to generate missing document ids, then
|
// document. If none is found, and we were told to generate missing document ids, then
|
||||||
// we create the missing field, and update the new document.
|
// we create the missing field, and update the new document.
|
||||||
let mut uuid_buffer = [0; uuid::adapter::Hyphenated::LENGTH];
|
let mut uuid_buffer = [0; uuid::fmt::Hyphenated::LENGTH];
|
||||||
let external_id = if primary_key_id_nested {
|
let external_id = if primary_key_id_nested {
|
||||||
let mut field_buffer_cache = field_buffer_cache.clone();
|
let mut field_buffer_cache = field_buffer_cache.clone();
|
||||||
self.flatten_from_field_mapping(
|
self.flatten_from_field_mapping(
|
||||||
@ -799,7 +799,7 @@ fn update_primary_key<'a>(
|
|||||||
addition_index: &DocumentsBatchIndex,
|
addition_index: &DocumentsBatchIndex,
|
||||||
primary_key_id: FieldId,
|
primary_key_id: FieldId,
|
||||||
primary_key_name: &str,
|
primary_key_name: &str,
|
||||||
uuid_buffer: &'a mut [u8; uuid::adapter::Hyphenated::LENGTH],
|
uuid_buffer: &'a mut [u8; uuid::fmt::Hyphenated::LENGTH],
|
||||||
field_buffer_cache: &mut Vec<(u16, Cow<'a, [u8]>)>,
|
field_buffer_cache: &mut Vec<(u16, Cow<'a, [u8]>)>,
|
||||||
mut external_id_buffer: &'a mut Vec<u8>,
|
mut external_id_buffer: &'a mut Vec<u8>,
|
||||||
autogenerate_docids: bool,
|
autogenerate_docids: bool,
|
||||||
@ -826,7 +826,7 @@ fn update_primary_key<'a>(
|
|||||||
Ok(Cow::Owned(value))
|
Ok(Cow::Owned(value))
|
||||||
}
|
}
|
||||||
None if autogenerate_docids => {
|
None if autogenerate_docids => {
|
||||||
let uuid = uuid::Uuid::new_v4().to_hyphenated().encode_lower(uuid_buffer);
|
let uuid = uuid::Uuid::new_v4().as_hyphenated().encode_lower(uuid_buffer);
|
||||||
serde_json::to_writer(&mut external_id_buffer, &uuid)
|
serde_json::to_writer(&mut external_id_buffer, &uuid)
|
||||||
.map_err(InternalError::SerdeJson)?;
|
.map_err(InternalError::SerdeJson)?;
|
||||||
field_buffer_cache.push((primary_key_id, external_id_buffer.as_slice().into()));
|
field_buffer_cache.push((primary_key_id, external_id_buffer.as_slice().into()));
|
||||||
|
Loading…
Reference in New Issue
Block a user