Skip to content

dalenewman/Transformalize.Transform.PoorMansTSqlFormatter

Repository files navigation

This adds a formatsql method to Transformalize using Poor Man's T-SQL Formatter. It is a plug-in for Transformalize.

Build the Autofac project and put it's output into Transformalize's plugins folder.

Use like this:

<cfg name="Test">
    <connections>
        <add name="input" provider="internal" />
        <add name="output" provider="console" />
    </connections>
    <entities>
        <add name="Test">
            <rows>
                <add id="1" input-sql="select * from customers where name = 'google';" />
            </rows>
            <fields>
                <add name="id" type="int" />
                <add name="input-sql" length="4000" />
            </fields>
            <calculated-fields>
                <add name="output-sql" length="4000" t="copy(input-sql).formatsql()" />
            </calculated-fields>
        </add>
    </entities>
</cfg>

This produces:

SELECT *
FROM customers
WHERE NAME = 'google';

About

Adds a formatsql transform to Transformalize

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published