Query
class in package klyn.databases.entities

    public class Query:

Query

Requête JPQL ou SQL native.

@example ```klyn users = em.createQuery[User]("FROM User u WHERE u.isDisabled = false") .setMaxResults(10) .getResultList()

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | Query `Query(jpql as String, config as DatabaseConfig, isNative as Boolean = false):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | executeUpdate `executeUpdate() as Int:` | Exécute une requête UPDATE/DELETE.
public | getResultList `getResultList() as List<Object>:` | Exécute et retourne la liste des résultats.
public | getSingleResult `getSingleResult() as Object:` | Exécute et retourne un seul résultat.
public | setFirstResult `setFirstResult(offset as Int) as Query:` | Définit le premier résultat (offset).
public | setMaxResults `setMaxResults(max as Int) as Query:` | Limite le nombre de résultats.
public | setParameter `setParameter(name as String, value as Object) as Query:` | Définit un paramètre nommé.
public | setParameter `setParameter(position as Int, value as Object) as Query:` | Définit un paramètre positionnel.