mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 03:53:21 +08:00
- 优化 表达式解析变量或常量 ToString;
This commit is contained in:
parent
c038097645
commit
5f01fbd457
@ -549,7 +549,6 @@ namespace base_entity
|
|||||||
.UseNameConvert(NameConvertType.ToLower)
|
.UseNameConvert(NameConvertType.ToLower)
|
||||||
//.UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
//.UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
||||||
.UseAdoConnectionPool(true)
|
.UseAdoConnectionPool(true)
|
||||||
.UseConnectionFactory(DataType.Xugu, () => null)
|
|
||||||
|
|
||||||
//.UseConnectionString(FreeSql.DataType.Sqlite, "data source=123.db")
|
//.UseConnectionString(FreeSql.DataType.Sqlite, "data source=123.db")
|
||||||
//.UseConnectionString(DataType.Sqlite, "data source=db1.db;attachs=db2.db")
|
//.UseConnectionString(DataType.Sqlite, "data source=db1.db;attachs=db2.db")
|
||||||
@ -560,7 +559,7 @@ namespace base_entity
|
|||||||
//.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
|
//.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
|
||||||
//.UseQuoteSqlName(false)
|
//.UseQuoteSqlName(false)
|
||||||
|
|
||||||
//.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=3;AllowLoadLocalInfile=true")
|
.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=3;AllowLoadLocalInfile=true")
|
||||||
|
|
||||||
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3;TrustServerCertificate=true")
|
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3;TrustServerCertificate=true")
|
||||||
//.UseAdoConnectionPool(false)
|
//.UseAdoConnectionPool(false)
|
||||||
@ -601,6 +600,14 @@ namespace base_entity
|
|||||||
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
|
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
var v1 = 123123123;
|
||||||
|
var mysql0111 = fsql.Select<User1>().Where(a => a.Nickname.Contains(v1.ToString())).ToSql();
|
||||||
|
var mysql0112 = fsql.Select<User1>().Where(a => a.Nickname.Contains(123123123.ToString())).ToSql();
|
||||||
|
var v2 = "123123123";
|
||||||
|
var mysql0113 = fsql.Select<User1>().Where(a => a.Nickname.Contains(v2)).ToSql();
|
||||||
|
var mysql0114 = fsql.Select<User1>().Where(a => a.Nickname.Contains(v2.ToString())).ToSql();
|
||||||
|
var mysql0115 = fsql.Select<User1>().Where(a => a.Nickname.Contains("123123123")).ToSql();
|
||||||
|
|
||||||
//fsql.Select<AsTableLog>().Where(a => a.createtime > DateTime.Now && a.createtime < DateTime.Now.AddMonths(1)).ToList();
|
//fsql.Select<AsTableLog>().Where(a => a.createtime > DateTime.Now && a.createtime < DateTime.Now.AddMonths(1)).ToList();
|
||||||
//var table = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog));
|
//var table = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog));
|
||||||
//table.SetAsTable(new ModAsTableImpl(fsql), table.ColumnsByCs[nameof(AsTableLog.click)]);
|
//table.SetAsTable(new ModAsTableImpl(fsql), table.ColumnsByCs[nameof(AsTableLog.click)]);
|
||||||
|
@ -800,5 +800,14 @@
|
|||||||
<param name="that"></param>
|
<param name="that"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Microsoft.Extensions.DependencyInjection.FreeSqlRepositoryDependencyInjection.AddFreeRepository(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{FreeSql.FluentDataFilter},System.Reflection.Assembly[])">
|
||||||
|
<summary>
|
||||||
|
批量注入 Repository,可以参考代码自行调整
|
||||||
|
</summary>
|
||||||
|
<param name="services"></param>
|
||||||
|
<param name="globalDataFilter"></param>
|
||||||
|
<param name="assemblies"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
</members>
|
</members>
|
||||||
</doc>
|
</doc>
|
||||||
|
@ -99,6 +99,8 @@ namespace FreeSql.ClickHouse
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as String)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as String)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Custom
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? _utils.Adapter.LambdaConvert_ToString(callExp.Object.Type, getExp(callExp.Object)) : null;
|
return callExp.Arguments.Count == 0 ? _utils.Adapter.LambdaConvert_ToString(callExp.Object.Type, getExp(callExp.Object)) : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -96,6 +96,8 @@ namespace FreeSql.Custom.MySql
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as char)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as char)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Custom.Oracle
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -99,6 +99,8 @@ namespace FreeSql.Custom.PostgreSQL
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -104,6 +104,8 @@ namespace FreeSql.Custom.SqlServer
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? (gentype2 == typeof(Guid) ?
|
return callExp.Arguments.Count == 0 ? (gentype2 == typeof(Guid) ?
|
||||||
$"cast({getExp(callExp.Object)} as varchar(36))" :
|
$"cast({getExp(callExp.Object)} as varchar(36))" :
|
||||||
$"cast({getExp(callExp.Object)} as nvarchar{(gentype2.IsNumberType() || gentype2.IsEnum ? "(100)" : "(max)")})") : null;
|
$"cast({getExp(callExp.Object)} as nvarchar{(gentype2.IsNumberType() || gentype2.IsEnum ? "(100)" : "(max)")})") : null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Dameng
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -97,6 +97,8 @@ namespace FreeSql.Firebird
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as blob sub_type 1)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as blob sub_type 1)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -97,6 +97,8 @@ namespace FreeSql.GBase
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as varchar(8000))" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as varchar(8000))" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -99,6 +99,8 @@ namespace FreeSql.KingbaseES
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -70,6 +70,8 @@ namespace FreeSql.MsAccess
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? MsAccessUtils.GetCastSql(getExp(callExp.Object), typeof(string)) : null;
|
return callExp.Arguments.Count == 0 ? MsAccessUtils.GetCastSql(getExp(callExp.Object), typeof(string)) : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -98,6 +98,8 @@ namespace FreeSql.MySql
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as char)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as char)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Odbc.Dameng
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Odbc.Default
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? _utils.Adapter.LambdaConvert_ToString(callExp.Object.Type, getExp(callExp.Object)) : null;
|
return callExp.Arguments.Count == 0 ? _utils.Adapter.LambdaConvert_ToString(callExp.Object.Type, getExp(callExp.Object)) : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -99,6 +99,8 @@ namespace FreeSql.Odbc.KingbaseES
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -96,6 +96,8 @@ namespace FreeSql.Odbc.MySql
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as char)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as char)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Odbc.Oracle
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -99,6 +99,8 @@ namespace FreeSql.Odbc.PostgreSQL
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -104,6 +104,8 @@ namespace FreeSql.Odbc.SqlServer
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? (gentype2 == typeof(Guid) ?
|
return callExp.Arguments.Count == 0 ? (gentype2 == typeof(Guid) ?
|
||||||
$"cast({getExp(callExp.Object)} as varchar(36))" :
|
$"cast({getExp(callExp.Object)} as varchar(36))" :
|
||||||
$"cast({getExp(callExp.Object)} as nvarchar{(gentype2.IsNumberType() || gentype2.IsEnum ? "(100)" : "(max)")})") : null;
|
$"cast({getExp(callExp.Object)} as nvarchar{(gentype2.IsNumberType() || gentype2.IsEnum ? "(100)" : "(max)")})") : null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.Oracle
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
return callExp.Arguments.Count == 0 ? $"to_char({getExp(callExp.Object)})" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -100,6 +100,8 @@ namespace FreeSql.PostgreSQL
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -105,6 +105,8 @@ namespace FreeSql.QuestDb
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as string)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as string)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -99,6 +99,8 @@ namespace FreeSql.ShenTong
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
return callExp.Arguments.Count == 0 ? $"({getExp(callExp.Object)})::text" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -103,6 +103,8 @@ namespace FreeSql.SqlServer
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? (gentype2 == typeof(Guid) ?
|
return callExp.Arguments.Count == 0 ? (gentype2 == typeof(Guid) ?
|
||||||
$"cast({getExp(callExp.Object)} as varchar(36))" :
|
$"cast({getExp(callExp.Object)} as varchar(36))" :
|
||||||
$"cast({getExp(callExp.Object)} as nvarchar{(gentype2.IsNumberType() || gentype2.IsEnum ? "(100)" : "(max)")})") : null;
|
$"cast({getExp(callExp.Object)} as nvarchar{(gentype2.IsNumberType() || gentype2.IsEnum ? "(100)" : "(max)")})") : null;
|
||||||
|
@ -96,6 +96,8 @@ namespace FreeSql.Sqlite
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as character)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as character)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -103,6 +103,8 @@ namespace FreeSql.Xugu
|
|||||||
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
tsc.SetMapColumnTmp(null).SetMapTypeReturnOld(oldMapType);
|
||||||
return enumStr;
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
var value = ExpressionGetValue(callExp.Object, out var success);
|
||||||
|
if (success) return formatSql(value, typeof(string), null, null);
|
||||||
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as text)" : null;
|
return callExp.Arguments.Count == 0 ? $"cast({getExp(callExp.Object)} as text)" : null;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user