Class SqlTranslator<T>
Represents the Sql Translator for translating a IQuery object to Sql
Inheritance
object
Namespace: Umbraco.Cms.Infrastructure.Persistence.Querying
Assembly: Umbraco.Infrastructure.dll
Syntax
public class SqlTranslator<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
View SourceSqlTranslator(Sql<ISqlContext>, IQuery<T>?)
Initializes a new instance of the SqlTranslator<T> class.
Declaration
public SqlTranslator(Sql<ISqlContext> sql, IQuery<T>? query)
Parameters
| Type | Name | Description |
|---|---|---|
| Sql<ISqlContext> | sql | The SQL context used for building and translating the query. |
| IQuery<T> | query | The query object to be translated into SQL. |
Methods
View SourceToString()
Returns the SQL query string represented by this translator.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The SQL query string. |
Translate()
Returns the underlying NPoco.Sql<> object representing the translated SQL statement for the query.
Declaration
public Sql<ISqlContext> Translate()
Returns
| Type | Description |
|---|---|
| Sql<ISqlContext> | The NPoco.Sql<> representing the translated SQL statement. |