Select

Few simple examples of io.daobab.Select class usage:

Select entity list:

List<Pizza> list=Select.from(daoPizza)
	.where(daoPizza.colName(),Operator.LIKE,"%Pepperoni%").result();

Select single entity:

Pizza p=Select.entity(daoPizza)
	.where(daoPizza.colName(),"Pepperoni").result();

Select field list:

List<String> names=Select.fieldList(daoPizza.colName())
	.where(daoPizza.colPizzaId(),Operator.GREATER_THAN,5).result();

Select single field:

String name=Select.field(daoPizza.colName())
	.where(daoPizza.colPizzaId(),Operator.EQUAL,5).result();

Select single bunch of fields from one or many tables (FieldRow):

FieldRow fieldrow=Select.fieldRow(daoPizza.colName(),daoPizza.colPizzaId())
	.where(daoPizza.colPizzaId(),Operator.EQUAL,10).result();

Select list of fields from one or many tables (FieldBox):

FieldBox box=Select.fieldBox(daoPizza.colName(),daoPizza.colPizzaId())
	.where(daoPizza.colPizzaId(),Operator.LESS_THAN,10).result();

Select with inner query:

List<Pizza> list=Select.from(daoPizza)
 .whereSelect(daoPizza.colPizzaId(),Operator.IN,
  Select.fieldList(daoPizzaPrice.colPizzaId())
   .where(daoPizzaPrice.colPrice(),Operator.GREATER_THAN,10.0))
 .result();