Skip to content
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

Merged
merged 2 commits into from
Sep 12, 2017
Merged

Alter type functions #111

merged 2 commits into from
Sep 12, 2017

Conversation

dolezel
Copy link
Contributor

@dolezel dolezel commented Sep 11, 2017

Fixes #109

Copy link

@roman-kaspar roman-kaspar left a 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)

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)

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

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:

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)

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)

@dolezel dolezel merged commit bd497d8 into master Sep 12, 2017
@dolezel dolezel deleted the alter_type branch September 12, 2017 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants