Show / Hide Table of Contents

    Class OptionalFilterAttribute

    Base optional filter attribute

    Inheritance
    Object
    Attribute
    FilterBaseAttribute
    FilterAttribute
    OptionalFilterAttribute
    LinkAttribute
    SubqueryFilterAttribute
    Inherited Members
    FilterAttribute.Source
    FilterAttribute.FieldName
    FilterAttribute.Operation
    FilterAttribute.Combination
    FilterBaseAttribute.FilterType
    Attribute.Equals(Object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, Boolean)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, Boolean)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, Boolean)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, Boolean)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, Boolean)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, Boolean)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, Boolean)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, Boolean)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, Boolean)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Boolean)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, Boolean)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, Boolean)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, Boolean)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, Boolean)
    Attribute.Match(Object)
    Attribute.TypeId
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: XData.Mapping
    Assembly: XData.docfx.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public abstract class OptionalFilterAttribute : FilterAttribute
    Remarks

    Optional filters can be used to conditionally omit parts of query

    If filter marked by PrimaryFilter = true has no value assigned - it cause omit it primary source from query

    If link marked by PrimaryFilter = true has one of sources omitted - it cause omit other source from query two

    If base source BaseSource is omitted - all entire query is omitted

    Hint: It can be used to build conditional sub queries or inner views

    For example:

    -- if filterBySomeField has PrimaryFilter flag = true, query...
    select ot.one_table_id, ot.name from one_table ot where ot.one_table_id in (select st.one_table_id from second_table st where st.some_field = :filterBySomeField)
    -- when filterBySomeField has no value assigned will be transformed into... 
    select one_table_id, name from one_table
    -- bat have a full form when filterBySomeField value is assigned

    Constructors

    | Improve this Doc View Source

    OptionalFilterAttribute(String, String)

    Base optional filter attribute

    Declaration
    protected OptionalFilterAttribute(string sourceAlias, string fieldName)
    Parameters
    Type Name Description
    String sourceAlias

    Primary source alias

    String fieldName

    Primary field name

    Properties

    | Improve this Doc View Source

    PrimaryFilter

    Primary filter flag

    Declaration
    public bool PrimaryFilter { get; set; }
    Property Value
    Type Description
    Boolean

    Extension Methods

    SerializationExtensions.ToXml<T>(T)
    CollectionsExtensions.SetValue<TKey, T>(TKey, T)
    CollectionsExtensions.AsEnum<T>(T)
    DataObjectQueryableExtensions.CompareVariable(Object, FilterOperation, String)
    Processing.Do<T>(T, Action<IProcess<T>>[])
    TypeExtensions.TryConvert<T, TResult>(T, Func<T, TResult>)
    TypeExtensions.TryConvert<T, TResult>(T, Func<T, TResult>, TResult)
    TypeExtensions.ChangeType<T>(Object)
    TypeExtensions.ChangeType(Object, Type)
    TypeExtensions.InvokeMethod<TRet>(Object, Type[], Expression<Func<TRet>>, BindingFlags)
    TypeExtensions.InvokeMethod(Object, Type[], Expression<Action>, BindingFlags)
    TypeExtensions.InvokeMethod<TRet>(Object, Expression<Func<TRet>>, BindingFlags)
    TypeExtensions.InvokeMethod(Object, Expression<Action>, BindingFlags)
    SqlBlockExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IBlockQueryAdapter, TResult>>)
    QueryDescriptionExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IQueryStructureAdapter, TResult>>)

    See Also

    LinkAttribute
    SubqueryLinkAttribute
    SubqueryFilterAttribute
    RuntimeFilter
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX