Search Results for

    Show / Hide Table of Contents

    Class FilterableStatement<T, TTarget, TResult, TDoc>

    Abstract class for filterable statements.

    Inheritance
    System.Object
    BaseStatement<TResult, TDoc>
    TargetedBaseStatement<TTarget, TResult, TDoc>
    FilterableStatement<T, TTarget, TResult, TDoc>
    FindStatement<T>
    ModifyStatement<T>
    RemoveStatement<T>
    TableDeleteStatement
    TableSelectStatement
    TableUpdateStatement
    Namespace: MySqlX.XDevAPI.Common
    Assembly: MySql.Data.dll
    Version: 9.3.0
    Syntax
    public abstract class FilterableStatement<T, TTarget, TResult, TDoc> : TargetedBaseStatement<TTarget, TResult, TDoc> where T : FilterableStatement<T, TTarget, TResult, TDoc> where TTarget : DatabaseObject where TResult : BaseResult
    Type Parameters
    Name Description
    T

    The filterable statement.

    TTarget

    The database object.

    TResult

    The type of result.

    TDoc

    The type of the implemented object.

    Constructors

    FilterableStatement(TTarget, String)

    Initializes a new instance of the FiltarableStatement class based on the target and condition.

    Declaration
    public FilterableStatement(TTarget target, string condition = null)
    Parameters
    Type Name Description
    TTarget target

    The database object.

    System.String condition

    The optional filter condition.

    Methods

    Bind(DbDoc)

    Binds the parameter values in filter expression.

    Declaration
    public T Bind(DbDoc dbDocParams)
    Parameters
    Type Name Description
    DbDoc dbDocParams

    The parameters as a DbDoc object.

    Returns
    Type Description
    T

    A generic object representing the implementing statement type.

    Bind(Object)

    Binds the parameter values in filter expression.

    Declaration
    public T Bind(object jsonParams)
    Parameters
    Type Name Description
    System.Object jsonParams

    The parameters as an anonymous object: new { param1 = value1, param2 = value2, ... }.

    Returns
    Type Description
    T

    The implementing statement type.

    Bind(String)

    Binds the parameter values in filter expression.

    Declaration
    public T Bind(string jsonParams)
    Parameters
    Type Name Description
    System.String jsonParams

    The parameters as a JSON string.

    Returns
    Type Description
    T

    The implementing statement type.

    Bind(String, Object)

    Binds the parameter values in filter expression.

    Declaration
    public T Bind(string parameterName, object value)
    Parameters
    Type Name Description
    System.String parameterName

    The parameter name.

    System.Object value

    The value of the parameter.

    Returns
    Type Description
    T

    A generic object representing the implementing statement type.

    Clone()

    Clones the filterable data but Session and Target remain the same.

    Declaration
    public virtual T Clone()
    Returns
    Type Description
    T

    A clone of this filterable statement.

    Execute(Func<T, TResult>, T)

    Executes the statement.

    Declaration
    protected virtual TResult Execute(Func<T, TResult> executeFunc, T t)
    Parameters
    Type Name Description
    System.Func<T, TResult> executeFunc

    The function to execute.

    T t

    The generic object to use.

    Returns
    Type Description
    TResult

    A generic result object containing the results of the execution.

    Limit(Int64)

    Sets the number of items to be returned by the operation.

    Declaration
    public T Limit(long rows)
    Parameters
    Type Name Description
    System.Int64 rows

    The number of items to be returned.

    Returns
    Type Description
    T

    The implementing statement type.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    rows is equal or lower than 0.

    Offset(Int64)

    Sets the number of items to be skipped before including them into the result.

    Declaration
    public T Offset(long rows)
    Parameters
    Type Name Description
    System.Int64 rows

    The number of items to be skipped.

    Returns
    Type Description
    T

    The implementing statement type.

    Where(String)

    Enables the setting of Where condition for this operation.

    Declaration
    public T Where(string condition)
    Parameters
    Type Name Description
    System.String condition

    The Where condition.

    Returns
    Type Description
    T

    The implementing statement type.

    In This Article
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.