From 1c4838167b288e55891a201fe4276a167973c8ac Mon Sep 17 00:00:00 2001 From: skx <610262374@qq.com> Date: Thu, 7 Jan 2021 18:41:55 +0800 Subject: [PATCH] Sqlite support sql index --- .../Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs b/Src/Asp.Net/SqlSugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs index eae2928aa..22dd05ffd 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs @@ -189,7 +189,7 @@ namespace SqlSugar { get { - return "alter table {0} rename to {1}"; + return "CREATE {3} INDEX Index_{0}_{2} ON {0}({1})"; } } @@ -197,7 +197,7 @@ namespace SqlSugar { get { - throw new NotSupportedException(); + return "SELECT count(*) FROM sqlite_master WHERE name = '{0}'"; } } protected override string AddDefaultValueSql @@ -211,7 +211,7 @@ namespace SqlSugar { get { - throw new NotSupportedException(); + return "SELECT count(*) FROM sqlite_master WHERE name = '{0}'"; } } #endregion