@@ -161,11 +161,8 @@ impl Default for Collection {
161
161
version_file_path : None ,
162
162
root_collection_id : None ,
163
163
lineage_file_path : None ,
164
- <<<<<<< HEAD
165
164
updated_at : SystemTime :: now ( ) ,
166
- =======
167
165
database_id : DatabaseUuid :: new ( ) ,
168
- >>>>>>> 1 f8bca1d9 ( [ ENH ] : Return database id in get collections call from sysdb )
169
166
}
170
167
}
171
168
}
@@ -265,7 +262,6 @@ impl TryFrom<chroma_proto::Collection> for Collection {
265
262
} ,
266
263
None => None ,
267
264
} ;
268
- <<<<<<< HEAD
269
265
// TODO(@codetheweb): this be updated to error with "missing field" once all SysDb deployments are up-to-date
270
266
let updated_at = match proto_collection. updated_at {
271
267
Some ( updated_at) => {
@@ -274,10 +270,8 @@ impl TryFrom<chroma_proto::Collection> for Collection {
274
270
}
275
271
None => SystemTime :: now ( ) ,
276
272
} ;
277
- =======
278
273
let database_id = DatabaseUuid :: from_str ( & proto_collection. database_id )
279
274
. map_err ( |_| CollectionConversionError :: InvalidUuid ) ?;
280
- >>>>>>> 1 f8bca1d9 ( [ ENH ] : Return database id in get collections call from sysdb )
281
275
Ok ( Collection {
282
276
collection_id,
283
277
name : proto_collection. name ,
@@ -296,11 +290,8 @@ impl TryFrom<chroma_proto::Collection> for Collection {
296
290
. root_collection_id
297
291
. map ( |uuid| CollectionUuid ( Uuid :: try_parse ( & uuid) . unwrap ( ) ) ) ,
298
292
lineage_file_path : proto_collection. lineage_file_path ,
299
- <<<<<<< HEAD
300
293
updated_at,
301
- =======
302
294
database_id,
303
- >>>>>>> 1 f8bca1d9 ( [ ENH ] : Return database id in get collections call from sysdb)
304
295
} )
305
296
}
306
297
}
@@ -339,11 +330,8 @@ impl TryFrom<Collection> for chroma_proto::Collection {
339
330
version_file_path : value. version_file_path ,
340
331
root_collection_id : value. root_collection_id . map ( |uuid| uuid. 0 . to_string ( ) ) ,
341
332
lineage_file_path : value. lineage_file_path ,
342
- <<<<<<< HEAD
343
333
updated_at : Some ( value. updated_at . into ( ) ) ,
344
- =======
345
334
database_id : value. database_id . 0 . to_string ( ) ,
346
- >>>>>>> 1 f8bca1d9 ( [ ENH ] : Return database id in get collections call from sysdb)
347
335
} )
348
336
}
349
337
}
@@ -392,14 +380,11 @@ mod test {
392
380
version_file_path : Some ( "version_file_path" . to_string ( ) ) ,
393
381
root_collection_id : Some ( "00000000-0000-0000-0000-000000000000" . to_string ( ) ) ,
394
382
lineage_file_path : Some ( "lineage_file_path" . to_string ( ) ) ,
395
- <<<<<<< HEAD
396
383
updated_at : Some ( prost_types:: Timestamp {
397
384
seconds : 1 ,
398
385
nanos : 1 ,
399
386
} ) ,
400
- =======
401
387
database_id : "00000000-0000-0000-0000-000000000000" . to_string ( ) ,
402
- >>>>>>> 1 f8bca1d9 ( [ ENH ] : Return database id in get collections call from sysdb)
403
388
} ;
404
389
let converted_collection: Collection = proto_collection. try_into ( ) . unwrap ( ) ;
405
390
assert_eq ! (
@@ -426,13 +411,10 @@ mod test {
426
411
converted_collection. lineage_file_path,
427
412
Some ( "lineage_file_path" . to_string( ) )
428
413
) ;
429
- <<<<<<< HEAD
430
414
assert_eq ! (
431
415
converted_collection. updated_at,
432
416
SystemTime :: UNIX_EPOCH + Duration :: new( 1 , 1 )
433
417
) ;
434
- =======
435
418
assert_eq ! ( converted_collection. database_id, DatabaseUuid ( Uuid :: nil( ) ) ) ;
436
- >>>>>>> 1 f8bca1d9 ( [ ENH ] : Return database id in get collections call from sysdb)
437
419
}
438
420
}
0 commit comments