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

org.killbill.notificationq.dao.NotificationSqlDao.sql.stg Maven / Gradle / Ivy

There is a newer version: 0.26.5
Show newest version
group NotificationSqlDao: BaseSqlDao;

extraFieldsWithComma() ::= <<
      , future_user_token
      , effective_date
      , queue_name
>>


extraValuesWithComma() ::= <<
      , :futureUserToken
      , :effectiveDate
      , :queueName
>>

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

readyOrderByClause() ::= <<
        effective_date asc
      , created_date asc
      , record_id
>>

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

getReadyQueueEntriesForSearchKey2(tableName) ::= <<
    select
      
    from 
    where
      queue_name = :queueName
      and processing_state = 'AVAILABLE'
      and search_key2 = :searchKey2
    order by
      
;
>>

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

getReadyOrInProcessingQueueEntriesForSearchKey2(tableName) ::= <<
    select
      
    from 
    where
      queue_name = :queueName
      and processing_state in ('AVAILABLE', 'IN_PROCESSING')
      and search_key2 = :searchKey2
    order by
      
;
>>

/** Notifications specific queries **/
getCountReadyEntries(tableName) ::= <<
    select
     count(*)
    from 
    where
      processing_state = 'AVAILABLE'
      and effective_date \<= :now
      and search_key1 = :searchKey1
      and search_key2 = :searchKey2
;
>>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy