# Filtering

## Generics

<mark style="color:green;">`<T>`</mark> represents the object's shape coming from the data source.

<mark style="color:green;">`<R>`</mark> represents the column data type: <mark style="color:green;">`string`</mark>, <mark style="color:green;">`number`</mark>, <mark style="color:green;">`Date`</mark>, or <mark style="color:green;">`boolean`</mark>.

<mark style="color:green;">`<V>`</mark> represents the filter values.

## DikeFilter

```typescript
interface DikeFilter {
  logicalOperator: LogicalOperator,
  condition: string,
}
```

## DikeTextFilter

```typescript
interface DikeTextFilter extends DikeFilter {
  value?: string
}
```

## DikeTextCaseFilter

```typescript
interface DikeTextCaseFilter extends DikeTextFilter {
  caseSensitive: boolean
}
```

## DikeNumericFilter

```typescript
interface DikeNumericFilter extends DikeFilter {
  value1?: number,
  value2?: number
}
```

## DikeDateFilter

```typescript
interface DikeDateFilter extends DikeFilter {
  value1?: Date,
  value2?: Date
}
```

## DikeBinaryFilter

```typescript
interface DikeBinaryFilter extends DikeFilter {
  value?: string
}
```

## DikeFilterable\<T>

```typescript
interface DikeFilterable<T extends object> {
  columnId: string,
  dataType: DikeColumnDataType,
  fieldName: string,
  headerText: string,

  caseSensitive?: boolean,
  filter?: DikeFilter[],
  customFilterConditions?: CustomFilterConditionInstance<T>
}
```

## Condition\<T, R, V>

```typescript
interface Condition<T extends object, R extends string | number | Date | boolean, V> {
  text: string,
  value: string,
  eval: (entry: T, dataColumnDef?: DikeDataColumnDef<T, R>, values?: V) => boolean;
}
```

## DikeSelectionModel

```typescript
interface DikeSelectionModel {
  label: string,
  selected?: boolean
}
```

## DikeBinarySelectionModel

```typescript
interface DikeBinarySelectionModel extends DikeSelectionModel {
  value: string
}
```

## DikeNumericSelectionModel

```typescript
interface DikeNumericSelectionModel extends DikeSelectionModel {
  value: number
}
```

## DikeTextSelectionModel

```typescript
interface DikeTextSelectionModel extends DikeSelectionModel {
  value: string
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dikesoft.com/reference/interfaces/filtering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
