mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronized code
This commit is contained in:
parent
fb147fb0fa
commit
81e53108fd
@ -111,7 +111,10 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("varcharbyte varying",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("bpcharbyte",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("nvarchar",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("characterbyte",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("information_schema.character_data",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("uuid",CSharpDataType.Guid),
|
||||
new KeyValuePair<string, CSharpDataType>("uniqueidentifier",CSharpDataType.Guid),
|
||||
new KeyValuePair<string, CSharpDataType>("xml",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("json",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("rowid",CSharpDataType.@string),
|
||||
@ -122,6 +125,8 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("macaddr",CSharpDataType.@decimal),
|
||||
new KeyValuePair<string, CSharpDataType>("money",CSharpDataType.@decimal),
|
||||
new KeyValuePair<string, CSharpDataType>("timestamp",CSharpDataType.DateTime),
|
||||
new KeyValuePair<string, CSharpDataType>("datetime2",CSharpDataType.DateTime),
|
||||
new KeyValuePair<string, CSharpDataType>("datetime",CSharpDataType.DateTime),
|
||||
new KeyValuePair<string, CSharpDataType>("timestamp with time zone",CSharpDataType.DateTime),
|
||||
new KeyValuePair<string, CSharpDataType>("timestamptz",CSharpDataType.DateTime),
|
||||
new KeyValuePair<string, CSharpDataType>("timestamp without time zone",CSharpDataType.DateTime),
|
||||
@ -135,6 +140,7 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("blob",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("bit varying",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("varbit",CSharpDataType.@byte),
|
||||
new KeyValuePair<string, CSharpDataType>("rowversion",CSharpDataType.byteArray),
|
||||
new KeyValuePair<string, CSharpDataType>("regclass",CSharpDataType.@object)
|
||||
|
||||
};
|
||||
|
@ -411,7 +411,7 @@ WHERE tgrelid = '" + tableName + "'::regclass");
|
||||
var sql = $"select count(*) from information_schema.tables where UPPER(table_schema)=UPPER('{GetSchema()}') and UPPER(table_type)=UPPER('BASE TABLE') and UPPER(table_name)=UPPER('{tableName.ToUpper(IsUpper)}')";
|
||||
if (IsSqlServerModel())
|
||||
{
|
||||
sql = $"select count(*) from information_schema.tables where pg_catalog.UPPER(table_name)=pg_catalog.UPPER('{tableName.ToUpper(IsUpper)}')";
|
||||
sql = $"select count(*) from information_schema.tables where UPPER(table_schema)=UPPER('{GetSchema()}') and pg_catalog.UPPER(table_name)=pg_catalog.UPPER('{tableName.ToUpper(IsUpper)}')";
|
||||
}
|
||||
return this.Context.Ado.GetInt(sql)>0;
|
||||
}
|
||||
|
@ -130,6 +130,11 @@ namespace SqlSugar
|
||||
}
|
||||
public override string DateDiff(MethodCallExpressionModel model)
|
||||
{
|
||||
if (IsSqlServerModel(model))
|
||||
{
|
||||
return base.DateDiff(model);
|
||||
}
|
||||
|
||||
var parameter = (DateType)(Enum.Parse(typeof(DateType), model.Args[0].MemberValue.ObjToString()));
|
||||
var begin = model.Args[1].MemberName;
|
||||
var end = model.Args[2].MemberName;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SqlSugarCore</id>
|
||||
<version>5.1.4.171-preview28</version>
|
||||
<version>5.1.4.171-preview29</version>
|
||||
<authors>sunkaixuan</authors>
|
||||
<owners>果糖大数据科技</owners>
|
||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||
|
Loading…
Reference in New Issue
Block a user