DbQueryFormats class

Represents different formats of SQL statements.

public class Korzh.EasyQuery.Db.DbQueryFormats
    : QueryFormats, IQueryFormats

Fields

Type Name Description
Int32 SubQueryLevel Indicates the level of sub-query for the query we are generating currently. Default value is 0 which means we generate the main query.

Properties

Type Name Description
Boolean BracketJoins Gets or sets a value indicating whether Korzh.EasyQuery must bracket joins in result SQL statement.
String DefaultSchemaName Gets or sets the name of the default schema.
FormatType FormatType Gets or sets the format type.
Boolean GroupByCalcColumns Gets or sets a value indicating whether SQL generator should use calculated columns "as is" in GROUP BY clause
Char IdentQuote1 Gets or sets the left quote symbol for identifiers (double-quote by default).
Char IdentQuote2 Gets or sets the right quote symbol for identifiers (double-quote by default).
String LimitClauseTemplate Gets or sets template clause for pagination (default value depends on database).
String ParameterPrefix Gets or sets the prefix symbol which precedes the parameter names in generated SQL statement. Usually it's '@' symbol but for some databases it must be set to ':'
Boolean PrefixUnicodeConsts Gets or sets a value indicating whether SQL generator should add 'N' prefix before string constants with Unicode characters
String RecordCountAlias Gets or sets the alias for Total Records column. This option works only if RecordCountTemplate is not empty
String RecordCountTemplate Gets or sets template clause for count records (default value depends on database).
Char SqlQuote1 Gets or sets the left quote symbol (double-quote by default).
Char SqlQuote2 Gets or sets the right quote symbol (double-quote by default).
SqlSyntax SqlSyntax Gets or sets the type of SQL syntax.
Boolean SupportRightJoin Gets or sets a value indicating wether DB supports RIGHT JOINs.
Boolean UseAsInFrom Gets or sets a value indicating whether we must add AS conjuction between table name and alias in the FROM clause.
Boolean UseDbName Gets or sets a value indicating whether Korzh.EasyQuery will add database name into table names in result SQL statememnt.
Boolean UseEntityContainerName Gets or sets a value indicating whether SQL generator should use entity container name for table definitions in FROM clause
Boolean UseSchema Gets or sets a value indicating whether Korzh.EasyQuery will use schema in result SQL statememnt.
Boolean UseTableAlias Gets or sets a value indicating whether we will use table aliases in generated queries.

Methods

Type Name Description
void CopyFromCore(QueryFormats source) Copies all formats from some Korzh.EasyQuery.Db.DbQueryFormats object.
Boolean Equals(Object obj) Determines whether the specified System.Object is equal to this instance.
Int32 GetHashCode() Returns a hash code for this instance.
void LoadNode(String nodeName, String nodeValue) Loads the root node of the Korzh.EasyQuery.Db.DbQueryFormats object.
String QuoteIdentifier(String ident) Returns the string passed in paraters wrapped with IdentQuote1 and IdentQuote2 symbols
void ReadOnePropFromJson(JsonReader reader, String propName) Loads a property of QueryFormats.
Task ReadOnePropFromJsonAsync(JsonReader reader, String propName) Loads a property of QueryFormats (asynchronous way).
void SaveNodes(XmlWriter writer) Saves Korzh.EasyQuery.Db.DbQueryFormats object to XML writer.
void SetDefaultFormats(FormatType formatType) Sets the default formats for different types of databases.
void WriteContentToJson(JsonWriter writer) Saves the properties of QueryFormats to JSON.
Task WriteContentToJsonAsync(JsonWriter writer) Saves the properties of QueryFormats to JSON (asynchronous way).

Static Properties

Type Name Description
DbQueryFormats Default Gets the default set of formats.