mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
Optimize single table read performance
This commit is contained in:
@ -34,6 +34,8 @@ namespace FreeSql.MySql
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
Select0Provider._dicMethodDataReaderGetValue[typeof(Guid)] = typeof(DbDataReader).GetMethod("GetGuid", new Type[] { typeof(int) });
|
||||
}
|
||||
|
||||
public override ISelect<T1> CreateSelectProvider<T1>(object dywhere) => new MySqlSelect<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression, dywhere);
|
||||
|
@ -21,7 +21,6 @@ namespace FreeSql.PostgreSQL
|
||||
|
||||
public class PostgreSQLProvider<TMark> : BaseDbProvider, IFreeSql<TMark>
|
||||
{
|
||||
|
||||
static PostgreSQLProvider()
|
||||
{
|
||||
Utils.dicExecuteArrayRowReadClassOrTuple[typeof(BigInteger)] = true;
|
||||
@ -104,7 +103,9 @@ namespace FreeSql.PostgreSQL
|
||||
Expression.Return(returnTarget, Expression.TypeAs(Expression.Call(MethodJsonConvertDeserializeObject, Expression.Convert(valueExp, typeof(string)), Expression.Constant(type, typeof(Type))), type)),
|
||||
Expression.Return(returnTarget, Expression.TypeAs(Expression.Call(MethodJsonConvertDeserializeObject, Expression.Convert(Expression.Call(MethodToString, valueExp), typeof(string)), Expression.Constant(type, typeof(Type))), type)));
|
||||
return null;
|
||||
});
|
||||
});
|
||||
|
||||
Select0Provider._dicMethodDataReaderGetValue[typeof(Guid)] = typeof(DbDataReader).GetMethod("GetGuid", new Type[] { typeof(int) });
|
||||
}
|
||||
|
||||
public override ISelect<T1> CreateSelectProvider<T1>(object dywhere) => new PostgreSQLSelect<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression, dywhere);
|
||||
|
@ -9,6 +9,11 @@ namespace FreeSql.SqlServer
|
||||
|
||||
public class SqlServerProvider<TMark> : BaseDbProvider, IFreeSql<TMark>
|
||||
{
|
||||
static SqlServerProvider()
|
||||
{
|
||||
Select0Provider._dicMethodDataReaderGetValue[typeof(Guid)] = typeof(DbDataReader).GetMethod("GetGuid", new Type[] { typeof(int) });
|
||||
}
|
||||
|
||||
public override ISelect<T1> CreateSelectProvider<T1>(object dywhere) => new SqlServerSelect<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression, dywhere);
|
||||
public override IInsert<T1> CreateInsertProvider<T1>() => new SqlServerInsert<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression);
|
||||
public override IUpdate<T1> CreateUpdateProvider<T1>(object dywhere) => new SqlServerUpdate<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression, dywhere);
|
||||
|
@ -9,6 +9,11 @@ namespace FreeSql.Sqlite
|
||||
|
||||
public class SqliteProvider<TMark> : BaseDbProvider, IFreeSql<TMark>
|
||||
{
|
||||
static SqliteProvider()
|
||||
{
|
||||
Select0Provider._dicMethodDataReaderGetValue[typeof(Guid)] = typeof(DbDataReader).GetMethod("GetGuid", new Type[] { typeof(int) });
|
||||
}
|
||||
|
||||
public override ISelect<T1> CreateSelectProvider<T1>(object dywhere) => new SqliteSelect<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression, dywhere);
|
||||
public override IInsert<T1> CreateInsertProvider<T1>() => new SqliteInsert<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression);
|
||||
public override IUpdate<T1> CreateUpdateProvider<T1>(object dywhere) => new SqliteUpdate<T1>(this, this.InternalCommonUtils, this.InternalCommonExpression, dywhere);
|
||||
|
Reference in New Issue
Block a user