高性能、超轻量级的 ORM SmartSql

码农软件 · 软件分类 · ORM/持久层框架 · 2019-09-22 15:28:01

软件介绍

简介

Why

  • 拥抱跨平台 DotNet Core,是时候了。

  • 高性能、高生产力,超轻量级的ORM。156kb (Dapper:168kb)

So SmartSql

  • TargetFrameworks: .NETFramework 4.6 & .NETStandard 2.0

  • SmartSql = SmartSql = MyBatis + Cache(Memory | Redis) + ZooKeeper + R/W Splitting +Dynamic Repository + ......

主要特性

  • 1 ORM

    • 1.1 Sync

    • 1.2 Async

  • 2 XmlConfig & XmlStatement -> Sql

    • 2.1 SmartSqlMapConfig & SmartSqlMap (是的,你猜对了,和MyBatis一样,通过XML配置分离SQL。)

    • 2.2 Config Hot Update ->ConfigWatcher & Reload (配置文件热更新:当你需要修改Sql的时候,直接修改SqlMap配置文件,保存即可。)

  • 3 读写分离

    • 3.1 读写分离

    • 3.2 多读库 权重筛选 (配置多读库,根据读库权重选举读库)

  • 4 日志

    • 4.1 基于 Microsoft.Extensions.Logging.Abstractions (当你需要跟踪调试的时候一切都是那么一目了然)

  • 5 Dynamic Repository

    • 5.1 SmartSql.DyRepository (解放你的双手,你来定义仓储接口,我来实现数据库访问)

  • 6 查询缓存 (热数据缓存,一个配置轻松搞定)

    • 6.1.1 Fifo

    • 6.1.2 Lru

    • 6.1 SmartSql.Cache.Memory

    • 6.2 SmartSql.Cache.Redis

    • 6.3 缓存事务一致性

  • 7 分布式配置插件

    • 7.2.1 Load SmartSqlMapSource Xml

    • 7.3.1 Load SmartSqlMapSource Directory

    • 7.1 IConfigLoader (配置文件加载器)

    • 7.2 LocalFileConfigLoader (本地文件配置加载器)

    • 7.3 SmartSql.ZooKeeperConfig (ZooKeeper 分布式配置文件加载器)

性能评测

BenchmarkDotNet=v0.10.14, OS=Windows 10.0.17134 Intel Core i7-6700K CPU 4.00GHz (Skylake), 1 CPU, 8 logical and 4 physical cores .NET Core SDK=2.1.201 [Host] : .NET Core 2.0.7 (CoreCLR 4.6.26328.01, CoreFX 4.6.26403.03), 64bit RyuJIT DefaultJob : .NET Core 2.0.7 (CoreCLR 4.6.26328.01, CoreFX 4.6.26403.03), 64bit RyuJIT

 

ORMTypeMethodReturnMeanErrorStdDevRankGen 0Gen 1Gen 2Allocated
NativeNativeBenchmarksQuery_GetValue_DbNullIEnumerable`178.39 ms0.8935 ms0.7921 ms13000.00001125.0000500.000015.97 MB
SmartSqlSmartSqlBenchmarksQueryIEnumerable`178.46 ms0.2402 ms0.1875 ms12312.50001000.0000312.500012.92 MB
SmartSqlDapperSmartSqlDapperBenchmarksQueryIEnumerable`178.65 ms1.2094 ms1.1312 ms13687.50001437.5000687.500019.03 MB
NativeNativeBenchmarksQuery_IsDBNull_GetValueIEnumerable`178.84 ms0.8984 ms0.7502 ms12312.50001000.0000312.500012.92 MB
DapperDapperBenchmarksQueryIEnumerable`179.00 ms1.0949 ms0.9706 ms13312.50001312.5000625.000017.19 MB
EFEFBenchmarksQueryIEnumerable`179.44 ms1.6880 ms1.5789 ms16250.0000--26.05 MB
SqlSugarSqlSugarBenchmarksQueryIEnumerable`181.09 ms0.8718 ms0.7728 ms22187.5000875.0000250.000012.64 MB
ChloeChloeBenchmarksQueryIEnumerable`183.86 ms1.2714 ms1.1893 ms32250.0000937.5000312.500012.62 MB
EFEFBenchmarksSqlQueryIEnumerable`189.11 ms0.7562 ms0.6314 ms48187.5000125.0000-33.68 MB
EFEFBenchmarksQuery_NoTrackingIEnumerable`193.13 ms0.8458 ms0.7912 ms55875.00002250.00001062.500029.71 MB
EFEFBenchmarksSqlQuery_NoTrackingIEnumerable`1106.89 ms1.0998 ms1.0288 ms67437.50002875.00001312.500037.34 MB

示例项目


SmartSql-Starter

另外建议感兴趣的同学可以用 SmartCode  配置好数据库链接,生成解决方案,直接 Run 来体验 SmartSql !

文档地址

本文地址:https://codercto.com/soft/d/15162.html

Pro HTML5 and CSS3 Design Patterns

Pro HTML5 and CSS3 Design Patterns

Michael Bowers / Apress / 2011-11-15 / GBP 35.50

Pro HTML5 and CSS3 Design Patterns is a reference book and a cookbook on how to style web pages using CSS3 and HTML5. It contains 350 ready--to--use patterns (CSS3 and HTML5 code snippets) that you ca......一起来看看 《Pro HTML5 and CSS3 Design Patterns》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具