Class PHCCmdSql
- Namespace
- PHCBusinessLayer
- Assembly
- PHCBusinessLayer.dll
public class PHCCmdSql : DBCmdSelect, IBaseSerialization, ICloneVO, ICloneable, IQueryFilters, ISelectedItens, ISDKContextAwareness
- Inheritance
-
PHCCmdSql
Constructors
PHCCmdSql()
PHCCmdSql(ContextVO)
public PHCCmdSql(ContextVO contextItem)
Parameters
PHCCmdSql(QueryVO)
public PHCCmdSql(QueryVO itemQuery)
Parameters
| Nome |
Tipo |
Descrição |
itemQuery |
QueryVO |
|
PHCCmdSql(DBTarget)
public PHCCmdSql(DBTarget target)
Parameters
PHCCmdSql(bool)
public PHCCmdSql(bool readOnlyConnection)
Parameters
| Nome |
Tipo |
Descrição |
readOnlyConnection |
bool |
|
PHCCmdSql(string)
public PHCCmdSql(string tableName)
Parameters
| Nome |
Tipo |
Descrição |
tableName |
string |
|
PHCCmdSql(string, DBTarget)
public PHCCmdSql(string tableName, DBTarget target)
Parameters
PHCCmdSql(string, string)
public PHCCmdSql(string tableName, string connectionString)
Parameters
| Nome |
Tipo |
Descrição |
tableName |
string |
|
connectionString |
string |
|
Fields
FilterItemVar
public const string FilterItemVar = "<#var>"
Field Value
- string
_context
protected ContextVO _context
Field Value
- ContextVO
Properties
ApplyFiltersOnInitialization
This property should only be true if the query is executed with
a plain text string and the phccmdsql is instantiated with a QueryVO
public bool ApplyFiltersOnInitialization { get; set; }
Property Value
- bool
CallFromBackEnd
When this class is executed from QueryVO the property must be False
public bool CallFromBackEnd { get; set; }
Property Value
- bool
ConnectionString
public string ConnectionString { get; set; }
Property Value
- string
FilterCod
public string FilterCod { get; set; }
Property Value
- string
Ndoc
public int Ndoc { get; set; }
Property Value
- int
TableTarget
public DBTarget TableTarget { get; }
Property Value
- DBTarget
UseReadOnlyConnection
public bool UseReadOnlyConnection { get; set; }
Property Value
- bool
Methods
Add(PHCCmdSql)
public void Add(PHCCmdSql itemQuery)
Parameters
Add(QueryVO)
public void Add(QueryVO itemQuery)
Parameters
| Nome |
Tipo |
Descrição |
itemQuery |
QueryVO |
|
CheckQuery()
Clone()
Returns
- PHCCmdSql
Clone<T>(T)
public T Clone<T>(T cloneItem) where T : PHCCmdSql
Parameters
| Nome |
Tipo |
Descrição |
cloneItem |
T |
|
Returns
- T
Type Parameters
T
ExistRecord(FilterItem)
public bool ExistRecord(FilterItem filter)
Parameters
Returns
- bool
ExistRecord(FilterItems)
public bool ExistRecord(FilterItems filter)
Parameters
Returns
- bool
GetCmdSql(string)
Returns an sql command that respect user and application filters.
public static PHCCmdSql GetCmdSql(string tablename)
Parameters
| Nome |
Tipo |
Descrição |
tablename |
string |
|
Returns
- PHCCmdSql
GetCmdSql(string, ContextVO)
Returns an sql command that does not respect a context
public static PHCCmdSql GetCmdSql(string tablename, ContextVO contextItem)
Parameters
Returns
- PHCCmdSql
GetNumRecords(FilterItem)
public int GetNumRecords(FilterItem filter)
Parameters
Returns
- int
GetNumRecords(FilterItems)
public int GetNumRecords(FilterItems filter)
Parameters
Returns
- int
GetRawCmdSql(string)
Returns an sql command that does not respect user or application filters.
public static PHCCmdSql GetRawCmdSql(string tablename)
Parameters
| Nome |
Tipo |
Descrição |
tablename |
string |
|
Returns
- PHCCmdSql
GetValue<T>(string, FilterItem)
public T GetValue<T>(string field, FilterItem filter)
Parameters
Returns
- T
Type Parameters
T
GetValue<T>(string, FilterItem, Aggregate)
public T GetValue<T>(string field, FilterItem filter, Aggregate AggregateType)
Parameters
Returns
- T
Type Parameters
T
GetValue<T>(string, FilterItems)
public T GetValue<T>(string field, FilterItems filter)
Parameters
Returns
- T
Type Parameters
T
GetValue<T>(string, FilterItems, Aggregate)
public T GetValue<T>(string field, FilterItems filter, Aggregate AggregateType)
Parameters
Returns
- T
Type Parameters
T
IsCmdEmpty()
Returns
- bool
OnApplyFilter()
public override void OnApplyFilter()
OnApplyOrder()
public override void OnApplyOrder()
OnApplySelect()
public override void OnApplySelect()
QueryAbstract(string)
public List<object> QueryAbstract(string tsql)
Parameters
| Nome |
Tipo |
Descrição |
tsql |
string |
|
Returns
- List<object>
QueryByIdStamp<T>(string)
public T QueryByIdStamp<T>(string IdStamp)
Parameters
| Nome |
Tipo |
Descrição |
IdStamp |
string |
|
Returns
- T
Type Parameters
T
Query<T>(FilterItem)
public List<T> Query<T>(FilterItem filter)
Parameters
Returns
- List<T>
Type Parameters
T
Query<T>(FilterItems)
public List<T> Query<T>(FilterItems filter)
Parameters
Returns
- List<T>
Type Parameters
T
Query<T>(string)
public List<T> Query<T>(string tsql)
Parameters
| Nome |
Tipo |
Descrição |
tsql |
string |
|
Returns
- List<T>
Type Parameters
T
SetConnection()
public override void SetConnection()
ValidateFilter(VOStructure, FilterItem)
public void ValidateFilter(VOStructure structureItem, FilterItem filter)
Parameters
Explicit Interface Implementations
Context
ContextVO Context { get; set; }
Returns
- ContextVO
GetDefaultContext()
virtual ContextVO GetDefaultContext()
Returns
- ContextVO
HaveContext()
To not run the lazyloading on context property
Returns
- bool