ploomber.testing.sql.exists_row_where¶
- ploomber.testing.sql.exists_row_where(client, criteria: str, product)¶
Check whether at least one row exists matching the criteria
- Parameters:
client – Database client
criteria – Criteria to evaluate (passed as argument to a WHERE clause)
product – The relation to check
Notes
Runs a
SELECT EXISTS (SELECT * FROM {{product}} WHERE {{criteria}})
query- Returns:
True if exists at least one row matching the criteria
- Return type:
bool