Skip to content

Safe Raw find operator #2475

@asafigan

Description

@asafigan

Issue type:

[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue

Can there be a find operator that is like Raw but will safely insert values like the query builder's where?

API

SafeRaw("title = :title", {title: "value"})

I would like it so that like can do something like this:

{
    where: {
        id: In(SafeRaw(
            "select sluggableId from slug where slug in :slugs and sluggableType = :sluggableType", 
            {slugs: ['userInput'], sluggableType: Type.name}
        ))
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions