public Sql92QueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default, SqlDialect sqlDialect = null, SqlDataTypeProvider sqlDataTypeProvider = null, TypeDescriptorProvider typeDescriptorProvider = null) : base(sqlDialect, new StringWriter(new StringBuilder())) { this.options = options; this.typeDescriptorProvider = typeDescriptorProvider; this.sqlDataTypeProvider = sqlDataTypeProvider ?? new DefaultSqlDataTypeProvider(new ConstraintDefaultsConfiguration()); this.stringQuote = this.sqlDialect.GetSyntaxSymbolString(SqlSyntaxSymbol.StringQuote); this.identifierQuoteString = this.sqlDialect.GetSyntaxSymbolString(SqlSyntaxSymbol.IdentifierQuote); }
public Sql92QueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default, SqlDialect sqlDialect = null, SqlDataTypeProvider sqlDataTypeProvider = null) : base(sqlDialect, new StringWriter(new StringBuilder())) { this.options = options; if (sqlDataTypeProvider == null) { this.sqlDataTypeProvider = new DefaultSqlDataTypeProvider(ConstraintDefaults.Default); } else { this.sqlDataTypeProvider = sqlDataTypeProvider; } this.stringQuote = this.sqlDialect.GetSyntaxSymbolString(SqlSyntaxSymbol.StringQuote); this.identifierQuoteString = this.sqlDialect.GetSyntaxSymbolString(SqlSyntaxSymbol.IdentifierQuote); }
public Sql92QueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default, SqlDialect sqlDialect = null, SqlDataTypeProvider sqlDataTypeProvider = null) : base(sqlDialect, new StringWriter(new StringBuilder())) { this.options = options; if (sqlDataTypeProvider == null) { this.sqlDataTypeProvider = new DefaultSqlDataTypeProvider(ConstraintDefaults.Default); } else { this.sqlDataTypeProvider = sqlDataTypeProvider; } this.stringQuote = this.sqlDialect.GetSyntaxSymbolString(SqlSyntaxSymbol.StringQuote); this.identifierQuoteString = this.sqlDialect.GetSyntaxSymbolString(SqlSyntaxSymbol.IdentifierQuote); }
public PostgresSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider, string schemaName, bool convertEnumsToText) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider) { this.schemaName = schemaName; this.ConvertEnumsToText = convertEnumsToText; }
protected override Expression VisitConstantPlaceholder(SqlConstantPlaceholderExpression constantPlaceholderExpression) { if ((this.options & SqlQueryFormatterOptions.EvaluateConstantPlaceholders) != 0) { var startIndex = this.parameterValues.Count; var savedOptions = this.options; // Never optimise-out null constant placeholders this.options &= ~SqlQueryFormatterOptions.OptimiseOutConstantNulls; var retval = base.VisitConstantPlaceholder(constantPlaceholderExpression); this.options = savedOptions; var endIndex = this.parameterValues.Count; if (endIndex - startIndex == 1 && canReuse) { var index = startIndex; parameterIndexToPlaceholderIndexes.Add(new Pair<int, int>(index, constantPlaceholderExpression.Index)); } return retval; } else { this.WriteFormat("$${0}", constantPlaceholderExpression.Index); return constantPlaceholderExpression; } }
public SqliteSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider) : base(options, sqlDialect, sqlDataTypeProvider) { }
public PostgresSharedSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, string schemaName) : base(options, sqlDialect, sqlDataTypeProvider) { this.schemaName = schemaName; }
public abstract SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default);
public SqlServerSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider) : base(options, sqlDialect, sqlDataTypeProvider) { }
public virtual SqlQueryFormatResult Format(Expression expression, SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default, IDbConnection connection = null) { return(this.CreateQueryFormatter(options, connection).Format(expression)); }
public abstract SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default, IDbConnection connection = null);
public MySqlSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider, bool silentlyIgnoreIndexConditions) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider) { this.silentlyIgnoreIndexConditions = silentlyIgnoreIndexConditions; }
public Sql92QueryFormatter(SqlQueryFormatterOptions options) : this(options, null, null) { }
public SqliteSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider) { }
public PostgresDotConnectSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider, string schemaName, bool convertEnumsToText) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider, schemaName, convertEnumsToText) { }
public SqlServerSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider, SqlServerSqlDatabaseContextInfo contextInfo, string serverVersion) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider) { this.contextInfo = contextInfo; this.majorVersion = serverVersion == null ? null : (int?)Convert.ToInt32(serverVersion.Split('.')[0]); }
public override SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default, IDbConnection connection = null) { return(this.ConstructorMethod(options, connection)); }
public SqlServerSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider) { }
public override SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default) { return(this.ConstructorMethod(options, this.SqlDialect, this.SqlDataTypeProvider)); }
public override SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default) { return this.ConstructorMethod(options, this.SqlDialect, this.SqlDataTypeProvider); }
public PostgresSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider, string schemaName, bool convertEnumsToText) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider) { this.schemaName = schemaName; this.ConvertEnumsToText = convertEnumsToText; }
public PostgresSharedSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, string schemaName) : base(options, sqlDialect, sqlDataTypeProvider) { this.schemaName = schemaName; }
public virtual SqlQueryFormatResult Format(Expression expression, SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default) { return(this.CreateQueryFormatter(options).Format(expression)); }
public abstract SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default);
public PostgresDotConnectSqlQueryFormatter(SqlQueryFormatterOptions options, SqlDialect sqlDialect, SqlDataTypeProvider sqlDataTypeProvider, TypeDescriptorProvider typeDescriptorProvider, string schemaName, bool convertEnumsToText) : base(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider, schemaName, convertEnumsToText) { }
public virtual SqlQueryFormatResult Format(Expression expression, SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default) { return this.CreateQueryFormatter(options).Format(expression); }
public override SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default) { return(this.ConstructorMethod(options)); }
public override SqlQueryFormatter CreateQueryFormatter(SqlQueryFormatterOptions options = SqlQueryFormatterOptions.Default) { return this.ConstructorMethod(options); }