v5:dictionary:comments
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:dictionary:comments [2026/03/22 23:25] – mnewnham | v5:dictionary:comments [2026/03/22 23:45] (current) – mnewnham | ||
|---|---|---|---|
| Line 100: | Line 100: | ||
| $datadict = newDataDictionary($db); | $datadict = newDataDictionary($db); | ||
| - | $tableCommentSql = $datadict-> | + | $tableCommentSql = $datadict-> |
| /* | /* | ||
| Line 138: | Line 138: | ||
| --------------------------------------- | --------------------------------------- | ||
| + | ===== Reading Comments ===== | ||
| + | All databases use the same methods to retrieve comments set in the database. | ||
| + | ==== Table ==== | ||
| + | <WRAP right box> | ||
| + | == Syntax == | ||
| + | |||
| + | ?string getTableCommentSql( | ||
| + | string $tableName | ||
| + | ) | ||
| + | |||
| + | </ | ||
| + | **ADODataDictionary:: | ||
| + | |||
| + | --------------------------------------- | ||
| + | <code php> | ||
| + | /* | ||
| + | * Assume connection to a PostgresQL database | ||
| + | */ | ||
| + | |||
| + | $table = ' | ||
| + | |||
| + | |||
| + | $datadict = newDataDictionary($db); | ||
| + | $tableCommentSql = $datadict-> | ||
| + | |||
| + | /* | ||
| + | * Returns | ||
| + | */ | ||
| + | |||
| + | $comment = $db-> | ||
| + | </ | ||
| + | ==== Column ==== | ||
| + | <WRAP right box> | ||
| + | == Syntax == | ||
| + | |||
| + | ?string getColumnCommentSql( | ||
| + | string $tableName, | ||
| + | string $columnName | ||
| + | ) | ||
| + | |||
| + | </ | ||
| + | **ADODataDictionary:: | ||
| + | |||
| + | --------------------------------------- | ||
| + | |||
| + | ==== Index ==== | ||
| + | <WRAP right box> | ||
| + | == Syntax == | ||
| + | |||
| + | ?string getIndexCommentSql( | ||
| + | string $tableName, | ||
| + | string $indexName | ||
| + | ) | ||
| + | |||
| + | </ | ||
| + | **ADODataDictionary:: | ||
| + | |||
| + | ---------------------------------- | ||
| + | |||
| + | ===== Deprecated Functions ===== | ||
| + | The functions **getCommentSql()** and **setCommentSql()** which get/set table comments in the oci8 driver are deprecated and will be removed in a later release. They currently alias **getTableCommentSql()** and **setTableCommentSql()** | ||
v5/dictionary/comments.1774218313.txt.gz · Last modified: by mnewnham
