Querying Using Console
In this section you will learn how to query Clusterpoint database from the management console.
Log into management console
Open database you want to query
As example we will use database "world_population_2" we have created previously and inserted data into it:
You can find file we have uploaded to database "world_population" here.
Before querying you need to check Data model (database policy) for document elements. Learn more about policy rules in section "Database Data Model".
Choose "Run Query" button
Choose "Run Query" button in actions toolbar and you will get into query editor. Here you can execute Clusterpoint API commands against any of your databases:
The default command is "SELECT", so we will try to query the database for certain values.
You can enter SELECT query in command editor and press "Run query". You can open several tabs and execute different commands in each of them.
As example, we defined SELECT query to search for documents where "Country" value is "USA" and we limited our result set to first five matches:
SELECT City_Urban_area, Country, Population, Land_area, Density FROM world_population_2 WHERE Country == "USA" LIMIT 5
Please take a note, that query composed in the management console can be passed as a content to SELECT command through REST API.
All other available commands could be executed in a similar way as SELECT by using query editor.
After request is executed, you can view matching documents below JS/SQL query editor:
Review results in the table
All matching results are listed below the query.
Our search request matches 26 documents (are shown only 5, because we have limited them):
Commands available through UI console
You can SELECT, UPDATE, INSERT, DELETE, REPLACE documents within command console. Learn more about Data manipulation here.
As example we inserted new document in our collection "world_population_2" by using INSERT command: