Class AbstractJdbcRepository<T>

java.lang.Object
io.kestra.jdbc.AbstractJdbcRepository<T>

public abstract class AbstractJdbcRepository<T> extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Class<T>
     
    protected Function<org.jooq.Record,T>
     
    protected final JooqDSLContextWrapper
     
    protected final io.kestra.core.queues.QueueService
     
    protected org.jooq.Table<org.jooq.Record>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractJdbcRepository(Class<T> cls, io.micronaut.context.ApplicationContext applicationContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    delete(org.jooq.DSLContext dslContext, T entity)
     
    int
    delete(T entity)
     
     
    <R extends org.jooq.Record>
    List<T>
    fetch(org.jooq.Select<R> select)
     
    List<io.kestra.core.models.executions.metrics.MetricAggregation>
    fetchMetricStat(org.jooq.Select<org.jooq.Record> select, String groupByType)
     
    <R extends org.jooq.Record>
    Optional<T>
    fetchOne(org.jooq.Select<R> select)
     
    <R extends org.jooq.Record>
    io.kestra.core.repositories.ArrayListTotal<T>
    fetchPage(org.jooq.DSLContext context, org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
     
    abstract <R extends org.jooq.Record, E>
    io.kestra.core.repositories.ArrayListTotal<E>
    fetchPage(org.jooq.DSLContext context, org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable, org.jooq.RecordMapper<R,E> mapper)
     
    fragments(String query, String yaml)
     
    abstract org.jooq.Condition
     
    <R extends org.jooq.Record>
    Instant
    getDate(R record, String groupByType)
     
    key(T entity)
     
    protected <R extends org.jooq.Record>
    org.jooq.Select<R>
    limit(org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
     
    <R extends org.jooq.Record>
    T
    map(R record)
     
    <R extends org.jooq.Record>
    io.kestra.core.models.executions.metrics.MetricAggregation
    mapMetricAggregation(R record, String groupByType)
     
    protected <R extends org.jooq.Record>
    org.jooq.Select<R>
    pageable(org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
     
    void
    persist(T entity)
     
    void
    persist(T entity, Map<org.jooq.Field<Object>,Object> fields)
     
    void
    persist(T entity, org.jooq.DSLContext dslContext, Map<org.jooq.Field<Object>,Object> fields)
     
    Map<org.jooq.Field<Object>,Object>
    persistFields(T entity)
     
    protected <R extends org.jooq.Record>
    org.jooq.SelectConditionStep<R>
    sort(org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • queueService

      protected final io.kestra.core.queues.QueueService queueService
    • cls

      protected final Class<T> cls
    • deserializer

      protected Function<org.jooq.Record,T> deserializer
    • dslContextWrapper

      protected final JooqDSLContextWrapper dslContextWrapper
    • table

      protected org.jooq.Table<org.jooq.Record> table
  • Constructor Details

    • AbstractJdbcRepository

      public AbstractJdbcRepository(Class<T> cls, io.micronaut.context.ApplicationContext applicationContext)
  • Method Details

    • fullTextCondition

      public abstract org.jooq.Condition fullTextCondition(List<String> fields, String query)
    • key

      public String key(T entity)
    • persistFields

      public Map<org.jooq.Field<Object>,Object> persistFields(T entity)
    • persist

      public void persist(T entity)
    • persist

      public void persist(T entity, Map<org.jooq.Field<Object>,Object> fields)
    • persist

      public void persist(T entity, org.jooq.DSLContext dslContext, Map<org.jooq.Field<Object>,Object> fields)
    • delete

      public int delete(T entity)
    • delete

      public int delete(org.jooq.DSLContext dslContext, T entity)
    • map

      public <R extends org.jooq.Record> T map(R record)
    • mapMetricAggregation

      public <R extends org.jooq.Record> io.kestra.core.models.executions.metrics.MetricAggregation mapMetricAggregation(R record, String groupByType)
    • getDate

      public <R extends org.jooq.Record> Instant getDate(R record, String groupByType)
    • deserialize

      public T deserialize(String record)
    • fetchOne

      public <R extends org.jooq.Record> Optional<T> fetchOne(org.jooq.Select<R> select)
    • fetch

      public <R extends org.jooq.Record> List<T> fetch(org.jooq.Select<R> select)
    • fetchMetricStat

      public List<io.kestra.core.models.executions.metrics.MetricAggregation> fetchMetricStat(org.jooq.Select<org.jooq.Record> select, String groupByType)
    • fetchPage

      public abstract <R extends org.jooq.Record, E> io.kestra.core.repositories.ArrayListTotal<E> fetchPage(org.jooq.DSLContext context, org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable, org.jooq.RecordMapper<R,E> mapper)
    • fetchPage

      public <R extends org.jooq.Record> io.kestra.core.repositories.ArrayListTotal<T> fetchPage(org.jooq.DSLContext context, org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
    • fragments

      public List<String> fragments(String query, String yaml)
    • sort

      protected <R extends org.jooq.Record> org.jooq.SelectConditionStep<R> sort(org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
    • limit

      protected <R extends org.jooq.Record> org.jooq.Select<R> limit(org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)
    • pageable

      protected <R extends org.jooq.Record> org.jooq.Select<R> pageable(org.jooq.SelectConditionStep<R> select, io.micronaut.data.model.Pageable pageable)