Tree Queries
From TekiWiki
This whole wiki has now moved to http://www.springboardsolutions.com/wiki
Go to this page Tree Queries
| Line 66: | Line 66: | ||
We have padded the granted role with spaces to show the depth within the treem using the expression: | We have padded the granted role with spaces to show the depth within the treem using the expression: | ||
| - | + | <pre> | |
lpad(' ',(level-1)*4,' ')||granted_role | lpad(' ',(level-1)*4,' ')||granted_role | ||
| + | </pre> | ||
| - | "level" is the depth in the tree (counts from one, so we took one off), and multiplied by 4 so that the indentations are visible, and used lpad to that many spaces to the beginning of the granted_role. | + | "level" is the depth in the tree (counts from one, so we took one off), and multiplied by 4 so that the indentations are visible, and used lpad to add that many spaces to the beginning of the granted_role. |