org.killbill.billing.usage.dao.RolledUpUsageSqlDao.sql.stg Maven / Gradle / Ivy
group RolledUpUsageSqlDao : EntitySqlDao;
tableName() ::= "rolled_up_usage"
tableFields(prefix) ::= <<
subscription_id
, unit_type
, record_date
, amount
, tracking_id
, created_by
, created_date
>>
tableValues() ::= <<
:subscriptionId
, :unitType
, :recordDate
, :amount
, :trackingId
, :userName
, :createdDate
>>
recordsWithTrackingIdExist() ::= <<
select
1
from
where subscription_id = :subscriptionId
and tracking_id = :trackingId
limit 1
;
>>
getUsageForSubscription() ::= <<
select
from
where subscription_id = :subscriptionId
and record_date >= :startDate
and record_date \< :endDate
and unit_type = :unitType
;
>>
getAllUsageForSubscription() ::= <<
select
from
where subscription_id = :subscriptionId
and record_date >= :startDate
and record_date \< :endDate
;
>>
getRawUsageForAccount() ::= <<
select
from
where account_record_id = :accountRecordId
and record_date >= :startDate
and record_date \< :endDate
;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy