Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion db-service/lib/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const computeColumnsToBeSearched = (cqn, entity = { __searchableColumns: [] }) =
if (
cqn.SELECT.columns.length === 1 &&
column.func === 'count' &&
(column.as === '_counted_' || column.as === '$count')
column.as === '$count'
) {
return
}
Expand Down
4 changes: 2 additions & 2 deletions test/compliance/SELECT.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,9 +1132,9 @@ describe('SELECT', () => {
const query = SELECT.from('complex.associations.Authors')
query.SELECT.count = true
const result = await query
assert.strictEqual(result.$count, 1)
assert.strictEqual(Number(result.$count), 1)
Comment thread
sjvans marked this conversation as resolved.
Outdated
const renamed = result.map(row => ({ key: row.ID, fullName: row.name }))
assert.strictEqual(renamed.$count, 1)
assert.strictEqual(Number(renamed.$count), 1)
Comment thread
sjvans marked this conversation as resolved.
Outdated
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/scenarios/sflight/lean-draft.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('draft tests', () => {
{ auth: { username: 'user1', password: 'user1' } },
)
expect(res.status).to.be.eq(200)
expect(res.data['@odata.count']).to.be.eq(1)
expect(res.data['@odata.count'] == 1).to.be.eq(true)
Comment thread
sjvans marked this conversation as resolved.
Outdated
firstRow = res.data.value[0]
expect(firstRow.IsActiveEntity).to.be.eq(true)
expect(firstRow.HasActiveEntity).to.be.eq(false)
Expand Down
Loading