All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.killbill.bus.dao.PersistentBusSqlDao.sql.stg Maven / Gradle / Ivy

There is a newer version: 8.1.2
Show newest version
import "org/killbill/queue/dao/QueueSqlDao.sql.stg"

extraFieldsWithComma() ::= <<
>>


extraValuesWithComma() ::= <<
>>

readyWhereClause(owner) ::= <<
    processing_state != 'PROCESSED'
    and processing_state != 'REMOVED'
and creating_owner = ''
    and (processing_owner IS NULL OR processing_available_date \<= :now)
>>

readyOrderByClause() ::= <<
    record_id asc
>>

reapWhereClause() ::= <<
    processing_state != 'PROCESSED'
    and processing_state != 'REMOVED'
    and (processing_owner IS NULL OR processing_available_date \<= :now)
    and created_date \<= :reapingDate
>>

/** Bus Events specific queries **/
getReadyQueueEntriesForSearchKeys(tableName) ::= <<
    select
      
    from 
    where
          processing_state = 'AVAILABLE'
      and search_key1 = :searchKey1
      and search_key2 = :searchKey2
    order by
      
;
>>

getReadyQueueEntriesForSearchKey2(tableName) ::= <<
    select
      
    from 
    where
          processing_state = 'AVAILABLE'
      and created_date \< cast(coalesce(:maxCreatedDate, '2100-01-01') as datetime)
      and search_key2 = :searchKey2
    order by
      
;
>>

getReadyOrInProcessingQueueEntriesForSearchKeys(tableName) ::= <<
    select
      
    from 
    where
          processing_state in ('AVAILABLE', 'IN_PROCESSING')
      and search_key1 = :searchKey1
      and search_key2 = :searchKey2
    order by
      
;
>>

getReadyOrInProcessingQueueEntriesForSearchKey2(tableName) ::= <<
    select
      
    from 
    where
          processing_state in ('AVAILABLE', 'IN_PROCESSING')
      and created_date \< cast(coalesce(:maxCreatedDate, '2100-01-01') as datetime)
      and search_key2 = :searchKey2
    order by
      
;
>>

getHistoricalQueueEntriesForSearchKeys(historyTableName) ::= <<
    select
      
    from 
    where
          search_key1 = :searchKey1
      and search_key2 = :searchKey2
    order by
      
;
>>

getHistoricalQueueEntriesForSearchKey2(historyTableName) ::= <<
    select
      
    from 
    where created_date >= cast(coalesce(:minCreatedDate, '1970-01-01') as datetime)
      and search_key2 = :searchKey2
    order by
      
;
>>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy