Class InsertUpdateDeleteArgsSelector
Specifications for Selectors. Can take the form of null (specifies that primary key should be searched under), string (specifies a column name that should be searched under), or object (specifies arbitrary search conditions)
Inherited Members
Namespace: Quantellia.WMServer.Asset.DataSource
Assembly: WMServer.dll
Syntax
public class InsertUpdateDeleteArgsSelector
Properties
Column
The column argument is typically a column name used for comparison, otherwise can be a value, or another node.
Declaration
public object? Column { get; set; }
Property Value
Type | Description |
---|---|
object |
ColumnType
Declaration
public InsertUpdateDeleteArgsSelector.OperandType ColumnType { get; set; }
Property Value
Type | Description |
---|---|
InsertUpdateDeleteArgsSelector.OperandType |
Operation
The operation that is being performed.
Declaration
public InsertUpdateDeleteArgsSelector.OperationType Operation { get; set; }
Property Value
Type | Description |
---|---|
InsertUpdateDeleteArgsSelector.OperationType |
StringValue
If this Selector is a string, this is its value.
Declaration
public string? StringValue { get; set; }
Property Value
Type | Description |
---|---|
string |
Type
The type of this Selector object.
Declaration
public InsertUpdateDeleteArgsSelector.SelectorType Type { get; set; }
Property Value
Type | Description |
---|---|
InsertUpdateDeleteArgsSelector.SelectorType |
Value
The value argument is typically a parameterized value, otherwise can be a column, or another node.
Declaration
public object? Value { get; set; }
Property Value
Type | Description |
---|---|
object |
ValueType
Declaration
public InsertUpdateDeleteArgsSelector.OperandType ValueType { get; set; }
Property Value
Type | Description |
---|---|
InsertUpdateDeleteArgsSelector.OperandType |
Where
Whether this select should use a WHERE clause.
Declaration
public bool Where { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Convert(object)
Takes in a JSON object representation of a selector. Converts the object according to InsertUpdateDeleteArgsSelector.SelectorType.
Declaration
public static InsertUpdateDeleteArgsSelector Convert(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Object with values according to InsertUpdateDeleteArgsSelector.SelectorType |
Returns
Type | Description |
---|---|
InsertUpdateDeleteArgsSelector |
GetSQLString(List<string>, List<string>, out Dictionary<string, object>, bool)
Recursively convert this object into its SQL string representation. This may need to be moved into WMSQLServerDataSource.
Declaration
public string GetSQLString(List<string> validColumns, List<string> existingParameters, out Dictionary<string, object> newParameters, bool startString = true)
Parameters
Type | Name | Description |
---|---|---|
List<string> | validColumns | A list of column names that are allowed to be used. |
List<string> | existingParameters | A listing of existing parameter names to prevent collision when adding new ones. |
Dictionary<string, object> | newParameters | A listing of new parameters that will need to be assigned to the data writer to complete this SQL query. |
bool | startString | Whether this is the first invocation of this SQLString. This should be true only on the primary node of a select object, so that there is only one WHERE at the start. |
Returns
Type | Description |
---|---|
string |
Remarks
A slight redesign will be required when IN TABLE support is added. The table will need to be validated, alongside all of the columns, etc... in the Select's WHERE clause.