mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-20 16:14:57 +08:00
add custom sql query support
This commit is contained in:
@@ -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 () {} });
|
||||
|
||||
Reference in New Issue
Block a user