Show / Hide Table of Contents

Class Argument

The Argument class. Inherit QueryElement as part of a Visitor Pattern

Inheritance
Object
QueryElement
Argument
Aggregation
ArgumentFunction
DatabaseFunctions
FieldInfo
MathematicalExpression
Parameter
ResultModification
Implements
ICloneable
Inherited Members
QueryElement.Clone()
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public abstract class Argument : QueryElement, ICloneable

Constructors

Argument(FieldDataType, Int32)

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.

Int32 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

Declaration
public virtual int Size { get; set; }
Property Value
Type Description
Int32

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
QueryElement.GetSubElements()

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(Argument[])

returns a new instance of the HasAll(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(Argument[])

returns a new instance of the HasAny(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(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(Argument[])

returns a new instance of the MissingAll(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(Argument[])

returns a new instance of the MissingAny(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(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[], Boolean)

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

Boolean 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

Implements

System.ICloneable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top