added limit
This commit is contained in:
@@ -66,12 +66,15 @@ module.exports = cds.service.impl(function () {
|
||||
const ql = SELECT.from(ShippingAddresses).where({
|
||||
BusinessPartner
|
||||
})
|
||||
if (req.query && req.query.SELECT && req.query.SELECT.columns) {
|
||||
if (req.query.SELECT.columns) {
|
||||
ql.columns(req.query.SELECT.columns)
|
||||
}
|
||||
if (req.query && req.query.SELECT && req.query.SELECT.where) {
|
||||
if (req.query.SELECT.where) {
|
||||
ql.where(req.query.SELECT.where)
|
||||
}
|
||||
if (req.query.SELECT.limit) {
|
||||
ql.SELECT.limit = req.query.SELECT.limit
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await txExt.run(ql)
|
||||
|
||||
Reference in New Issue
Block a user