Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Back out the previous change. We are instead going to modify the code to match the documentation. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e16ada80d643aa072ae0ce0daf8c3538 |
User & Date: | drh 2019-08-05 20:39:24.741 |
Context
2019-08-07
| ||
21:59 | Fix typo in comment. (check-in: b0c5406903 user: mistachkin tags: trunk) | |
2019-08-05
| ||
20:39 | Back out the previous change. We are instead going to modify the code to match the documentation. (check-in: 3578d6c47b user: drh tags: branch-3.29) | |
20:39 | Back out the previous change. We are instead going to modify the code to match the documentation. (check-in: e16ada80d6 user: drh tags: trunk) | |
12:54 | Update the documentation on the affinity of the columns of VIEWs and subqueries that are generated from expressions to match the actual implementation of 10 years standing - namely such columns have BLOB affinity, not no affinity. Ticket https://www.sqlite.org/src/info/d52a29a9e6bc55c5 (check-in: 07b7749da8 user: drh tags: trunk) | |
Changes
Changes to pages/datatype3.in.
︙ | ︙ | |||
312 313 314 315 316 317 318 | <li><p>^Otherwise, an expression has no affinity. </ul> <tcl>hd_fragment affview {rules for determining column affinity in VIEWs}</tcl> <h2>Column Affinity For Views And Subqueries</h2> | | > | | | | | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | <li><p>^Otherwise, an expression has no affinity. </ul> <tcl>hd_fragment affview {rules for determining column affinity in VIEWs}</tcl> <h2>Column Affinity For Views And Subqueries</h2> <p>The "columns" of a [VIEW] or FROM-clause subquery are really the expressions in the result set of the [SELECT] statement that implements the VIEW or subquery. Thus, the affinity for columns of a VIEW or subquery are determined by the expression affinity rules above. Consider an example: <blockquote><pre> CREATE TABLE t1(a INT, b TEXT, c REAL); CREATE VIEW v1(x,y,z) AS SELECT b, a+c, 42 FROM t1 WHERE b!=11; </pre></blockquote> <p>The affinity of the v1.x column will be the same as the affinity of t1.b (TEXT), since v1.x maps directly into t1.b. But columns v1.y and v1.z both have no affinity, since those columns map into expression a+c and 42, and expressions always have no affinity. <p>When the [SELECT] statement that implements a [VIEW] or FROM-clause subquery is a [compound SELECT] then the affinity of each supposed column of the VIEW or subquery will be the affinity of the corresponding result column for one of the individual SELECT statements that make up the compound. |
︙ | ︙ |