Carrigan.SqlTools 0.6.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Carrigan.SqlTools --version 0.6.0
                    
NuGet\Install-Package Carrigan.SqlTools -Version 0.6.0
                    
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="Carrigan.SqlTools" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Carrigan.SqlTools" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Carrigan.SqlTools" />
                    
Project file
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 Carrigan.SqlTools --version 0.6.0
                    
#r "nuget: Carrigan.SqlTools, 0.6.0"
                    
#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.
#:package Carrigan.SqlTools@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Carrigan.SqlTools&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Carrigan.SqlTools&version=0.6.0
                    
Install as a Cake Tool

<a id="carrigan.sqltools"></a>

Carrigan.SqlTools

Carrigan.SqlTools contains the shared SQL modeling, reflection, predicate, join, paging, and query-building abstractions used by the Carrigan.SqlTools dialect generator and client packages.

This package is the core foundation for dialect-specific generators such as Carrigan.SqlTools.Generators.SqlServer and Carrigan.SqlTools.Generators.PostgreSql. Most applications should reference a dialect generator package directly instead of using this package by itself.

This package may be installed directly when you are building shared Carrigan.SqlTools infrastructure, writing a new dialect package, or using the common model types in tests or libraries.

This library may be used to model or generate SQL through dialect packages. Review generated SQL before use in production systems. Always test against non-production databases first.

Use caution with schema, migration, and data-modifying operations. The authors are not responsible for data loss, downtime, or unintended database changes.


Installation

dotnet add package Carrigan.SqlTools

For SQL Server generation, install:

dotnet add package Carrigan.SqlTools.Generators.SqlServer

For PostgreSQL generation, install:

dotnet add package Carrigan.SqlTools.Generators.PostgreSql

For SQL Server execution helpers, install:

dotnet add package Carrigan.SqlTools.Clients.SqlServer

For PostgreSQL execution helpers, install:

dotnet add package Carrigan.SqlTools.Clients.PostgreSql

Package role

Carrigan.SqlTools provides shared infrastructure, including:

  • SQL fragment types and query containers.
  • Table, column, alias, parameter, procedure, and result-column identifier wrappers.
  • Reflection caches used to map C# model classes and properties to SQL tables, columns, and parameters.
  • Predicate, join, order-by, paging, and query-builder base types.
  • Common attributes such as IdentifierAttribute, PrimaryKeyAttribute, ParameterAttribute, AliasAttribute, and SelectTagAttribute.
  • Shared exception types used by the generator packages.

Dialect-specific behavior, such as identifier quoting, parameter rendering, data type mapping, RETURNING, OUTPUT, LIMIT/OFFSET, or OFFSET/FETCH NEXT, belongs in the dialect generator packages.


  • Carrigan.SqlTools.Generators.SqlServer
  • Carrigan.SqlTools.Generators.PostgreSql
  • Carrigan.SqlTools.Clients.Core
  • Carrigan.SqlTools.Clients.SqlServer
  • Carrigan.SqlTools.Clients.PostgreSql

License

Carrigan.SqlTools
Copyright © 2025 Carrigan Software Solutions LLC

Licensed under the Apache License, Version 2.0.

Product Compatible and additional computed target framework versions.
.NET 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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Carrigan.SqlTools:

Package Downloads
Carrigan.SqlTools.Clients.Core

Shared core client infrastructure for Carrigan.SqlTools database dialect packages. Intended primarily as a transitive dependency for dialect-specific client implementations.

Carrigan.SqlTools.Generators.SqlServer

Carrigan.SqlTools.Generators.SqlServer provides Microsoft SQL Server-specific SQL generation support for Carrigan.SqlTools. Its primary purpose is to generate SELECT, INSERT, UPDATE, and DELETE statements using reflection and the shared Carrigan.SqlTools query model. The package integrates with Carrigan.Core through shared interfaces and property-level metadata used by the Carrigan.SqlTools model. In addition to automated generation, the SQL Server generator supports a manual, object-oriented approach for building SQL Server statements with ORDER BY, JOIN, WHERE clauses, and paginated queries. The generated SQL can be used with the dialect client packages, which use shared invocation infrastructure to map result rows to model instances. This package focuses specifically on SQL Server dialect behavior. The companion package Carrigan.SqlTools.Clients.SqlServer provides ADO.NET execution helpers for generated SQL Server queries.

Carrigan.SqlTools.Generators.PostgreSql

Carrigan.SqlTools.Generators.PostgreSql provides PostgreSQL-specific SQL generation support for Carrigan.SqlTools. The package extends the core Carrigan.SqlTools query-building model with PostgreSQL dialect rules, including PostgreSQL identifier formatting, parameter formatting, data type generation, LIMIT/OFFSET paging syntax, joins, WHERE clauses, ORDER BY clauses, and CRUD statement generation. It supports reflection-based generation of SELECT, INSERT, UPDATE, and DELETE statements while preserving the flexibility to build queries manually through a strongly typed, object-oriented SQL construction model. Carrigan.SqlTools.Generators.PostgreSql is intended for developers who need safe, reusable PostgreSQL query generation without adopting a full ORM. It works with Carrigan.Core attributes and shared interfaces to support property-level metadata, custom encryption workflows, object mapping, and consistent SQL generation across application code. This package focuses specifically on PostgreSQL dialect behavior and is designed to be used alongside the Carrigan.SqlTools core abstractions.

Carrigan.SqlTools.Clients.SqlServer

Carrigan.SqlTools.Clients.SqlServer is a companion library to Carrigan.SqlTools.Generators.SqlServer, focused on executing SQL Server queries at runtime. It provides a wrapper around ADO.NET that makes it easier to run the queries generated by Carrigan.SqlTools.Generators.SqlServer. It also uses the shared invocation infrastructure to create model instances from SQL Server result rows. In addition, the library handles decryption of encrypted properties when encryption logic has been defined through the interfaces and attributes provided by Carrigan.Core. Together with Carrigan.SqlTools.Generators.SqlServer, this library provides a full workflow for generating, executing, and consuming SQL Server queries with object-oriented protections.

Carrigan.SqlTools.Clients.PostgreSql

PostgreSQL client support for Carrigan.SqlTools. This package provides PostgreSQL-specific client functionality for executing Carrigan.SqlTools-generated SQL against PostgreSQL databases, using the shared Carrigan.SqlTools client core infrastructure.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 46 7/25/2026
0.7.0-alpha.202607240141 50 7/24/2026
0.7.0-alpha.202607232350 45 7/23/2026
0.7.0-alpha.202607230225 54 7/23/2026
0.7.0-alpha.202607200640 83 7/20/2026
0.7.0-alpha.202607170545 85 7/17/2026
0.6.1 225 6/11/2026
0.6.0 185 6/8/2026
0.6.0-alpha.202606080807 88 6/8/2026
0.5.3-alpha.202606110305 66 6/11/2026
0.5.2 121 6/11/2026
0.5.2-alpha.202605200417 61 5/20/2026
0.5.1 70 5/20/2026
0.5.1-alpha.202604241732 63 4/24/2026
0.5.0 74 4/24/2026
0.5.0-alpha.202604241029 65 4/24/2026