Skip to content

XQuery: Add support for Exists() and DoesntExist()  #334

@ahmad-moussawi

Description

@ahmad-moussawi

Currently if I want to check only for the existence of some records, I have to fetch the records and test the count, while we can do the check directly on the db and save some network traffic.

Suggestion:
var isFound = db.Query("Table").Where("Some Conditions here").Exists();
var isNotFound = db.Query("Table").Where("Some Conditions here").DoesntExist();

Similar to https://laravel.com/docs/6.x/queries#aggregates

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