MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / create_index_from_entity

Method create_index_from_entity

src/schema/entity.rs:37–42  ·  view source on GitHub ↗

Creates the indexes from an Entity, returning an empty Vec if there are none to create. See [IndexCreateStatement] for more details

(&self, entity: E)

Source from the content-addressed store, hash-verified

35 /// Creates the indexes from an Entity, returning an empty Vec if there are none
36 /// to create. See [IndexCreateStatement] for more details
37 pub fn create_index_from_entity<E>(&self, entity: E) -> Vec<IndexCreateStatement>
38 where
39 E: EntityTrait,
40 {
41 create_index_from_entity(entity, self.backend)
42 }
43
44 /// Creates a column definition for example to update a table.
45 ///

Calls 1

create_index_from_entityFunction · 0.85

Tested by 1