Chapter 5. Making The Right Selections

Table of Contents

Why Discuss Selections?
Avoiding Placeholder Models
Avoiding Duplicate and Alternative Sets
Understanding Link Relations
Illustrating How Link Relations Work
Coding For Link Relations
About Preference Exclusions
Fetching The Preference Exclusions Information
Using The Preference Exclusions

Why Discuss Selections?

In the last few chapters we've taken a look at how you use the WACS API and SQL commands in your code in unison to build an application using WACS. As we've gone along, we've introduced you to some of the commonly used database fields from the various schemas that form the core of the WACS environment. While there are many fields, all of which are documented in the schema reference section towards the end of this guide, there are a few that have implicit uses that you should be aware of before you start building applications in earnest.

In this chapter, we're going to look a several short code segments that should be added to the SQL queries you form to use WACS within your own programs. These code segments ensure that you don't accidentally show records that you shouldn't, have large numbers of duplicate records or fail to support some of the standard WACS facilities. All that we will discuss here are things you can choose to leave out if you know you're not going to use the related facility but in general you do need to be aware of them and it's generally good practice to support them.

We are going to be looking at three main areas of concern - hiding model records marked as Placeholders, hiding set records marked as Secondary, Tertiary and Continuation records and supporting the preference exclusions mechanism whereby certain types of sets are not shown to people who don't want to see them.

[Note]Note

Placeholder model records and preference exclusions are longstanding WACS concepts; Secondary and Continuation sets were introduced in Wacs 0.9.0 and that code is not applicable to earlier releases. Tertiary sets are new in Wacs 1.0.0 as a way of suppressing display of archived content. Adding support for Secondary and Continuation sets requires presence of the database Schema introduced in WACS 0.8.5; using an older schema than that will cause SQL errors.