Advanced Filters in frappe.call

I want to achieve the following:

frappe.call({
    method: "frappe.client.get_value",
    args: {
        doctype: "Salary Structure",
        fieldname: "name",
        filters: {
        	employee: ["=", cur_frm.get_field("employee").value],
        	is_active: ["=", "Yes"],
        	from_date: ["<=", "2015-03-01"],
        	(to_date: [">=", "2015-03-31"] or to_date: ["=", "null"]),
        },
    },
    callback: function(r, rt) {
        if(r.message) {
            console.log(r.message);
        }
    }
});

The problem I have is in (to_date: [">=", "2015-03-31"] or to_date: ["=", "null"]),

  1. Firstly, there is the brackets - is there a way to specify brackets in filters?
  2. there is no “IS NULL” condition - or is there?
  3. the OR operator, how would one specify OR in filters?

@bohlian

A Better solution would be to have a server side call rather than doing so much of number crunching in the client side. It is good practice to do validation on the server side, rather on the client side.

Create a whitelist method in salary_structure.py that will do your job of validation.

Regards,
_Shreyas.

@shreyasp actually the get_value function basically constructs an sql statement which then runs a query on the server side.

My question is more on whether we can actually construct advanced sql calls using get_value. Does anyone know?