Releases: dotnetcore/SmartSql
Releases · dotnetcore/SmartSql
v4.1.45
v4.1.42
v4.1.33
v4.1.29
1. add support Auto Converter
configure for SmartSqlConfig.xml
<AutoConverters>
<AutoConverter Name="NoneConverter">
<Tokenizer Name="None"/>
<Converter Name="None"/>
</AutoConverter>
<AutoConverter Name="Default" Default="true">
<Tokenizer Name="Default"/>
<Converter Name="Pascal"/>
</AutoConverter>
<AutoConverter Name="PascalConverter">
<Tokenizer Name="Default">
<Properties>
<Property Name="IgnorePrefix" Value="" />
<Property Name="Delimiter" Value="_" />
<Property Name="UppercaseSplit" Value="false" />
</Properties>
</Tokenizer>
<Converter Name="Pascal"/>
</AutoConverter>
<AutoConverter Name="DelimiterConverter">
<Tokenizer Name="Default">
<Properties>
<Property Name="IgnorePrefix" Value="col_" />
<Property Name="Delimiter" Value="_" />
<Property Name="UppercaseSplit" Value="true" />
</Properties>
</Tokenizer>
<Converter Name="Delimiter">
<Properties>
<Property Name="Prefix" Value="Col_" />
<Property Name="Delimiter" Value="_"/>
<Property Name="Mode" Value="FirstUpper"/>
</Properties>
</Converter>
</AutoConverter>
</AutoConverters>
configure for SqlMaps
<!-- to current sql map -->
<UseAutoConverter Name="DelimiterConverter"/>
<!-- disabled auto converter to current sql map -->
<UseAutoConverter Disabled="true"/>
<!-- assign auto converter at statement -->
<Statement Id="AssignAutoConverterQuery" AutoConverter="PascalConverter" >
Select * From T_AutoConverter_1
</Statement>
assign auto converter at RequestContext
var list = SqlMapper.Query<AutoConverter_2>(new RequestContext
{
Scope = "DefaultAutoConverter",
SqlId = "AssignAutoFromRequestConverterQuery",
AutoConverterName = "DelimiterConverter"
});
v4.1.27
- fix StatementType parse bug for SmartSql.DataConnector
- optimize FlushOnExecuted log
- fix ISqlMapperExtensions SessionStore.Dispose bug
- optimize PropertyTokenizer
- fix #99
- fix #100 -> thx #101
- optimize #102
- add QueryDynamic/QueryDictionary extension for DbSession/SqlMapper
- add support same [Scope] for mutil-sqlmap -> thx #104
v4.1.19
- add AES/DES TypeHandler impl
- init SmartSql.DataConnector
- task builder register smartsql use alias for SmartSql.DataConnector
- optimize Error log
- optimize sourceParameterPrefix when null
- SmartSql.DataConnector pack as tool
- add support Mutil-Publisher-Subscriber for SmartSql.InvokeSync.RabbitMQ
- add support Mutil-Publisher-Subscriber for SmartSql.InvokeSync.Kafka
- add support DbCommandCreated event for CommandExecuter
- fix #89
Install-Package SmartSql.Oracle
new SmartSqlBuilder().
UseOracleCommandExecuter()
...
v4.1.11
- add support Now-Tag
<Statement Id="GetNow">
<Now Property="CreateTime"/>
Select @CreateTime;
</Statement>
<Statement Id="UpdateDateTime">
<Now Property="CreateTime"/>
UPDATE T_AllPrimitive
<Set>
DateTime =@CreateTime
</Set>
Where Id=@Id
</Statement>
Select @CreateTime;
Parameters:[CreateTime=2019/7/30 3:46:18]
Sql with parameter value:
Select '2019/7/30 3:46:18'; (99204db3)
UPDATE T_AllPrimitive
Set DateTime =@DateTime
Where Id=@Id
Parameters:[DateTime=2019/7/30 11:38:13,Id=86088]
Sql with parameter value:
UPDATE T_AllPrimitive
Set DateTime ='2019/7/30 11:38:13'
Where Id=86088
- add support Properties nest propExp
- add UsePropertiesFromEnv api for SmartSqlBuilder
- add CryptoTypeHandler api - pre
- add IFunction api - pre
v4.1.9
- add support IgnoreDbNull ofr SmartSqlConfig
- add support AddTypeHandler for SmartSqlBuilder
- add GetSetParameterValue api for TypeHandler
- add TypeScan
- add RegisterEntity for SmartSqlBuilder
- add support TypeHandler for Bulk api
- add support Cache-Annotation with Cache-XML Mixed use
- optimize PrepareStatement
- add support EnablePropertyChangedTrack/ReadDb/CommandTimeout for StatementAttribute
v4.1.5
- add support CacheKeyTemplate for RequestContext
- add Rest api for ICacheManager
- add support for dynamic generation of SqlMap with Repository interface
[Cache("DateCache", "Lru", FlushInterval = 6000)]
[Cache("LruCache", "Lru", FlushInterval = 6000)]
[Cache("UserCache", "Fifo", FlushOnExecutes = new[] {"UpdateUserName"})]
public interface IUsedCacheRepository
{
[ResultCache("DateCache", Key = "GetNow")]
[Statement(Sql = "Select GetDate();")]
DateTime GetNow();
[ResultCache("LruCache", Key = "GetId:$id")]
[Statement(Sql = "Select @id;")]
int GetId(long id);
[ResultCache("UserCache", Key = "GetUserById:$id")]
[Statement(Sql = "select * from T_User where id=@id;")]
User GetUserById(long id);
[Statement(Sql = "update T_User set UserName=@userName where id=@id;")]
int UpdateUserName(long id, string userName);
}
v4.1.3
- Change Sample DB To SQLite And Fix SQLite ParameterPrefix
- add support [For-tag] nest-value-access
- optimize Check null-Tag.Property from XML-tag
- optimize Check null-Tag.Property ExceptionMessage
- add support Cache-Annotations for Repository-interface - Demo
[Cache("DateCache", "Lru", FlushInterval = 6000)]
[Cache("LruCache", "Lru", FlushInterval = 6000)]
[Cache("UserCache", "Fifo", FlushOnExecutes = new[] {"UpdateUserName"})]
public interface IUsedCacheRepository
{
[ResultCache("DateCache", Key = "GetNow")]
[Statement(Sql = "Select Now();")]
DateTime GetNow();
[ResultCache("LruCache", Key = "GetId:$id")]
[Statement(Sql = "Select @id;")]
int GetId(long id);
[ResultCache("UserCache", Key = "GetUserById:$id")]
[Statement(Sql = "select * from T_User where id=@id;")]
User GetUserById(long id);
[Statement(Sql = "update T_User set UserName=@userName where id=@id;")]
int UpdateUserName(long id, string userName);
}
- add support ColumnAttribute for EntityDeserializer
- add support ColumnAttribute for RequestConvert
- add support ParamAttribute for TypeHandler
- add ResultType From ArrayType to Object for ExecuteScalar.
[Annotations.Table("t_annotation_entity")]
public class ColumnAnnotationEntity
{
[Annotations.Column("id", IsAutoIncrement = true)]
public long Id { get; set; }
[Annotations.Column("name")] public String Name { get; set; }
[Annotations.Column("extend_data", TypeHandler = "Json")]
public ExtendData Data { get; set; }
public class ExtendData
{
public String Info { get; set; }
}
}
public interface IColumnAnnotationRepository
{
ISqlMapper SqlMapper { get; }
[Statement(Sql = "Select Top 1 T.* From t_column_annotation_entity T where T.id=@id")]
ColumnAnnotationEntity GetEntity(long id);
[Statement(Sql =
"INSERT INTO t_column_annotation_entity(name,extend_data)VALUES(@Name,@Data);Select Scope_Identity();")]
int Insert(ColumnAnnotationEntity entity);
[Statement(Sql =
"INSERT INTO t_column_annotation_entity(name,extend_data)VALUES(@Name,@Data);Select Scope_Identity();")]
int Insert([Param("Name")] string name,
[Param("Data", TypeHandler = "Json")] ColumnAnnotationEntity.ExtendData data);
}