Commit 05ae378
committed
Update
Technically, the `GetAttributes` stored procedure is a vestigal artifact of the original version of OnTopic from over a decade ago, and is not documented or used in any production code. As such, it could be deleted. Indeed, while it's been kept up to date with schema changes, it hasn't accomodated more recent features such as `ExtendedAttributes` or `Version`, which make it entirely useless.
That said, instead of throwing it out, I've updated it to our latest standards as a useful utility function by incorporating both versioning as well as extended attributes. This includes a query to parse the XML of the latest `ExtendedAttributes` record and `UNION` it against the main `Attributes`.
While technically this could be stored in the `Utilities` schema, it has potential production use, and so I'm going to keep it under `dbo`. It's reasonably fast, and useful for pulling just the attributes of any given topic. We can reevaluate this in the next version of OnTopic, if appropriate.
It's worth noting that this does _not_ include `Key`, `ParentID`, or `ContentType`, as these are excluded from the main `Attributes` collection. We may want to reevaluate that in the future as well.GetAttributes to return correct data1 parent 17b98b4 commit 05ae378
1 file changed
Lines changed: 27 additions & 4 deletions
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
21 | 44 | | |
22 | 45 | | |
0 commit comments