# How to find all rows that satisfy a query?
Construct the query using the collection's QueryBuilder class, then use the find api to fetch all the rows that match the query.
For example to find all open lotterys with name starting with "metastay":
val lotteryQry = LotteryQuery().open.is(true).lotteryName.startsWith("metastay")
val allMatches:List[LotteryRow] = lotteryQry.find
Query builder has customized query options based on the field's data-type. For example: startWith, endsWith , equalsIgnoreCase etc. are options available on a String field. Numeric fields have options like greaterThan, lessThan etc.
Alternately, use lazyFind when the result set is large & the processing logic can work incrementally on the list (internally uses cursor)