Skip to content

Predicate with parameter the same as a table column name #233

@Davidvlv

Description

@Davidvlv

Hi, how are you supposed to deal with reserved words for column names?

We are creating our predicates like:

let name = "test";
Predicate.create("Name", "contains", name);

The above works when the name variable is something random, but if it happens to be the same as the name of a column, e.g. "Id", then the SQL generated is something like:

SELECT * FROM Table WHERE Name = Id

Instead of

SELECT * FROM Table WHERE Name = 'Id'

How do we create the predicate in a way that the third parameter can overlap a column name?

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