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
10
10
11
11
Topics on advanced uses of QL. These topics assume that you are familiar with QL and the basics of query writing.
12
12
13
- - :doc: `Semantics of abstract classes <abstract-classes >`
14
13
- :doc: `Choosing appropriate ways to constrain types <constraining-types >`
15
14
- :doc: `Determining the most specific types of a variable <determining-specific-types-variables >`
16
15
- :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.
208
208
You can also annotate predicates and fields. See the list of :ref: `annotations <annotations-overview >`
209
209
that are available.
210
210
211
- Kinds of classes
211
+ .. _concrete-classes :
212
+
213
+ Concrete classes
212
214
================
213
215
214
216
The 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
218
220
219
221
.. _abstract-classes :
220
222
223
+ Abstract classes
224
+ ================
225
+
221
226
A class :ref: `annotated <abstract >` with ``abstract ``, known as an **abstract ** class, is also a restriction of
222
227
the values in a larger type. However, an abstract class is defined as the union of its
223
228
subclasses. 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
247
252
support for another database system later on, you can simply add a new subclass to ``SqlExpr ``;
248
253
there is no need to update the queries that rely on it.
249
254
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
+
250
262
.. _overriding-member-predicates :
251
263
252
264
Overriding member predicates
You can’t perform that action at this time.
0 commit comments