Skip to content

DbQueryFormats class

Represents different formats of SQL statements.

public class Korzh.EasyQuery.Db.DbQueryFormats
: QueryFormats, IQueryFormats
TypeNameDescription
Int32SubQueryLevelIndicates the level of sub-query for the query we are generating currently. Default value is 0 which means we generate the main query.
TypeNameDescription
BooleanBracketJoinsGets or sets a value indicating whether Korzh.EasyQuery must bracket joins in result SQL statement.
StringDefaultSchemaNameGets or sets the name of the default schema.
FormatTypeFormatTypeGets or sets the format type.
BooleanGroupByCalcColumnsGets or sets a value indicating whether SQL generator should use calculated columns “as is” in GROUP BY clause
CharIdentQuote1Gets or sets the left quote symbol for identifiers (double-quote by default).
CharIdentQuote2Gets or sets the right quote symbol for identifiers (double-quote by default).
StringLimitClauseTemplateGets or sets template clause for pagination (default value depends on database).
StringParameterPrefixGets 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 ’:‘
BooleanPrefixUnicodeConstsGets or sets a value indicating whether SQL generator should add ‘N’ prefix before string constants with Unicode characters
StringRecordCountAliasGets or sets the alias for Total Records column. This option works only if RecordCountTemplate is not empty
StringRecordCountTemplateGets or sets template clause for count records (default value depends on database).
CharSqlQuote1Gets or sets the left quote symbol (double-quote by default).
CharSqlQuote2Gets or sets the right quote symbol (double-quote by default).
SqlSyntaxSqlSyntaxGets or sets the type of SQL syntax.
BooleanSupportRightJoinGets or sets a value indicating wether DB supports RIGHT JOINs.
BooleanUseAsInFromGets or sets a value indicating whether we must add AS conjuction between table name and alias in the FROM clause.
BooleanUseDbNameGets or sets a value indicating whether Korzh.EasyQuery will add database name into table names in result SQL statememnt.
BooleanUseEntityContainerNameGets or sets a value indicating whether SQL generator should use entity container name for table definitions in FROM clause
BooleanUseSchemaGets or sets a value indicating whether Korzh.EasyQuery will use schema in result SQL statememnt.
BooleanUseTableAliasGets or sets a value indicating whether we will use table aliases in generated queries.
TypeNameDescription
voidCopyFromCore(QueryFormats source)Copies all formats from some Korzh.EasyQuery.Db.DbQueryFormats object.
BooleanEquals(Object obj)Determines whether the specified System.Object is equal to this instance.
Int32GetHashCode()Returns a hash code for this instance.
voidLoadNode(String nodeName, String nodeValue)Loads the root node of the Korzh.EasyQuery.Db.DbQueryFormats object.
StringQuoteIdentifier(String ident)Returns the string passed in paraters wrapped with IdentQuote1 and IdentQuote2 symbols
voidReadOnePropFromJson(JsonReader reader, String propName)Loads a property of QueryFormats.
TaskReadOnePropFromJsonAsync(JsonReader reader, String propName)Loads a property of QueryFormats (asynchronous way).
voidSaveNodes(XmlWriter writer)Saves Korzh.EasyQuery.Db.DbQueryFormats object to XML writer.
voidSetDefaultFormats(FormatType formatType)Sets the default formats for different types of databases.
voidWriteContentToJson(JsonWriter writer)Saves the properties of QueryFormats to JSON.
TaskWriteContentToJsonAsync(JsonWriter writer)Saves the properties of QueryFormats to JSON (asynchronous way).
TypeNameDescription
DbQueryFormatsDefaultGets the default set of formats.