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

Function seed

tests/graph/integration/postgres/drafts.rs:23–50  ·  view source on GitHub ↗
(database: &mut DatabaseTestWrapper)

Source from the content-addressed store, hash-verified

21use crate::{DatabaseApi, DatabaseTestWrapper};
22
23async fn seed(database: &mut DatabaseTestWrapper) -> DatabaseApi<'_> {
24 database
25 .seed(
26 [
27 data_type::VALUE_V1,
28 data_type::TEXT_V1,
29 data_type::NUMBER_V1,
30 ],
31 [
32 property_type::NAME_V1,
33 property_type::AGE_V1,
34 property_type::TEXT_V1,
35 property_type::FAVORITE_SONG_V1,
36 property_type::FAVORITE_FILM_V1,
37 property_type::HOBBY_V1,
38 property_type::INTERESTS_V1,
39 ],
40 [
41 entity_type::PERSON_V1,
42 entity_type::PAGE_V1,
43 entity_type::LINK_V1,
44 entity_type::link::FRIEND_OF_V1,
45 entity_type::link::ACQUAINTANCE_OF_V1,
46 ],
47 )
48 .await
49 .expect("could not seed database")
50}
51
52fn person_entity_type_id() -> VersionedUrl {
53 VersionedUrl {

Callers 3

initial_draftFunction · 0.70
no_initial_draftFunction · 0.70
multiple_draftsFunction · 0.70

Calls 2

expectMethod · 0.45
seedMethod · 0.45

Tested by

no test coverage detected