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

Fix: drop table statement #2036

Merged
merged 41 commits into from
May 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c62584c
chore: integration test fix
surbhigarg92 Jan 11, 2024
e7d385b
Merge branch 'googleapis:main' into main
surbhigarg92 Mar 4, 2024
e57b897
Merge branch 'googleapis:main' into main
surbhigarg92 Mar 4, 2024
c0c935e
Merge branch 'googleapis:main' into main
surbhigarg92 Mar 8, 2024
8875f2c
Merge branch 'googleapis:main' into main
surbhigarg92 Mar 26, 2024
9069624
fix: drop table
surbhigarg92 Apr 12, 2024
8b09c11
fix(deps): update dependency google-gax to v4.3.2 (#2026)
renovate-bot Mar 29, 2024
b8d63e4
feat(spanner): adding `EXPECTED_FULFILLMENT_PERIOD` to the indicate i…
gcf-owl-bot[bot] Apr 4, 2024
b6efb93
feat: optimisticLock option for getTransaction method (#2028)
alkatrivedi Apr 17, 2024
2587ab7
chore(main): release 7.7.0 (#2027)
release-please[bot] Apr 22, 2024
9993255
fix: drop table statement
alkatrivedi Apr 29, 2024
8697f09
Merge branch 'main' into drop-table-fix
alkatrivedi Apr 29, 2024
aa036f9
refactor: delete method for drop statement
alkatrivedi May 2, 2024
3f9e8eb
Modified delete method to use async await
surbhigarg92 May 3, 2024
d17e691
Merge branch 'googleapis:main' into drop-table-fix
alkatrivedi May 6, 2024
75e804c
fix: lint errors
alkatrivedi May 6, 2024
e09a6a0
test: unit test for delete method
alkatrivedi May 9, 2024
82206ee
fix: lint errors
alkatrivedi May 9, 2024
1ad935f
refactor: unit test for drop table
alkatrivedi May 9, 2024
41ac10e
refactor: remove unwanted commented lines
alkatrivedi May 9, 2024
c48bec4
fix: lint errors
alkatrivedi May 9, 2024
b88ca46
refactor: remove unwanted logs and refactor docs of the method
alkatrivedi May 9, 2024
35a97a8
refactor
alkatrivedi May 9, 2024
9fc73b3
remove sample file
alkatrivedi May 9, 2024
e7233e5
refactor: unit test for delete method
alkatrivedi May 9, 2024
b1b3fcd
fix: lint error
alkatrivedi May 10, 2024
deea952
Merge branch 'main' into drop-table-fix
alkatrivedi May 10, 2024
259b280
refactor: remove unused lines
alkatrivedi May 13, 2024
a276724
refactor: remove unused lines
alkatrivedi May 13, 2024
04c9af4
refactor: remove unused lines
alkatrivedi May 13, 2024
a6695ff
fix: lint errors
alkatrivedi May 13, 2024
e556994
refactor: remove sample file
alkatrivedi May 13, 2024
0f1b304
refactor
alkatrivedi May 13, 2024
5d9251c
fix: lint errors
alkatrivedi May 13, 2024
68d2c7b
fix: lint errors
alkatrivedi May 13, 2024
7b8d8f2
refactor
alkatrivedi May 14, 2024
84a74a1
fix: lint errors
alkatrivedi May 14, 2024
c260858
refactor
alkatrivedi May 15, 2024
87ae182
refactor
alkatrivedi May 15, 2024
4d5c455
refactor
alkatrivedi May 15, 2024
daf810b
Merge branch 'main' into drop-table-fix
alkatrivedi May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: remove unwanted commented lines
  • Loading branch information
alkatrivedi committed May 9, 2024
commit 41ac10e253bf4238b9abe250fc63401a867df5f5
18 changes: 0 additions & 18 deletions test/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,11 @@

describe('delete', () => {
it('should update the schema on the database for GoogleSQL using await', async () => {
// sandbox
// .stub(table.database, 'getDatabaseDialect')
// .resolves('GOOGLE_STANDARD_SQL');
// const stub = sandbox.stub(table.database, 'updateSchema').resolves();
// await table.delete();
// sinon.assert.calledOnce(stub);
// assert.strictEqual(stub.args[0][0], 'DROP TABLE `table-name`');

table.database = {
getDatabaseDialect: gaxOptions => {

Check warning on line 220 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

'gaxOptions' is defined but never used
return 'GOOGLE_STANDARD_SQL';
},
updateSchema: (schema, gaxOptions, callback_) => {

Check warning on line 223 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

'gaxOptions' is defined but never used

Check warning on line 223 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

'callback_' is defined but never used
assert.strictEqual(schema, 'DROP TABLE `table-name`');
},
};
Expand All @@ -239,7 +231,7 @@
it('should update the schema on the database for GoogleSQL using callbacks', () => {
function callback() {}
table.database = {
getDatabaseDialect: (gaxOptions) => {

Check failure on line 234 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `(gaxOptions)` with `gaxOptions`
return 'GOOGLE_STANDARD_SQL';
},
updateSchema: (schema, gaxOptions, callback_) => {
Expand All @@ -251,16 +243,6 @@
});

it('should update the schema on the database for GoogleSQL with schema in the table name using await', async () => {
// sandbox
// .stub(tableWithSchema.database, 'getDatabaseDialect')
// .resolves('GOOGLE_STANDARD_SQL');
// const stub = sandbox
// .stub(tableWithSchema.database, 'updateSchema')
// .resolves();

// await table.delete();
// sinon.assert.calledOnce(stub);
// assert.strictEqual(stub.args[0][0], 'DROP TABLE `table-name`');
tableWithSchema.database = {
getDatabaseDialect: gaxOptions => {
return 'GOOGLE_STANDARD_SQL';
Expand All @@ -276,7 +258,7 @@
it('should update the schema on the database for GoogleSQL with schema in the table name using callbacks', () => {
function callback() {}
tableWithSchema.database = {
getDatabaseDialect: (gaxOptions) => {

Check failure on line 261 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `(gaxOptions)` with `gaxOptions`
return 'GOOGLE_STANDARD_SQL';
},
updateSchema: (schema, gaxOptions, callback_) => {
Expand All @@ -287,7 +269,7 @@
tableWithSchema.delete(callback);
});

it('should update the schema on the database for PostgresSQL using await', async () => {

Check failure on line 272 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `⏎`

table.database = {
getDatabaseDialect: gaxOptions => {
Expand Down Expand Up @@ -317,7 +299,7 @@
table.delete(callback);
});

it('should update the schema on the database for PostgresSQL with schema in the table name using await', async () => {

Check failure on line 302 in test/table.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `⏎`

tableWithSchema.database = {
getDatabaseDialect: gaxOptions => {
Expand Down
Loading