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

Function create_pi_table

tests/common/features/schema.rs:508–533  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

506}
507
508pub async fn create_pi_table(db: &DbConn) -> Result<ExecResult, DbErr> {
509 let stmt = sea_query::Table::create()
510 .table(pi::Entity)
511 .col(
512 ColumnDef::new(pi::Column::Id)
513 .integer()
514 .not_null()
515 .auto_increment()
516 .primary_key(),
517 )
518 .col(
519 ColumnDef::new(pi::Column::Decimal)
520 .decimal_len(11, 10)
521 .not_null(),
522 )
523 .col(
524 ColumnDef::new(pi::Column::BigDecimal)
525 .decimal_len(11, 10)
526 .not_null(),
527 )
528 .col(ColumnDef::new(pi::Column::DecimalOpt).decimal_len(11, 10))
529 .col(ColumnDef::new(pi::Column::BigDecimalOpt).decimal_len(11, 10))
530 .to_owned();
531
532 create_table(db, &stmt, Pi).await
533}
534
535pub async fn create_event_trigger_table(db: &DbConn) -> Result<ExecResult, DbErr> {
536 let stmt = sea_query::Table::create()

Callers 1

create_tablesFunction · 0.85

Calls 4

createFunction · 0.50
newFunction · 0.50
create_tableFunction · 0.50
auto_incrementMethod · 0.45

Tested by

no test coverage detected