Skip to content

DbQueryFormats class

Represents different formats of SQL statements.

public class Korzh.EasyQuery.Db.DbQueryFormats
: QueryFormats
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
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.
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
voidCopyFrom(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.
voidLoadFromJsonDict(JsonDict dict)Loads DbQueryFormats from the IDictionary<string, object> object. Used for deserialization from JSON
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
voidSaveNodes(XmlWriter writer)Saves Korzh.EasyQuery.Db.DbQueryFormats object to XML writer.
voidSaveToJsonDict(JsonDict dict)Saves DbQueryFormats to IDictionary<string, object> object. Used for serialization to JSON
voidSetDefaultFormats(FormatType formatType)Sets the default formats for different types of databases.
TypeNameDescription
DbQueryFormatsDefaultGets the default set of formats.