From d70f0ce2161fc3b6108d4e20d12bd1c77f111569 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 8 Jan 2024 12:53:59 +0000 Subject: [PATCH] Update docs --- src/index/create.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index/create.rs b/src/index/create.rs index 7b64dbd9..9435f875 100644 --- a/src/index/create.rs +++ b/src/index/create.rs @@ -109,19 +109,20 @@ use super::common::*; /// .table(Glyph::Table) /// .col((Glyph::Image, IndexOrder::Asc)) /// .col((Glyph::Aspect, IndexOrder::Desc)) +/// .unique() /// .to_owned(); /// /// assert_eq!( /// index.to_string(MysqlQueryBuilder), -/// r#"CREATE INDEX `idx-glyph-aspect` ON `glyph` (`image` ASC, `aspect` DESC)"# +/// r#"CREATE UNIQUE INDEX `idx-glyph-aspect` ON `glyph` (`image` ASC, `aspect` DESC)"# /// ); /// assert_eq!( /// index.to_string(PostgresQueryBuilder), -/// r#"CREATE INDEX "idx-glyph-aspect" ON "glyph" ("image" ASC, "aspect" DESC)"# +/// r#"CREATE UNIQUE INDEX "idx-glyph-aspect" ON "glyph" ("image" ASC, "aspect" DESC)"# /// ); /// assert_eq!( /// index.to_string(SqliteQueryBuilder), -/// r#"CREATE INDEX "idx-glyph-aspect" ON "glyph" ("image" ASC, "aspect" DESC)"# +/// r#"CREATE UNIQUE INDEX "idx-glyph-aspect" ON "glyph" ("image" ASC, "aspect" DESC)"# /// ); /// ``` /// Index with prefix and order