MCPcopy Create free account
hub / github.com/hashintel/hash / seed

Function seed

tests/graph/integration/postgres/partial_updates.rs:32–58  ·  view source on GitHub ↗
(database: &mut DatabaseTestWrapper)

Source from the content-addressed store, hash-verified

30use crate::{DatabaseApi, DatabaseTestWrapper};
31
32async fn seed(database: &mut DatabaseTestWrapper) -> DatabaseApi<'_> {
33 database
34 .seed(
35 [
36 data_type::VALUE_V1,
37 data_type::TEXT_V1,
38 data_type::NUMBER_V1,
39 ],
40 [
41 property_type::NAME_V1,
42 property_type::AGE_V1,
43 property_type::FAVORITE_SONG_V1,
44 property_type::FAVORITE_FILM_V1,
45 property_type::HOBBY_V1,
46 property_type::INTERESTS_V1,
47 ],
48 [
49 entity_type::PERSON_V1,
50 entity_type::ORGANIZATION_V1,
51 entity_type::LINK_V1,
52 entity_type::link::FRIEND_OF_V1,
53 entity_type::link::ACQUAINTANCE_OF_V1,
54 ],
55 )
56 .await
57 .expect("could not seed database")
58}
59
60fn person_entity_type_id() -> VersionedUrl {
61 VersionedUrl::from_str("https://blockprotocol.org/@alice/types/entity-type/person/v/1")

Callers 4

properties_addFunction · 0.70
properties_removeFunction · 0.70
properties_replaceFunction · 0.70
type_idsFunction · 0.70

Calls 2

expectMethod · 0.45
seedMethod · 0.45

Tested by

no test coverage detected