Class SelectCommandBuilder
Represents select command builder.
Implements
Inherited Members
Namespace: Mediachase.BusinessFoundation.Data.Sql
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 12.17.2Syntax
public class SelectCommandBuilder : SqlCommandBuilder, IDisposable
Constructors
SelectCommandBuilder()
Initializes a new instance of the SelectCommandBuilder class.
Declaration
public SelectCommandBuilder()
SelectCommandBuilder(TableConfig)
Initializes a new instance of the SelectCommandBuilder class.
Declaration
public SelectCommandBuilder(TableConfig config)
Parameters
Type | Name | Description |
---|---|---|
TableConfig | config | The config. |
SelectCommandBuilder(TableConfig, FilterElementCollection, SortingElementCollection)
Initializes a new instance of the SelectCommandBuilder class.
Declaration
public SelectCommandBuilder(TableConfig config, FilterElementCollection filters, SortingElementCollection sorting)
Parameters
Type | Name | Description |
---|---|---|
TableConfig | config | The config. |
FilterElementCollection | filters | The filters. |
SortingElementCollection | sorting | The sorting. |
SelectCommandBuilder(String)
Initializes a new instance of the SelectCommandBuilder class.
Declaration
public SelectCommandBuilder(string tableName)
Parameters
Type | Name | Description |
---|---|---|
System.String | tableName | Name of the table. |
SelectCommandBuilder(String, FilterElementCollection, SortingElementCollection)
Initializes a new instance of the SelectCommandBuilder class.
Declaration
public SelectCommandBuilder(string tableName, FilterElementCollection filters, SortingElementCollection sorting)
Parameters
Type | Name | Description |
---|---|---|
System.String | tableName | Name of the table. |
FilterElementCollection | filters | The filters. |
SortingElementCollection | sorting | The sorting. |
Properties
CustomSelectedField
Gets or sets the custom select.
Declaration
public string CustomSelectedField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The custom select. |
Filters
Gets the filters.
Declaration
public FilterElementCollection Filters { get; set; }
Property Value
Type | Description |
---|---|
FilterElementCollection | The filters. |
InnerBuilder
Gets the inner builder.
Declaration
protected StringBuilder InnerBuilder { get; }
Property Value
Type | Description |
---|---|
System.Text.StringBuilder | The inner builder. |
MaxCount
Gets or sets the max count.
Declaration
public int MaxCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The max count. |
RecordsToRetrive
Gets or sets the number of records to retrieve.
Declaration
public int RecordsToRetrive { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Sorting
Gets the sorting.
Declaration
public SortingElementCollection Sorting { get; set; }
Property Value
Type | Description |
---|---|
SortingElementCollection | The sorting. |
StartIndex
Gets or sets the start index.
Declaration
public int StartIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Clear()
Clears this instance.
Declaration
public override void Clear()
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
GetFilterElementString(FilterElement)
Writes the filter element.
Declaration
public static string GetFilterElementString(FilterElement element)
Parameters
Type | Name | Description |
---|---|---|
FilterElement | element | The element. |
Returns
Type | Description |
---|---|
System.String |
GetSourceInfo(String, out String, out String)
Gets the source info.
Declaration
public void GetSourceInfo(string sourceName, out string columnName, out string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceName | Name of the source. |
System.String | columnName | Name of the column. |
System.String | alias | The alias. |
GetTableAlias(String, Relationship)
Gets the table alias.
Declaration
public string GetTableAlias(string prefix, Relationship relationship)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | The prefix. |
Relationship | relationship | The relationship. |
Returns
Type | Description |
---|---|
System.String |
GetTableAlias(String, String)
Gets the table alias.
Declaration
public string GetTableAlias(string prefix, string tableName)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | The table prefix. |
System.String | tableName | Name of the table. |
Returns
Type | Description |
---|---|
System.String |
WriteFilterElement(FilterElement)
Converts the filter element to SQL string.
Declaration
protected virtual void WriteFilterElement(FilterElement element)
Parameters
Type | Name | Description |
---|---|---|
FilterElement | element | The element. |
WriteFilterElementCollection(FilterElementCollection, String)
Converts the filter elements to SQL string.
Declaration
protected virtual void WriteFilterElementCollection(FilterElementCollection filters, string separator)
Parameters
Type | Name | Description |
---|---|---|
FilterElementCollection | filters | The filters. |
System.String | separator | The separator. |
WriteFilterElementValue(FilterElement)
Values to SQL string.
Declaration
protected virtual void WriteFilterElementValue(FilterElement element)
Parameters
Type | Name | Description |
---|---|---|
FilterElement | element | The element. |
WriteQuery()
Creates the query.
Declaration
protected override void WriteQuery()
Overrides
WriteSortingElementCollection()
Wrires the sorting element collection.
Declaration
protected virtual void WriteSortingElementCollection()
WriteWhereElement()
Creates the where element.
Declaration
protected virtual void WriteWhereElement()
Events
CreatedFromSection
Declaration
public static event EventHandler CreatedFromSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatedOrderSection
Declaration
public static event EventHandler CreatedOrderSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatedSelectSection
Declaration
public static event EventHandler CreatedSelectSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatedWhereSection
Declaration
public static event EventHandler CreatedWhereSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatingFromSection
Declaration
public static event EventHandler CreatingFromSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatingOrderSection
Declaration
public static event EventHandler CreatingOrderSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatingSelectSection
Declaration
public static event EventHandler CreatingSelectSection
Event Type
Type | Description |
---|---|
System.EventHandler |
CreatingWhereSection
Declaration
public static event EventHandler CreatingWhereSection
Event Type
Type | Description |
---|---|
System.EventHandler |
WritingQuery
Declaration
public static event EventHandler WritingQuery
Event Type
Type | Description |
---|---|
System.EventHandler |
WroteQuery
Declaration
public static event EventHandler WroteQuery
Event Type
Type | Description |
---|---|
System.EventHandler |