Added parsing for partialMatch parameter in generateReadQuery function. To see all contents, send no params. To see exact matches, send no partialMatch param or send partialMatch: false. Send partialMatch: true to see all partial matches.
Additionally, moved parameter definitions out of paramLibrary into paramsConfig.json - you can now add/remove/change parameter data type definitions inside of this file. If you get a console error of "Unsupported Param Type" then you may need to also update paramLibrary with handling for the data type you're using- use the existing definitions in functions such as formatMSSQLParams as a guide. Added testing for the partialMatch parameter to client.js.
This commit is contained in:
11
client.js
11
client.js
@@ -61,7 +61,16 @@ async function testQuery(table, operation, params) {
|
||||
} );
|
||||
|
||||
// READ: See all rows in a table
|
||||
await testQuery('Test', 'READ');
|
||||
await testQuery('Test', 'READ', {
|
||||
Name: 'Tested item name',
|
||||
});
|
||||
|
||||
// READ: See all rows in a table
|
||||
await testQuery('Test', 'READ', {
|
||||
partialMatch: true,
|
||||
Name: 'Test',
|
||||
});
|
||||
|
||||
|
||||
// DELETE: Ensure the ID is present
|
||||
await testQuery('Test', 'DELETE', {
|
||||
|
||||
Reference in New Issue
Block a user