Namespace Condition
Object generates a SQL-like WHERE clause. Used heavily by the DB object
Constructor Attributes | Constructor Name and Description |
---|---|
Condition objects are used by the DB to specify which objects in the database are affected.
|
Namespace Detail
Condition
Condition objects are used by the DB to specify which objects in the database are affected. Each Condition object is\
equivalent to a SQL WHERE condition.
DB.getObjects('supporter', { conditions: [ new Condition('Email','LIKE','%salsalabs.com') , new Condition('Email_Status', 'IN', ["N/A", "Good"]) , new Condition('Zip', '=', '20009') ] });
- Parameters:
- {string} object
- attribute (e.g. supporter.supporter_KEY)
- {string} operator
- SQL operator (e.g. =, LIKE, IN)
- {string or Array} value
- value for comparison (e.g. 'salsa%', ['salsa','labs','inc.'])
- Returns:
- {Condition}
- See:
- DB