Class Argument
The Argument class. Inherit QueryElement as part of a Visitor Pattern
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public abstract class Argument : QueryElement, ICloneable
Constructors
Argument(FieldDataType, int)
Initializes a new instance of the Argument class.
Declaration
public Argument(FieldDataType dataType, int size)
Parameters
Type | Name | Description |
---|---|---|
FieldDataType | dataType | Type of the data. |
int | size | The size. |
Properties
Alias
Get/Set values for Alias
Declaration
public Alias Alias { get; set; }
Property Value
Type | Description |
---|---|
Alias |
DataType
Get/Set values for DataType
Declaration
public FieldDataType DataType { get; set; }
Property Value
Type | Description |
---|---|
FieldDataType |
Size
The Argument class. Inherit QueryElement as part of a Visitor Pattern
Declaration
public virtual int Size { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Between(Argument, Argument)
returns a new instance of the Between operator, based on the arguments provided.
Declaration
public Between Between(Argument min, Argument max)
Parameters
Type | Name | Description |
---|---|---|
Argument | min | Minimum value |
Argument | max | Maximum value |
Returns
Type | Description |
---|---|
Between | a new instance of the Between operator, based on the argument provided. |
Equal(Argument)
returns a new instance of the Equal operator, based on the argument provided.
Declaration
public Equal Equal(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
Equal | a new instance of the Equal operator, based on the argument provided |
GetMainField()
Information about a database field.
Declaration
public abstract FieldInfo GetMainField()
Returns
Type | Description |
---|---|
FieldInfo | Information about the database field |
GetSubElements()
Part of visitor pattern defined in abstract class QueryElement
Declaration
protected override QueryElement[] GetSubElements()
Returns
Type | Description |
---|---|
QueryElement[] |
Overrides
GreaterThan(Argument)
returns a new instance of the GreaterThan operator, based on the argument provided.
Declaration
public GreaterThan GreaterThan(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
GreaterThan | a new instance of the GreaterThan operator, based on the argument provided |
GreaterThanOrEqual(Argument)
returns a new instance of the GreaterThanOrEqual operator, based on the argument provided.
Declaration
public GreaterThanOrEqual GreaterThanOrEqual(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
GreaterThanOrEqual | a new instance of the GreaterThanOrEqual operator, based on the argument provided |
HasAll(params Argument[])
returns a new instance of the HasAll(params Argument[]) operator, based on the argument array provided.
Declaration
public HasAll HasAll(params Argument[] arg)
Parameters
Type | Name | Description |
---|---|---|
Argument[] | arg | The argument array |
Returns
Type | Description |
---|---|
HasAll | a new instance of the Between operator, based on the argument array provided. |
HasAny(params Argument[])
returns a new instance of the HasAny(params Argument[]) operator, based on the argument array provided.
Declaration
public HasAny HasAny(params Argument[] arg)
Parameters
Type | Name | Description |
---|---|---|
Argument[] | arg | The argument array |
Returns
Type | Description |
---|---|
HasAny | a new instance of the Between operator, based on the argument array provided. |
In(params Argument[])
returns a new instance of the In operator, based on the argument array provided.
Declaration
public In In(params Argument[] arg)
Parameters
Type | Name | Description |
---|---|---|
Argument[] | arg | The argument array |
Returns
Type | Description |
---|---|
In | a new instance of the Between operator, based on the argument array provided. |
IsNotNull()
returns a new instance of the IsNotNull operator, that determines whether this instance is not null.
Declaration
public IsNotNull IsNotNull()
Returns
Type | Description |
---|---|
IsNotNull | a new instance of the IsNotNull operator. |
IsNull()
returns a new instance of the IsNull operator, that determines whether this instance is null.
Declaration
public IsNull IsNull()
Returns
Type | Description |
---|---|
IsNull | a new instance of the IsNull operator. |
LessThan(Argument)
returns a new instance of the LessThan operator, based on the argument provided.
Declaration
public LessThan LessThan(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
LessThan | a new instance of the LessThan operator, based on the argument provided |
LessThanOrEqual(Argument)
returns a new instance of the LessThan operator, based on the argument provided.
Declaration
public LessThanOrEqual LessThanOrEqual(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
LessThanOrEqual | a new instance of the LessThanOrEqual operator, based on the argument provided |
Like(Argument)
returns a new instance of the Like operator, based on the argument provided.
Declaration
public Like Like(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
Like | a new instance of the Like operator, based on the argument provided |
Like(string)
returns a new instance of the Like operator, based on the argument provided.
Declaration
public Like Like(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value |
Returns
Type | Description |
---|---|
Like | a new instance of the Like operator, based on the argument provided |
MissingAll(params Argument[])
returns a new instance of the MissingAll(params Argument[]) operator, based on the argument array provided.
Declaration
public MissingAll MissingAll(params Argument[] arg)
Parameters
Type | Name | Description |
---|---|---|
Argument[] | arg | The argument array |
Returns
Type | Description |
---|---|
MissingAll | a new instance of the Between operator, based on the argument array provided. |
MissingAny(params Argument[])
returns a new instance of the MissingAny(params Argument[]) operator, based on the argument array provided.
Declaration
public MissingAny MissingAny(params Argument[] arg)
Parameters
Type | Name | Description |
---|---|---|
Argument[] | arg | The argument array |
Returns
Type | Description |
---|---|
MissingAny | a new instance of the Between operator, based on the argument array provided. |
NotBetween(Argument, Argument)
returns a new instance of the NotBetween operator, based on the arguments provided.
Declaration
public NotBetween NotBetween(Argument min, Argument max)
Parameters
Type | Name | Description |
---|---|---|
Argument | min | Minimum value |
Argument | max | Maximum value |
Returns
Type | Description |
---|---|
NotBetween | a new instance of the NotBetween operator, based on the argument provided. |
NotIn(params Argument[])
returns a new instance of the NotIn operator, based on the argument array provided.
Declaration
public NotIn NotIn(params Argument[] arg)
Parameters
Type | Name | Description |
---|---|---|
Argument[] | arg | The argument array |
Returns
Type | Description |
---|---|
NotIn | a new instance of the NotIn operator, based on the argument array provided. |
NotLike(Argument)
returns a new instance of the NotLike operator, based on the argument provided.
Declaration
public NotLike NotLike(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | string value |
Returns
Type | Description |
---|---|
NotLike | a new instance of the NotLike operator, based on the argument provided |
ToArgumentArray<T>(T[])
Helper function that returns an SuperOffice.Data.SQL.Argument array from an array of items
Declaration
public static Argument[] ToArgumentArray<T>(T[] ids)
Parameters
Type | Name | Description |
---|---|---|
T[] | ids | Array of items |
Returns
Type | Description |
---|---|
Argument[] | Argument array with items |
Type Parameters
Name | Description |
---|---|
T |
ToArgumentArray<T>(T[], bool)
Helper function that returns an SuperOffice.Data.SQL.Argument array from an array of items
Declaration
public static Argument[] ToArgumentArray<T>(T[] ids, bool useSqlParameters)
Parameters
Type | Name | Description |
---|---|---|
T[] | ids | Array of items |
bool | useSqlParameters | If false, the query will not add sql parameters for these arguments |
Returns
Type | Description |
---|---|
Argument[] | Argument array with items |
Type Parameters
Name | Description |
---|---|
T |
UnEqual(Argument)
returns a new instance of the UnEqual operator, based on the argument provided.
Declaration
public UnEqual UnEqual(Argument argument)
Parameters
Type | Name | Description |
---|---|---|
Argument | argument | The argument. |
Returns
Type | Description |
---|---|
UnEqual | a new instance of the UnEqual operator, based on the argument provided |