> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# filter_by_box

### filter\_by\_box

<ul>
  <li>
    filter\_by\_box(\
    &#x20;table\_name: string,\
    &#x20;view\_name: string | undefined,\
    &#x20;x\_column\_name: string,\
    &#x20;min\_x: number,\
    &#x20;max\_x: number,\
    &#x20;y\_column\_name: string,\
    &#x20;min\_y: number,\
    &#x20;max\_y: number,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterByBoxResponse.md)>

    Calculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set which satisfies the input NAI restriction specification is also created when a `view_name` is passed in as part of the input payload.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of the table on which the bounding box operation will be performed, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table.
      </li>

      <li>
        view\_name: string | undefined

        If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.
      </li>

      <li>
        x\_column\_name: string

        Name of the column on which to perform the bounding box query. Must be a valid numeric column.
      </li>

      <li>
        min\_x: number

        Lower bound for the column chosen by `x_column_name`. Must be less than or equal to `max_x`.
      </li>

      <li>
        max\_x: number

        Upper bound for `x_column_name`. Must be greater than or equal to `min_x`.
      </li>

      <li>
        y\_column\_name: string

        Name of a column on which to perform the bounding box query. Must be a valid numeric column.
      </li>

      <li>
        min\_y: number

        Lower bound for `y_column_name`. Must be less than or equal to `max_y`.
      </li>

      <li>
        max\_y: number

        Upper bound for `y_column_name`. Must be greater than or equal to `min_y`.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterByBoxResponse.md)>

    Promise\<Types.FilterByBoxResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:9364](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L9364)</li>
    </ul>
  </li>
</ul>

### filter\_by\_box\_request

<ul>
  <li>
    filter\_by\_box\_request(\
    &#x20;request: [FilterByBoxRequest](https://docs.kinetica.com/content/api/javascript/interfaces/FilterByBoxRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterByBoxResponse.md)>

    Calculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set which satisfies the input NAI restriction specification is also created when a `view_name` is passed in as part of the input payload.

    #### Parameters

    <ul>
      <li>
        request: [FilterByBoxRequest](https://docs.kinetica.com/content/api/javascript/interfaces/FilterByBoxRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[FilterByBoxResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterByBoxResponse.md)>

    Promise\<Types.FilterByBoxResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:9322](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L9322)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.