<commit_before>package com.tightdb.doc;

import com.tightdb.generated.Employee;
import com.tightdb.generated.EmployeeQuery;
import com.tightdb.lib.TightDB;

public class QueryExamples {

	public static void main(String[] args) {

		/* EXAMPLE: clear */

		people.age.lessThan(14).clear();
		
		/* EXAMPLE: count */

		long count = people.name.equal("John").count();
		
		/* EXAMPLE: endGroup */

		people.name.eq("John").group().age.eq(10).or().age.eq(20).endGroup().findAll());
		
		/* EXAMPLE: findAll */

		PersonView johns = people.name.equal("John").findAll();
		
		/* EXAMPLE: findFirst */

		Person firstJohn = people.name.equal("John").findFirst();
		
		/* EXAMPLE: findLast */

		Person lastJohn = people.name.equal("John").findLast();
		
		/* EXAMPLE: findNext */

		EmployeeQuery johns = people.name.equal("John");
		Person p;
		while ((p = johns.findNext()) != null) System.out.println(p);
		
		/* EXAMPLE: group */

		PersonView view = people.name.eq("John").group().age.eq(10).or().age.eq(20).endGroup().findAll();
		
		/* EXAMPLE: or */

		PersonView view = people.age.eq(10).or().age.eq(20).findAll();
		
		/* EXAMPLE: END! */
		
	}
}<commit_msg>Updated the QueryExamples to show the grouping indented. However the doc-tool needs to be updated to not thow away the indents.<commit_after>package com.tightdb.doc;

import com.tightdb.generated.Employee;
import com.tightdb.generated.EmployeeQuery;
import com.tightdb.lib.TightDB;

public class QueryExamples {

	public static void main(String[] args) {

		/* EXAMPLE: clear */

		people.age.lessThan(14).clear();
		
		/* EXAMPLE: count */

		long count = people.name.equal("John").count();
		
		/* EXAMPLE: endGroup */

		people.name.eq("John").group()
                                      .age.eq(10)
                                      .or()
                                      .age.eq(20)
                              .endGroup()
                              .findAll());
		
		/* EXAMPLE: findAll */

		PersonView johns = people.name.equal("John").findAll();
		
		/* EXAMPLE: findFirst */

		Person firstJohn = people.name.equal("John").findFirst();
		
		/* EXAMPLE: findLast */

		Person lastJohn = people.name.equal("John").findLast();
		
		/* EXAMPLE: findNext */

		PersonQuery johns = people.name.equal("John");
		Person p;
		while ((p = johns.findNext()) != null) System.out.println(p);
		
		/* EXAMPLE: group */

		PersonView view = people.name.eq("John").group()
                                                        .age.eq(10)
                                                        .or()
                                                        .age.eq(20)
                                                .endGroup()
                                                .findAll();
		
		/* EXAMPLE: or */

		PersonView view = people.age.eq(10).or().age.eq(20).findAll();
		
		/* EXAMPLE: END! */
		
	}
}
{'fraction_non_alphanumeric': 0.1570735090152566, 'fraction_numerical': 0.009708737864077669, 'mean_word_length': 1.8965863453815262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4653675', 'n_tokens_mistral': 1000, 'n_tokens_neox': 822, 'n_words': 162}