ShadowSql.Core
0.8.0.1-alpha
.NET 7.0
This package targets .NET 7.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
This is a prerelease version of ShadowSql.Core.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ShadowSql.Core --version 0.8.0.1-alpha
NuGet\Install-Package ShadowSql.Core -Version 0.8.0.1-alpha
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="ShadowSql.Core" Version="0.8.0.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ShadowSql.Core" Version="0.8.0.1-alpha" />
<PackageReference Include="ShadowSql.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ShadowSql.Core --version 0.8.0.1-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ShadowSql.Core, 0.8.0.1-alpha"
#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.
#addin nuget:?package=ShadowSql.Core&version=0.8.0.1-alpha&prerelease
#tool nuget:?package=ShadowSql.Core&version=0.8.0.1-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ShadowSql.Core
- 拼接sql工具,支持多种数据库,包括MsSql,MySql,Oracle,Sqlite,Postgres等
- 整个sql拼写只使用1个StringBuilder,减少字符串碎片生成
以下简单示例的sql是按MsSql数据库
1. 按列名查询
var query = new TableSqlQuery("Users")
.ColumnParameter("Id", "<", "LastId")
.ColumnValue("Status", true);
SELECT * FROM [Users] WHERE [Id]<@LastId AND [Status]=1
2. 按列查询
var table = new UserTable();
var query = new TableSqlQuery(table)
.Where(table.Id.Less("LastId"))
.Where(table.Status.EqualValue(true));
SELECT * FROM [Users] WHERE [Id]<@LastId AND [Status]=1
3. 原生sql查询
var query = new TableSqlQuery("Users")
.Where("Id=@Id", "Status=@Status");
SELECT * FROM [Users] WHERE Id=@Id AND Status=@Status
4. 逻辑运算查询
var users = new UserTable();
var query = new TableQuery(users)
.And(users.Id.Less("LastId") & users.Status.EqualValue(true));
SELECT * FROM [Users] WHERE [Id]<@LastId AND [Status]=1
5. 分页查询
var table = new UserTable();
var query = new TableSqlQuery(table)
.Where(table.Id.Less("LastId"))
.Where(table.Status.EqualValue(true));
var cursor = new TableCursor(query)
.Desc(table.Id)
.Skip(10)
.Take(10);
SELECT * FROM [Users] WHERE [Id]<@LastId AND [Status]=1 ORDER BY [Id] DESC OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY
Product | Versions 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 is compatible. 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 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.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 is compatible. |
.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.
-
.NETStandard 2.0
- Microsoft.Bcl.Memory (>= 9.0.0)
-
.NETStandard 2.1
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on ShadowSql.Core:
Package | Downloads |
---|---|
ShadowSql
拼接sql工具 |
|
ShadowSql.DDL
ShadowSql的DDL组件 |
|
ShadowSql.Dapper.Core
ShadowSql.Core的Dapper扩展 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.8.0.3-alpha | 100 | 4/13/2025 |
0.8.0.1-alpha | 87 | 4/11/2025 |