public class ArrayColumn<dataType> : TypedColumnBase<dataType[]>,
ICanBeTranslatedToByteArray
Public Class ArrayColumn(Of dataType)
Inherits TypedColumnBase(Of dataType())
Implements ICanBeTranslatedToByteArraytype ArrayColumn<'dataType> =
class
inherit TypedColumnBase<'dataType[]>
interface ICanBeTranslatedToByteArray
endusing System;
using System.Collections.Generic;
using System.Text;
using Firefly.Box.Data.Advanced;
using NUnit.Framework;
using Firefly.Box;
using Firefly.Box.Testing;
namespace TestFirefly.Box.Documentation
{
[TestFixture]
public class WhereUsage
{
[Test]
public void SimpleWhere()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var bp = new BusinessProcess
{
From = employees
};
bp.Where.Add(employees.JobLevel.IsEqualTo(150));
bp.Run();
bp.Counter.ShouldBe(3);
}
[Test]
public void AddingTwoFiltersBehavesAsAndWould()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var bp = new BusinessProcess
{
From = employees
};
bp.Where.Add(employees.JobLevel.IsEqualTo(150));
bp.Where.Add(employees.JobId.IsLessThan(9));
bp.Run();
bp.Counter.ShouldBe(1);
}
[Test]
public void UsingAndAndOr()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var bp = new BusinessProcess
{
From = employees
};
bp.Where.Add(employees.JobLevel.IsEqualTo(150).And(
employees.JobId.IsLessThan(9).Or(
employees.MiddleInitial.IsEqualTo("C"))));
bp.Run();
bp.Counter.ShouldBe(2);
}
[Test]
public void SendingDirectStringToTheDB()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var bp = new BusinessProcess
{
From = employees
};
bp.Where.Add("{0} in ({1},{2},{3})",employees.MiddleInitial, "M", "R", "A");
bp.Run();
bp.Counter.ShouldBe(9);
}
[Test]
public void UsingCustomInMemoryFilter()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var bp = new BusinessProcess
{
From = employees
};
//This has a slight performance penalty as this condition is evaluated in memory, and not by the database
bp.Where.Add(() => employees.MiddleInitial == "M" || employees.MiddleInitial == "R" || employees.MiddleInitial == "A");
bp.Run();
bp.Counter.ShouldBe(9);
}
[Test]
public void UsingAPreDefinedFilter()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var bp = new BusinessProcess
{
From = employees
};
FilterCollection filter = new FilterCollection();
filter.Add(employees.JobLevel.IsEqualTo(150));
filter.Add(employees.JobId.IsLessThan(9));
bp.Where.Add(filter);
bp.Run();
bp.Counter.ShouldBe(1);
}
}
}| ArrayColumndataType(TypedColumnBasedataType) | Initializes a new instance of the ArrayColumndataType class |
| ArrayColumndataType(TypedColumnBasedataType, String) | Initializes a new instance of the ArrayColumndataType class |
| __RecomputePath | (Inherited from ColumnBase) |
| AfterExpandGoToNextControl |
Returns an Boolean that represents additional settings for the Expand event
(Inherited from ColumnBase) |
| AllowNull |
Gets or sets whether this column allows null values in it's Value property
(Inherited from TypedColumnBasedataType) |
| Caption | Gets or sets the ColumnBase's caption (Inherited from ColumnBase) |
| DbReadOnly |
Determines if this column is only read from the database but not saved to it.
(Inherited from ColumnBase) |
| DefaultValue | (Inherited from TypedColumnBasedataType) |
| DisplayName | (Inherited from ColumnBase) |
| Entity |
Gets the Entity to which this column is bound.
(Inherited from ColumnBase) |
| ExcludeFromDbWhere | (Inherited from ColumnBase) |
| Format | To be completed (Inherited from TypedColumnBasedataType) |
| FormatInfo |
Used to provide additional info on the specified Format (Inherited from ColumnBase) |
| InputRange |
Get or sets this column's input range.
(Inherited from ColumnBase) |
| Length | |
| Name | Gets or sets the ColumnBase's name (Inherited from ColumnBase) |
| NullDisplayText |
Gets or sets the text that will be displayed if this column's Value is null.
(Inherited from ColumnBase) |
| OnChangeMarkRowAsChanged |
Determines if the UIController.RowChanged property will be set, when this column is changed.
(Inherited from ColumnBase) |
| OriginalValue | (Inherited from TypedColumnBasedataType) |
| Storage | (Inherited from TypedColumnBasedataType) |
| Value | (Inherited from TypedColumnBasedataType) |
| WasSet | (Inherited from ColumnBase) |
| _fromByteArray | |
| AdjustGetValue | (Inherited from TypedColumnBasedataType) |
| AdjustSetValue | (Inherited from TypedColumnBasedataType) |
| AreEqualOrdinal | (Inherited from TypedColumnBasedataType) |
| BindValue(FuncdataType) |
Binds the value of this column to the specified expression
(Inherited from TypedColumnBasedataType) |
| BindValue(TypedColumnBasedataType) | (Inherited from TypedColumnBasedataType) |
| BindValueToColumnChange |
Sets an expression that will be used for the value of this column
(Inherited from TypedColumnBasedataType) |
| CanYouBeQueried | (Inherited from ColumnBase) |
| Cast | (Overrides TypedColumnBasedataTypeCast(Object)) |
| Compare | (Inherited from TypedColumnBasedataType) |
| CompareValueFromDbWithFilterValue | (Inherited from TypedColumnBasedataType) |
| DbAreEqual | (Inherited from TypedColumnBasedataType) |
| DbValueStartsWithFilterValue | (Inherited from TypedColumnBasedataType) |
| Equals | (Inherited from TypedColumnBasedataType) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| ForceIncrementalSearchWhenCurrentValueMeetsCriteria | (Inherited from TypedColumnBasedataType) |
| GetHashCode | (Inherited from TypedColumnBasedataType) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| GetValueFromDB | (Inherited from TypedColumnBasedataType) |
| IsBetween(FuncdataType, dataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(FuncdataType, TypedColumnBasedataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(FuncdataType, FuncdataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(dataType, dataType) | (Inherited from TypedColumnBasedataType) |
| IsBetween(dataType, TypedColumnBasedataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(dataType, FuncdataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(TypedColumnBasedataType, dataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(TypedColumnBasedataType, TypedColumnBasedataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsBetween(TypedColumnBasedataType, FuncdataType) | Creates a filter that represents a between relation between this column and the values specified (Inherited from TypedColumnBasedataType) |
| IsDifferentFrom(FuncdataType) | (Inherited from TypedColumnBasedataType) |
| IsDifferentFrom(dataType) | (Inherited from TypedColumnBasedataType) |
| IsDifferentFrom(TypedColumnBasedataType) | (Inherited from TypedColumnBasedataType) |
| IsEqualTo(FuncdataType) | Creates a filter that represents the is equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsEqualTo(dataType) | Creates a filter that represents the is equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsEqualTo(TypedColumnBasedataType) | Creates a filter that represents the is equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsGreaterOrEqualTo(FuncdataType) | Creates a filter that represents the is greater or equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsGreaterOrEqualTo(dataType) | Creates a filter that represents the is greater or equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsGreaterOrEqualTo(TypedColumnBasedataType) | Creates a filter that represents the is greater or equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsGreaterThan(FuncdataType) | Creates a filter that represents the is greater than relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsGreaterThan(dataType) | Creates a filter that represents the is greater than relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsGreaterThan(TypedColumnBasedataType) | Creates a filter that represents the is greater than relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsLessOrEqualTo(FuncdataType) | Creates a filter that represents the is less or equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsLessOrEqualTo(dataType) | Creates a filter that represents the is less or equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsLessOrEqualTo(TypedColumnBasedataType) | Creates a filter that represents the is less or equal to relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsLessThan(FuncdataType) | Creates a filter that represents the is less than relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsLessThan(dataType) | Creates a filter that represents the is less than relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsLessThan(TypedColumnBasedataType) | Creates a filter that represents the is less than relation between this column and the value specified (Inherited from TypedColumnBasedataType) |
| IsNull | (Inherited from TypedColumnBasedataType) |
| LoadFrom | (Inherited from TypedColumnBasedataType) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| OnFormatChanged | (Inherited from TypedColumnBasedataType) |
| Parse | (Inherited from TypedColumnBasedataType) |
| ProcessUserInput | (Inherited from TypedColumnBasedataType) |
| ResetToDefaultValue | (Inherited from TypedColumnBasedataType) |
| SaveYourValueToDb | (Inherited from TypedColumnBasedataType) |
| ToByteArray | |
| ToString | (Inherited from TypedColumnBasedataType) |
| ToString(String) | (Inherited from TypedColumnBasedataType) |
| ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. (Inherited from ColumnBase) |
| TrySetValue |
| Expand |
Occurs when the user parks on a control that is bound to this column and invokes the ExpandCommand (Inherited from ColumnBase) |
| ValueChanged |
Occurs when the Value of this column changes
(Inherited from TypedColumnBasedataType) |
| ShouldBedataType | (Defined by Should) |