xledger / Xledger.Sql

MIT License
1 stars 1 forks source link

Xledger.Sql

NuGet version (Xledger.Sql)

Xledger.Sql provides tools for analyzing and transforming Transact SQL queries. This is provided in 3 main pieces:

  1. Xledger.Sql.ScopedFragmentTransformer: a TSqlFragment visitor that tracks the scope of visits to ease context-aware rewrites.
  2. Xledger.Sql.Extensions: providing a ReplaceScalar extension method to replace one scalar in its parent with a new scalar - without having to know exactly where in the parent the old scalar was present.
  3. Xledger.Sql.ImmutableDom: an immutable version of Microsoft.SqlServer.TransactSql.ScriptDom to enable caching parts of a SQL DOM or structural comparison of them.

The tests in Xledger.Sql.Test demonstrate how to use this library.

Running the Tests

dotnet test Xledger.Sql.Test

To list the available tests:

dotnet test Xledger.Sql.Test --list-tests