Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SQL Formatter tool #274

Merged
merged 5 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ DevToys helps in daily tasks like formatting JSON, comparing text, testing RegEx

Many tools are available.
- Converters
- Json <> Yaml
- JSON <> YAML
- Number Base
- Encoders / Decoders
- HTML
- URL
- Base64
- JWT Decoder
- Formatters
- Json
- JSON
- SQL
- Generators
- Hash (MD5, SHA1, SHA256, SHA512)
- UUID 1 and 4
Expand Down Expand Up @@ -96,7 +97,8 @@ Here is the list of tool name you can use:
- `hash` - Hash Generator
- `uuid` - UUID Generator
- `loremipsum` - Lorem Ipsum Generator
- `jsonformat` Json Formatter
- `sqlformat` - SQL Formatter
- `jsonformat` - Json Formatter
- `jsonyaml` - Json <> Yaml
- `jwt` - JWT Decoder
- `colorblind` - Color Blindness Simulator
Expand Down
28 changes: 27 additions & 1 deletion THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project incorporates components from the projects listed below. The origina
11. github-markdown-css (https://github.com/sindresorhus/github-markdown-css)
12. Efficient Compression Tool (https://github.com/fhanau/Efficient-Compression-Tool)
13. NLipsum (https://github.com/alexcpendleton/NLipsum)
14. SQL Formatter (https://github.com/zeroturnaround/sql-formatter)

Newtonsoft.Json NOTICES AND INFORMATION BEGIN HERE
=========================================
Expand Down Expand Up @@ -458,4 +459,29 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SQL Formatter NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)

Copyright (c) 2016-2020 ZeroTurnaround LLC
Copyright (c) 2020-present George Leslie-Waksman and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions src/dev/impl/DevToys/Assets/Icons/SqlFormatter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/dev/impl/DevToys/DevToys.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,32 @@
<Compile Include="Core\Threading\AsyncLazy.cs" />
<Compile Include="Helpers\ColorBlindnessSimulatorHelper.cs" />
<Compile Include="Helpers\NumberBaseHelper.cs" />
<Compile Include="Helpers\SqlFormatter\Core\Formatter.cs" />
<Compile Include="Helpers\SqlFormatter\Core\Indentation.cs" />
<Compile Include="Helpers\SqlFormatter\Core\InlineBlock.cs" />
<Compile Include="Helpers\SqlFormatter\Core\Params.cs" />
<Compile Include="Helpers\SqlFormatter\Core\RegexFactory.cs" />
<Compile Include="Helpers\SqlFormatter\Core\Token.cs" />
<Compile Include="Helpers\SqlFormatter\Core\Tokenizer.cs" />
<Compile Include="Helpers\SqlFormatter\Core\TokenType.cs" />
<Compile Include="Helpers\SqlFormatter\Core\TokenHelper.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\Db2Formatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\MariaDbFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\MySqlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\N1qlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\PlSqlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\PostgreSqlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\RedshiftFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\SparkSqlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\TSqlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\Languages\StandardSqlFormatter.cs" />
<Compile Include="Helpers\SqlFormatter\SqlFormatterHelper.cs" />
<Compile Include="Helpers\SqlFormatter\SqlFormatterOptions.cs" />
<Compile Include="Helpers\SqlFormatter\SqlLanguage.cs" />
<Compile Include="Messages\PinToolToStartMessage.cs" />
<Compile Include="Messages\OpenToolInNewWindowMessage.cs" />
<Compile Include="Messages\ChangeSelectedMenuItemMessage.cs" />
<Compile Include="Models\SqlLanguageDisplayPair.cs" />
<Compile Include="Models\NoResultFoundMockToolProvider.cs" />
<Compile Include="Models\Radix.cs" />
<Compile Include="Models\NumberBaseFormat.cs" />
Expand All @@ -51,6 +74,8 @@
<Compile Include="ViewModels\Tools\Converters\JsonYaml\DecimalJsonConverter.cs" />
<Compile Include="ViewModels\Tools\Converters\JsonYaml\DecimalYamlTypeResolver.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\EncodersDecodersGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\Formatters\SqlFormatter\SqlFormatterToolProvider.cs" />
<Compile Include="ViewModels\Tools\Formatters\SqlFormatter\SqlFormatterToolViewModel.cs" />
<Compile Include="ViewModels\Tools\Generators\GeneratorsGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\LoremIpsumGenerator\LoremIpsumGeneratorToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\LoremIpsumGenerator\LoremIpsumGeneratorToolViewModel.cs" />
Expand All @@ -74,6 +99,9 @@
<Compile Include="Views\Tools\EncodersDecoders\GZipEncoderDecoder\GZipEncoderDecoderToolPage.xaml.cs">
<DependentUpon>GZipEncoderDecoderToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\Formatters\SqlFormatter\SqlFormatterToolPage.xaml.cs">
<DependentUpon>SqlFormatterToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolPage.xaml.cs">
<DependentUpon>ColorBlindnessSimulatorToolPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -257,6 +285,7 @@
<Content Include="Assets\Icons\Base64.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Icons\SqlFormatter.svg" />
<Content Include="Assets\Icons\TextDiff.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -517,6 +546,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Tools\Formatters\SqlFormatter\SqlFormatterToolPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
Loading