site builder

JavaSQL

Query database from your Java code

Daobab allows the building of database query in Java code and as Java code.

Anywhere you want.

You don't need to build a separated internal layer called DAO anymore.
Also you don't need to build so many specified methods and expose it with interfaces.

With Daobab, all those boundaries disappear.

You can build SQL query as Java code, and Daobab will not let you commit a mistake.

You can see what you are doing in the database, instantly where Java code expects the data.

You can build JavaSQL queries quickly, directly into REST controllers.

You can build JavaSQL queries anywhere.

You can build abstract queries and play with abstract types.

Also, you have a lot of most commons findBy available instantly, from the PK Entity. So in most cases, you don't need to build JavaSQL query at all.

Daobab brings you a lot of opportunities, speeds up the development process and helps you to create your code solidly and free of errors.


Example SQL:

SELECT pizza.name FROM pizza Pizza
 where pizza.name='MARGHERITA'
  or pizza.name like '%PEPPERONI%'
 order by pizza.pizza_id asc;


Daobab JavaSQL:

Select.many(db,tabPizza.colName())
 .where(OR() 
  .or(tabPizza.colName(),"MARGHERITA") 
  .or(tabPizza.colName(),LIKE,"%Pepperoni%"))
 .orderAsc(tabPizza.colPizzaId())
 .result();


© Copyright 2020 Elephant Software Klaudiusz Wojtkowiak 
e-mail: contact@daobab.io