Brightspot CMS Developer Guide

Database Query

This tool allows you to query single, aggregated, or multiple SQL and Solr databases. Using the UI controls, set your query parameters and click Run. To filter results, enter a predicate and click Filter.

Dari Database Query tool.png
Dari Database Query tool

From the drop-down list, select the required content type. Referring to the previous illustration, the selected content type is Author.

Using the controls on the right, choose the database to query and the sort order of results. You can include additional fields using a comma-separated list in the text box. The example above includes the email and lastName fields.

In the ID or Predicate field, you can provide a specific object ID or enter predicate values using standard operators. Below are a few examples.
title matches "This is the" title ^= "This" title = "This is the Title"

Also, you can query relationships using the field/subfield path notation. In the following example, the query searches for Article objects referencing an Image with a caption field set to This is the caption.

image/caption matches "This is the caption"

In the Results pane, click a result to view object details in JSON format. You can edit an object using the Edit Raw tab.

Viewing object in JSON format.png
Viewing object in JSON format

Previous Topic
Database bulk operations
Next Topic
Database SQL Query
Was this topic helpful?
Thanks for your feedback.