Browse Source

Fix QuestDb table names case sensitive issue on linux

SqlSugar5
CarbonHe 2 years ago
parent
commit
d4a1e13389
  1. 1
      .gitignore
  2. 2
      Src/Asp.NetCore2/SqlSugar/Realization/QuestDB/DbMaintenance/QuestDBDbMaintenance.cs
  3. 9
      Src/Asp.NetCore2/SqlSugar/Realization/QuestDB/SqlBuilder/QuestDBBuilder.cs

1
.gitignore

@ -209,3 +209,4 @@ GeneratedArtifacts/
_Pvt_Extensions/ _Pvt_Extensions/
ModelManifest.xml ModelManifest.xml
Src/Asp.NetCore2/SqlSeverTest/.idea/ Src/Asp.NetCore2/SqlSeverTest/.idea/
.idea

2
Src/Asp.NetCore2/SqlSugar/Realization/QuestDB/DbMaintenance/QuestDBDbMaintenance.cs

@ -432,7 +432,7 @@ namespace SqlSugar
//} //}
columnArray.Add(addItem); columnArray.Add(addItem);
} }
string tableString = string.Format(this.CreateTableSql, this.SqlBuilder.GetTranslationTableName(tableName.ToLower()), string.Join(",\r\n", columnArray)); string tableString = string.Format(this.CreateTableSql, this.SqlBuilder.GetTranslationTableName(tableName), string.Join(",\r\n", columnArray));
return tableString; return tableString;
} }
public override bool IsAnyConstraint(string constraintName) public override bool IsAnyConstraint(string constraintName)

9
Src/Asp.NetCore2/SqlSugar/Realization/QuestDB/SqlBuilder/QuestDBBuilder.cs

@ -35,14 +35,7 @@ namespace SqlSugar
} }
} }
public bool isAutoToLower public bool isAutoToLower => false;
{
get
{
if (this.Context.CurrentConnectionConfig.MoreSettings == null) return true;
return this.Context.CurrentConnectionConfig.MoreSettings.PgSqlIsAutoToLower;
}
}
public override string GetTranslationColumnName(string propertyName) public override string GetTranslationColumnName(string propertyName)
{ {
if (propertyName.Contains(".")&& !propertyName.Contains(SqlTranslationLeft)) if (propertyName.Contains(".")&& !propertyName.Contains(SqlTranslationLeft))

Loading…
Cancel
Save