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

Add size parameter to integer method #3074

Merged
merged 3 commits into from Mar 4, 2019
Merged

Add size parameter to integer method #3074

merged 3 commits into from Mar 4, 2019

Conversation

@iamchathu
Copy link
Contributor

@iamchathu iamchathu commented Feb 28, 2019

Size parameter work when we pass it. But it's not in definition.

Size parameter work when we pass it. But it's not in definition.
types/knex.d.ts Outdated
@@ -552,7 +552,7 @@ declare namespace Knex {
dropColumn(columnName: string): TableBuilder;
dropColumns(...columnNames: string[]): TableBuilder;
renameColumn(from: string, to: string): ColumnBuilder;
integer(columnName: string): ColumnBuilder;
integer(columnName: string, size: number): ColumnBuilder;
Copy link
Collaborator

@kibertoad kibertoad Mar 3, 2019

I'm curious which database you are using. Knex seems to accept this values for MSSQL and Oracle, but I can't find anywhere in their documentation that they support it. Not sure what would be the accurate name here, if there is anything in their documentation - we should use that name, but Knex itself calls it "length", not "size". In MySQL world it is "display width", but that is very MySQL-specific.

Copy link
Contributor Author

@iamchathu iamchathu Mar 4, 2019

I'm using MySQL. I will update the parameter to length.

@kibertoad kibertoad merged commit cfcb55d into knex:master Mar 4, 2019
1 check was pending
@iamchathu iamchathu deleted the patch-1 branch Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants