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

Function create_table

tests/common/setup/mod.rs:127–143  ·  view source on GitHub ↗
(
    db: &DbConn,
    create: &TableCreateStatement,
    entity: E,
)

Source from the content-addressed store, hash-verified

125}
126
127pub async fn create_table<E>(
128 db: &DbConn,
129 create: &TableCreateStatement,
130 entity: E,
131) -> Result<ExecResult, DbErr>
132where
133 E: EntityTrait,
134{
135 let builder = db.get_database_backend();
136 let schema = Schema::new(builder);
137 assert_eq!(
138 builder.build(&schema.create_table_from_entity(entity)),
139 builder.build(create)
140 );
141
142 create_table_without_asserts(db, create).await
143}
144
145pub async fn create_table_without_asserts(
146 db: &DbConn,

Callers 15

create_bakery_tableFunction · 0.50
create_worker_tableFunction · 0.50
create_bakery_tableFunction · 0.50
create_baker_tableFunction · 0.50
create_customer_tableFunction · 0.50
create_order_tableFunction · 0.50
create_lineitem_tableFunction · 0.50
create_cake_tableFunction · 0.50
create_log_tableFunction · 0.50
create_metadata_tableFunction · 0.50
create_repository_tableFunction · 0.50

Calls 3

newFunction · 0.50
get_database_backendMethod · 0.45

Tested by

no test coverage detected