com.ning.billing.usage.dao.RolledUpUsageSqlDao.sql.stg Maven / Gradle / Ivy
group RolledUpUsageSqlDao;
tableName() ::= "usage"
tableFields(prefix) ::= <<
id
, subscription_id
, unit_type
, start_time
, end_time
, amount
, created_by
, created_date
, account_record_id
, tenant_record_id
>>
tableValues() ::= <<
:id
, :subscriptionId
, :unitType
, :startTime
, :endTime
, :amount
, :userName
, :createdDate
, :accountRecordId
, :tenantRecordId
>>
CHECK_TENANT(prefix) ::= "tenant_record_id = :tenantRecordId"
AND_CHECK_TENANT(prefix) ::= "and "
create() ::= <<
insert into (
)
values (
)
;
>>
getUsageForSubscription() ::= <<
select
from t
where subscription_id = :subscriptionId
;
>>