ComponentOne Query 8.0
Managing Query Extensions

The ApplyExtensions property allows the developer to control how C1Query engine manages extensions: situations where, in order to complete a query, it is necessary to add some views to the query in addition to the views selected by the end user. Possible extensions can be specified in the schema, and there is also so called autoextension, applied by C1Query automatically, if allowed. For details, see Extensions in Using the Schema Designer.

Possible values of the ApplyExtensions property are:

c1qExtensionsDisabled = 0

Don’t use any extensions, don’t add any views unless explicitly selected by the user.

c1qExtensionsEnabled = 1

Use extensions specified in the schema. This setting gives the developer full control over extensions, makes this process completely deterministic.

c1qAutoExtensionsRestricted= 2

(Default) Use schema extensions, and if they are not enough, use autoextension, that is, add any views that are necessary to the query, but the main view (the one to which all other views are joined) must be explicitly selected by the user. This setting is preferable in most cases. It allows C1Query to complete queries for the user, but does not allow query completion when participating views appear unrelated.

c1qAutoExtensionsUnrestricted= 3

Use schema extensions, and if they are not enough, use autoextension, that is, add any views that are necessary to the query, without restrictions. This setting gives C1Query full discretion over the extension process. All user queries will be completed, but some can produce unexpected results, because C1Query can add views to the query that the end user did not have in mind.

For example, the following queries issued against the standard sample database NWIND.MDB (seeTutorial 2 - Using C1Query Schema Designer), will succeed or fail (with error message “Selected fields are unrelated, cannot generate a valid query”) depending on the value of the ApplyExtensions property:

Customers.City = ‘London’ and OrderDetails.Discount > 0

Customers.City = ‘London’ and Categories.CategoryName = ‘Condiments’

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback