Gets or sets a value indicating whether to include a line break before GROUP BY
clauses in the formatted SQL result.
public bool NewLineBeforeGroupByClause { get; set; }
public:
property bool NewLineBeforeGroupByClause
{
bool get()
void set(bool value)
}
true to include a line break before GROUP BY
clauses; otherwise, false.
using Leadtools.Dicom;
using Leadtools.Dicom.Common;
using Leadtools.Dicom.Common.Extensions;
using Leadtools;
using Leadtools.Dicom.Common.Linq.BasicDirectory;
using Leadtools.Dicom.Common.DataTypes;
using Leadtools.Codecs;
public static void FormatSqlExample()
{
// unformatted SQL
string sql =
$"SELECT Patient.PatientID FROM Instance " +
$"INNER " +
$"JOIN Series on Instance.SeriesInstanceUID " +
$"= Series.SeriesInstanceUID INNER JOIN Study on Series.StudyInstanceUID = " +
$"Study.StudyInstanceUID INNER JOIN Patient on Study.PatientID = Patient.PatientID WHERE " +
$"Patient.PatientID Like '%1%' ORDER BY PatientID";
Formatters.FormatSqlOptions options = new Formatters.FormatSqlOptions();
options.NewLineBeforeFromClause = true;
options.NewLineBeforeGroupByClause = true;
options.NewLineBeforeHavingClause = true;
options.NewLineBeforeJoinClause = true;
options.NewLineBeforeOrderByClause = true;
options.NewLineBeforeWhereClause = true;
string formattedSql = Formatters.FormatSql(sql, options);
// This is the result:
//
// SELECT Patient.PatientID
// FROM Instance
// INNER JOIN Series on Instance.SeriesInstanceUID = Series.SeriesInstanceUID
// INNER JOIN Study on Series.StudyInstanceUID = Study.StudyInstanceUID
// INNER JOIN Patient on Study.PatientID = Patient.PatientID
// WHERE Patient.PatientID Like '%1%'
// ORDER BY PatientID
Console.WriteLine(formattedSql);
}
Leadtools.Dicom.Common.Extensions Namespace
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.