org.killbill.billing.payment.dao.PaymentAttemptSqlDao.sql.stg Maven / Gradle / Ivy
group PaymentAttemptSqlDao: EntitySqlDao;
tableName() ::= "payment_attempts"
historyTableName() ::= "payment_attempt_history"
tableFields(prefix) ::= <<
account_id
, payment_method_id
, payment_external_key
, transaction_id
, transaction_external_key
, transaction_type
, state_name
, amount
, currency
, plugin_name
, plugin_properties
, created_by
, created_date
, updated_by
, updated_date
>>
tableValues() ::= <<
:accountId
, :paymentMethodId
, :paymentExternalKey
, :transactionId
, :transactionExternalKey
, :transactionType
, :stateName
, :amount
, :currency
, :pluginName
, :pluginProperties
, :createdBy
, :createdDate
, :updatedBy
, :updatedDate
>>
getByTransactionExternalKey() ::= <<
select
from
where transaction_external_key = :transactionExternalKey
;
>>
getByPaymentExternalKey() ::= <<
select
from
where payment_external_key = :paymentExternalKey
;
>>
/* Does not include tenant info, global */
getByStateName() ::= <<
select
from
where state_name = :stateName
and created_date \< :createdBeforeDate
;
>>
updateAttempt() ::= <<
update
set state_name = :stateName
, transaction_id = :transactionId
, updated_by = :updatedBy
, updated_date = :createdDate
where id = :id
;
>>