-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alter type functions #111
Alter type functions #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comments: LGTM.
So please fix & merge.
@@ -352,6 +352,75 @@ This is required for some SQL operations that cannot be run within a transaction | |||
|
|||
----------------------------------------------------- | |||
|
|||
#### `pgm.renameType( type_name, new_type_name )` | |||
|
|||
> Rename a data type - [postgres docs](http://www.postgresql.org/docs/current/static/sql-altertype.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All other comment verbs are in 3rd person (adds / sets), just this one (and the one below) is not (i.e. is without the trailing 's').
README.md
Outdated
|
||
#### `pgm.dropTypeAttribute( type_name, attribute_name, options )` | ||
|
||
> Adds an attribute to data type - [postgres docs](http://www.postgresql.org/docs/current/static/sql-altertype.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like copy / paste comment. The function name is 'drop...', the comments says 'Adds ...'.
**Arguments:** | ||
- `type_name` _[string]_ - name of the type | ||
- `attribute_name` _[string]_ - name of the attribute | ||
- `attribute_type` _[string]_ - new type of the attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3rd parameter in the definition says 'options', here you have 'attribute_type'.
**Arguments:** | ||
- `type_name` _[string]_ - name of the type | ||
- `value` _[string]_ - value to add to list | ||
- `options` _[object]_ - options: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter is not listed in the function declaration above.
|
||
#### `pgm.renameTypeAttribute( type_name, attribute_name, new_attribute_name )` | ||
|
||
> Rename an attribute of data type - [postgres docs](http://www.postgresql.org/docs/current/static/sql-altertype.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename --> Renames? (same as the first comment here)
Fixes #109