-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix: fix type of methods in query-interface #11582
fix: fix type of methods in query-interface #11582
Conversation
Hi, thanks for the PR, can you please add more tests? |
types/lib/query-interface.d.ts
Outdated
@@ -120,6 +120,15 @@ export interface QueryInterfaceDropAllTablesOptions extends QueryInterfaceOption | |||
skip?: string[]; | |||
} | |||
|
|||
export interface TablenameWithSchema { |
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.
Should probably be TableName
.
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.
Do you mean it should be TableName or TableNameWithSchema?
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.
He probably means TableNameWithSchema
Codecov Report
@@ Coverage Diff @@
## master #11582 +/- ##
=========================================
- Coverage 96.26% 92.47% -3.8%
=========================================
Files 94 91 -3
Lines 9190 8903 -287
=========================================
- Hits 8847 8233 -614
- Misses 343 670 +327
Continue to review full report at Codecov.
|
5e3c533
to
e72dc36
Compare
@papb hi. I added some tests. I was wondering if you think there should be more tests. |
types/lib/query-interface.d.ts
Outdated
as?: string; | ||
name?: string; | ||
} | ||
export type Tablename = string | TablenameWithSchema; |
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.
export type Tablename = string | TablenameWithSchema; | |
export type TableName = string | TableNameWithSchema; |
@2kindsofcs Thanks, I think those tests are enough now. |
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?(npm run test-typings, actaully)
Description of change
as described in #11027, many of the QueryInterface methods accept something like
string | { tableName: string, schema: string }
as the first argument. however, they are accepting tableName with string type only. So I added interface and type so that they could get arguments other than string.