We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 support to an array of strings on dropColumns method.
dropColumns
The current version of QueryRunner.dropColumns method only supports a list of TableColumns and it makes the code more verbosity and less consistent.
QueryRunner.dropColumns
TableColumns
The solutions was easy, since the dropColumn method already accept a string as column name.
dropColumn
For an specific driver I was forced to check if it was already an instance of TableColumn and, if not, I find the column on table.
TableColumn
before:
await queryRunner.dropColumns( 'table_x', [ new TableColumn({ name: 'id', type: 'int' }), new TableColumn({ name: 'name', type: 'varchar' }), ], )
after:
await queryRunner.dropColumns('table_x', ['id', 'name'])
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
I've already submitted a pull request #7654
The text was updated successfully, but these errors were encountered:
imnotjames
Successfully merging a pull request may close this issue.
Feature Description
Add support to an array of strings on
dropColumns
method.The Problem
The current version of
QueryRunner.dropColumns
method only supports a list ofTableColumns
and it makes the code more verbosity and less consistent.The Solution
The solutions was easy, since the
dropColumn
method already accept a string as column name.For an specific driver I was forced to check if it was already an instance of
TableColumn
and, if not, I find the column on table.Considered Alternatives
Additional Context
before:
after:
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
I've already submitted a pull request #7654
The text was updated successfully, but these errors were encountered: