What is KSearch?
KSearch is a library that will help you build different types of SQL statements and manipulate the extracted data in a simple and intuitive way.The supported SQL statements are:
SELECT statement
With
KSearch you can:
- Query one and only one record from the database, internally calling the getSingleResult() method of the JPA EntityManager.
- Query multiple database records, calling the getResultList() method of the JPA EntityManager.
- Add the following clauses to the SQL statement:
WITH,SELECT,FROM,JOIN,WHERE,GROUP BY,HAVING,ORDER BY,LIMIT,OFFSET
INSERT statement
With
KSearch you can:
- Inserting a single record, as well as, inserting multiple records at the same time (Multiple Insert).
- Add an attribute to return after the execution of the Insert statement.
- Create statements of the type
INSERT INTOandINSERT INTO SELECT.
UPDATE statement
With
KSearch you can:
- Update records on a table with at least one condition (
UPDATEwithWHEREclause). - Execute a
UPDATEstatement that simulates working through aJOINof the main table with another table (UPDATEwithFROMandWHEREclause).
DELETE statement
With
KSearch you can:
- Delete records on a table with at least one condition (
DELETEwithWHEREclause). - Execute a
DELETEstatement that simulates working through aJOINof the main table with another table (DELETEwithUSINGandWHEREclause).