-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(
UPDATE
/DELETE
): Enable path expressions for improved data ma…
…nipulation (#325) Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com>
- Loading branch information
1 parent
2ce4793
commit 94f0776
Showing
6 changed files
with
166 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
'use strict' | ||
|
||
const cds = require('../cds.js') | ||
|
||
describe('DELETE', () => { | ||
cds.test(__dirname + '/../bookshop') | ||
|
||
describe('from', () => { | ||
test.skip('missing', () => { | ||
throw new Error('not supported') | ||
}) | ||
}) | ||
|
||
describe('where', () => { | ||
test.skip('missing', () => { | ||
throw new Error('not supported') | ||
test.skip('path expressions', async () => { | ||
const deleteEmilysBooks = DELETE.from('AdminService.RenameKeys').where(`author.name = 'Emily Brontë'`) | ||
const selectEmilysBooks = CQL`SELECT * FROM sap.capire.bookshop.Books where author.name = 'Emily Brontë'` | ||
|
||
const beforeDelete = await cds.run(selectEmilysBooks) | ||
await cds.run(deleteEmilysBooks) | ||
const afterDelete = await cds.run(selectEmilysBooks) | ||
|
||
expect(beforeDelete).toHaveLength(1) | ||
expect(afterDelete).toHaveLength(0) | ||
}) | ||
}) | ||
}) |