예제 #1
0
 /// <summary>
 /// Converts the specified SQL expression tree builder to SQL text.
 /// </summary>
 /// <typeparam name="T">
 /// The type of SQL statement the SQL expression tree builder creates.
 /// </typeparam>
 /// <param name="sql">
 /// An expression tree builder representing a SQL statement.
 /// </param>
 /// <param name="parameterCallback">
 /// A delegate that is called when a SQL parameter is encountered while converting the SQL expression.
 /// </param>
 /// <returns>
 /// The SQL text for the specified SQL expression tree builder.
 /// </returns>
 public static string ToSql <T>(this ISqlGo <T> sql, Action <SqlParameter> parameterCallback)
     where T : SqlStatement
 {
     return(sql.ToSql(null, parameterCallback));
 }
예제 #2
0
 /// <summary>
 /// Converts the specified SQL expression tree builder to SQL text.
 /// </summary>
 /// <typeparam name="T">
 /// The type of SQL statement the SQL expression tree builder creates.
 /// </typeparam>
 /// <param name="sql">
 /// An expression tree builder representing a SQL statement.
 /// </param>
 /// <param name="dialect">
 /// The <see cref="SqlDialect"/> used to format the SQL text.
 /// </param>
 /// <returns>
 /// The SQL text for the specified SQL expression tree builder.
 /// </returns>
 public static string ToSql <T>(this ISqlGo <T> sql, SqlDialect dialect)
     where T : SqlStatement
 {
     return(sql.ToSql(dialect, null));
 }
예제 #3
0
 /// <summary>
 /// Converts the specified SQL expression tree builder to SQL text.
 /// </summary>
 /// <typeparam name="T">
 /// The type of SQL statement the SQL expression tree builder creates.
 /// </typeparam>
 /// <param name="sql">
 /// An expression tree builder representing a SQL statement.
 /// </param>
 /// <returns>
 /// The SQL text for the specified SQL expression tree builder.
 /// </returns>
 public static string ToSql <T>(this ISqlGo <T> sql)
     where T : SqlStatement
 {
     return(sql.ToSql(null, null));
 }