Skip to content

Commit

Permalink
add custom sql query support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuki committed Sep 9, 2016
1 parent 15d88ee commit e6d4c9e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion azure-mobile-apps/azure-mobile-apps-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,14 @@ mobileApps.logger.debug('a debug message')

// Query
queries.create('table').where({ x: 10 }).select('col1,col2');
mobileApps.query.create('table');
mobileApps.query.create('table');

// custom sql query
mobileApp.api.add('query', { authorize: true, get: (req, res, next) => {
req.azureMobile.data.execute({
sql: "SELECT * FROM TODOITEM WHERE COMPLETE = :complete",
parameters: [
{ name: 'complete', value: 1 }
]
}).then(x => {})
}, delete: function () {} });

0 comments on commit e6d4c9e

Please sign in to comment.