Skip to content

.toString() coerces null to string:null #76

@rkaw92

Description

@rkaw92

Simple test case:

'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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions