SmartXmlSql 1.2.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package SmartXmlSql --version 1.2.2                
NuGet\Install-Package SmartXmlSql -Version 1.2.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SmartXmlSql" Version="1.2.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SmartXmlSql --version 1.2.2                
#r "nuget: SmartXmlSql, 1.2.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SmartXmlSql as a Cake Addin
#addin nuget:?package=SmartXmlSql&version=1.2.2

// Install SmartXmlSql as a Cake Tool
#tool nuget:?package=SmartXmlSql&version=1.2.2                

SmartXmlSql

XML配置SQL


使用
SqlGenerator.Instance.Builder();传入参数值


SmartXmlSqlMaper.xsd 提示xml关键字

关键字说明

关键字 含义 使用 说明 样例
Statement 一个SQL语句节点 Id属性对应调用方法;DB属性对应数据库名称;Acess对应SQL语句类型(select,update,bath);Key对应实体关系 Key="Entity",用实体全部属性生成SQL,需要配置替换SQL;Key="Array",生成in的部分,方法传入数组,需要配置替换SQL;Key = "List",生成批量SQL语句,需要配置插入SQL的字段和参数,这样可以取实体的部分属性;Key ="Batch"生成批量语句,此时会用实体的全部属性生成,需要配置替换SQL。 需要配置的替换SQL形如:insert into kk (<$p>) values(@p)
Where 生成条件语句 该关键字下有sql部分语句返回 则会增加where同时移除or,and开头部分
Choose 选择部分 子节点必须是When,Othersize,并且要同时存在,可以有default节点 子节点相当于IF ...else
When 选择 属性可以是IsNotEmpty或者Dynamic,IsNotEmpty判断实体属性是否为空;Dynamic为一般判断 为真则使用SQL部分,否则使用Othersize节点的SQL
Othersize 选择 When为真则用它的SQL部分
Switch 多项选择 使用子节点为真的部分SQL,子节点只能是Case,Default
Case 多项中的一项 为真则使用它的SQL部分
Set 更新语句的设置 将节点下的SQL加入SQL
Default 直接使用该节点 SQL语句直接拼接加入
Page 使用分页 该节点必须包含pagesize,pagenum这2个变量表达式 (pagenum-1)*pageSize
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.9 168 9/29/2023
1.3.8 140 9/25/2023
1.3.7 136 9/20/2023
1.3.6 150 5/15/2023
1.3.5 145 5/14/2023
1.3.4 163 4/19/2023
1.3.3 398 10/2/2021
1.3.2 412 10/2/2021
1.3.1 452 12/5/2020
1.3.0 367 12/3/2020
1.2.5 429 9/2/2020
1.2.4 499 4/12/2020
1.2.2 496 4/12/2020
1.2.1 509 4/11/2020
1.2.0 464 4/11/2020
1.1.0 527 4/5/2020
1.0.1 558 4/5/2020
1.0.0 517 3/30/2020

增加缓存,保留已经解析的SQL