mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
207e70b725
commit
90c1226a68
@ -105,7 +105,7 @@ namespace SqlSugar
|
||||
}
|
||||
public QueryMethodInfo Where(string sql, object parameters = null)
|
||||
{
|
||||
var method = QueryableObj.GetType().GetMyMethod("Where", 2, typeof(string), typeof(object));
|
||||
var method = QueryableObj.GetType().GetMyMethodNoGen("Where", 2, typeof(string), typeof(object));
|
||||
this.QueryableObj = method.Invoke(QueryableObj, new object[] { sql, parameters });
|
||||
return this;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace SqlSugar
|
||||
then true else false end as IsNullable
|
||||
from (select * from pg_tables where upper(tablename) = upper('{0}') and schemaname='" + schema + @"') ptables inner join pg_class pclass
|
||||
on ptables.tablename = pclass.relname inner join (SELECT *
|
||||
FROM information_schema.columns
|
||||
FROM information_schema.columns where table_schema='" + schema + @"'
|
||||
) pcolumn on pcolumn.table_name = ptables.tablename
|
||||
left join (
|
||||
select pg_class.relname,pg_attribute.attname as colname from
|
||||
|
@ -39,6 +39,14 @@ namespace SqlSugar
|
||||
it.GetParameters().First().ParameterType == parameterType&&
|
||||
it.GetParameters()[1].ParameterType == parameterType2) ;
|
||||
}
|
||||
|
||||
public static MethodInfo GetMyMethodNoGen(this Type type, string name, int argCount, Type parameterType, Type parameterType2)
|
||||
{
|
||||
return type.GetMethods().Where(it => it.Name == name&&it?.GetGenericArguments()?.Count()==0).FirstOrDefault(it =>
|
||||
it.GetParameters().Length == argCount &&
|
||||
it.GetParameters().First().ParameterType == parameterType &&
|
||||
it.GetParameters()[1].ParameterType == parameterType2);
|
||||
}
|
||||
public static MethodInfo GetMyMethod(this Type type, string name, int argCount, Type parameterType, Type parameterType2, Type parameterType3)
|
||||
{
|
||||
return type.GetMethods().Where(it => it.Name == name).FirstOrDefault(it =>
|
||||
|
Loading…
Reference in New Issue
Block a user