<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CKToolJS",
  "identifier" : "/documentation/CKToolJS/CKDBQuery",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "CKTool JS"
    ],
    "preciseIdentifier" : "struct/CKDBQuery"
  },
  "title" : "CKDBQuery"
}
-->

# CKDBQuery

An object that represents a query for searching records.

```
dictionary CKDBQuery {
	string recordType;
	CKDBQueryFilter[]? filters;
	CKDBQuerySort[]? sorts;
};
```

## Overview

In JavaScript, this is a plain object with properties as described.

In TypeScript, this type is imported in the following way:

```javascript
import type { CKDBQuery } from "@apple/cktool.database";
```

## Topics

### Instance Properties

[`attribute CKDBQueryFilter[]? filters;`](/documentation/CKToolJS/CKDBQuery/filters)

The array of filters used to determine whether a record matches the query.

[`attribute string recordType;`](/documentation/CKToolJS/CKDBQuery/recordType)

The record type to perform this query on.

[`attribute CKDBQuerySort[]? sorts;`](/documentation/CKToolJS/CKDBQuery/sorts)

The array of sort descriptors that specify how to order the fetched records.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)