File tree Expand file tree Collapse file tree 3 files changed +13
-112
lines changed
Expand file tree Collapse file tree 3 files changed +13
-112
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ Advanced QL
1010
1111Topics on advanced uses of QL. These topics assume that you are familiar with QL and the basics of query writing.
1212
13- - :doc: `Semantics of abstract classes <abstract-classes >`
1413- :doc: `Choosing appropriate ways to constrain types <constraining-types >`
1514- :doc: `Determining the most specific types of a variable <determining-specific-types-variables >`
1615- :doc: `Monotonic aggregates in QL <monotonic-aggregates >`
Original file line number Diff line number Diff line change @@ -208,7 +208,9 @@ by declaring them in the ``from`` part.
208208You can also annotate predicates and fields. See the list of :ref: `annotations <annotations-overview >`
209209that are available.
210210
211- Kinds of classes
211+ .. _concrete-classes :
212+
213+ Concrete classes
212214================
213215
214216The classes in the above examples are all **concrete ** classes. They are defined by
@@ -218,6 +220,9 @@ values in the intersection of the base types that also satisfy the
218220
219221.. _abstract-classes :
220222
223+ Abstract classes
224+ ================
225+
221226A class :ref: `annotated <abstract >` with ``abstract ``, known as an **abstract ** class, is also a restriction of
222227the values in a larger type. However, an abstract class is defined as the union of its
223228subclasses. In particular, for a value to be in an abstract class, it must satisfy the
@@ -247,6 +252,13 @@ The abstract class ``SqlExpr`` refers to all of those different expressions. If
247252support for another database system later on, you can simply add a new subclass to ``SqlExpr ``;
248253there is no need to update the queries that rely on it.
249254
255+ .. pull-quote :: Important
256+
257+
258+ You must take care when you add a new subclass to an existing abstract class. Adding a subclass
259+ is not an isolated change, it also extends the abstract class since that is a union of its
260+ subclasses.
261+
250262.. _overriding-member-predicates :
251263
252264Overriding member predicates
You can’t perform that action at this time.
0 commit comments