Skip to content

Commit 6c1faf2

Browse files
committed
fmt
1 parent 5d7f5f1 commit 6c1faf2

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

src/table/column.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -606,36 +606,44 @@ impl ColumnDef {
606606
/// # Example
607607
///
608608
/// ```
609-
/// use sea_query::{*, tests_cfg::*};
609+
/// use sea_query::{tests_cfg::*, *};
610610
///
611611
/// let table = Table::create()
612612
/// .table(Char::Table)
613-
/// .col(ColumnDef::new(Char::Id).custom("new_type").not_null().primary_key())
613+
/// .col(
614+
/// ColumnDef::new(Char::Id)
615+
/// .custom("new_type")
616+
/// .not_null()
617+
/// .primary_key(),
618+
/// )
614619
/// .to_owned();
615620
///
616621
/// assert_eq!(
617622
/// table.to_string(MysqlQueryBuilder),
618623
/// [
619624
/// r#"CREATE TABLE `character` ("#,
620-
/// r#"`id` new_type NOT NULL PRIMARY KEY"#,
625+
/// r#"`id` new_type NOT NULL PRIMARY KEY"#,
621626
/// r#")"#,
622-
/// ].join(" ")
627+
/// ]
628+
/// .join(" ")
623629
/// );
624630
/// assert_eq!(
625631
/// table.to_string(PostgresQueryBuilder),
626632
/// [
627633
/// r#"CREATE TABLE "character" ("#,
628-
/// r#""id" new_type NOT NULL PRIMARY KEY"#,
634+
/// r#""id" new_type NOT NULL PRIMARY KEY"#,
629635
/// r#")"#,
630-
/// ].join(" ")
636+
/// ]
637+
/// .join(" ")
631638
/// );
632639
/// assert_eq!(
633640
/// table.to_string(SqliteQueryBuilder),
634641
/// [
635-
/// r#"CREATE TABLE "character" ("#,
636-
/// r#""id" new_type NOT NULL PRIMARY KEY"#,
637-
/// r#")"#,
638-
/// ].join(" ")
642+
/// r#"CREATE TABLE "character" ("#,
643+
/// r#""id" new_type NOT NULL PRIMARY KEY"#,
644+
/// r#")"#,
645+
/// ]
646+
/// .join(" ")
639647
/// );
640648
/// ```
641649
pub fn custom<T>(&mut self, name: T) -> &mut Self

0 commit comments

Comments
 (0)