Along with the exciting new features in the core RavenDb database, we’ve been hard at work improving RavenDb Studio, the management UI for RavenDb. Over the next few days, I want to share with you some of the major enhancements.
Death to paging!
Almost the very first thing we did when we started work on the Studio for 1.2 was to kill the paging interface for document lists. And hammer nails in its coffin. Please give a big round of applause as we introduce … scrollbars!
That’s right: scrollbars that let you scroll through your entire collection of documents, all 2,147,483,647 of them. Don’t be alarmed, you db admin types: the Studio is doing the right thing and paging in documents only as you scroll to them (and paging out documents you’ve scrolled past, so they don’t clog up memory).
Digging into the Document Details
By popular request, we’ve also added a details view as an alternative to the existing card view. Click the Document View Style button in the top right corner of any documents list and you can toggle between card view and details view (which ever setting you choose is remembered between sessions).
Which columns get shown in details view? Well, naturally the Studio allows you to choose for yourself which columns you want to see. Or you can let the Studio choose for you.
Pick your own Columns
To choose your own columns, right click on one of the column headers and click the Choose Columns menu item. You’ll see a dialog where you can choose the columns you’d like:
When you click in the Binding column to add a new Column, the Studio will help you out by showing a list of all the properties (and nested properties) in the visible documents:
Notice that you can bind to document meta-data too!
Automatic Column Selection
To save you having to pick columns yourself for each set of documents you view, the Studio has a special IntelliPickNot TM feature. It will inspect the properties of documents currently scrolled into view, and do its best to pick a sensible set of columns. And as you scroll, and different types of documents come into view, it will automatically update the column set.
How does it choose columns? Good question. Let me check the
documentation source code…
Basically it picks the top 6 most commonly occurring properties in the current set of documents. But it will give certain properties a boost in importance making them more likely to be picked. The Studio has a built in list of property names that it will look for. So any property that includes the words “Name”, “Title” “Description”, or “Status” will be prioritised. You can customise this list of priority columns for a database by creating a document in that database called “Raven/Studio/PriorityColumns”, like this:
PropertyNamePattern is interpreted as a Regular Expression so you can get quite sophisticated in properties you want to boost.
The IntelliPick algorithm has one more trick up its sleeve. Have a look at this screenshot:
Do you see it? If you include particular properties in a query, or as a Sort By option, those properties will get boosted in importance. In the example shown, Artist.Name is part of the query, and results are sorted by Genre.Name, so both these properties are picked out to appear as columns. Similarly, when viewing results for a particular index, any properties that are included in the Index name will also be given a boost in priority.