HarperFast / HarperFast/rql

.toString() coerces null to string:null

Open
#76 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
276
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Simple test case:
```js
'use strict';

const Query = require('rql/query').Query;
const testPredicate = new Query().eq('foo', null);
console.log(testPredicate.toString());
```

Expected output:
`eq(foo,null)`

Actual output:
`eq(foo,string:null)`

Going to fix this in `greatcare/rql`, so that null values no longer get coerced. This is probably due to the special-case treatment of null in the first lines of query's `encodeValue`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.