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

org.killbill.billing.payment.dao.PaymentAttemptSqlDao.sql.stg Maven / Gradle / Ivy

There is a newer version: 0.24.12
Show newest version
import "org/killbill/billing/util/entity/dao/EntitySqlDao.sql.stg"

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 */
getByStateNameAcrossTenants(ordering) ::= <<
select

from 
where state_name = :stateName
and created_date \< :createdBeforeDate

order by  
limit :rowCount offset :offset
;
>>

getCountByStateNameAcrossTenants() ::= <<
select
count(1) as count
from 
where state_name = :stateName
and created_date \< :createdBeforeDate

;
>>

updateAttemptWithProperties() ::= <<
update 
set state_name = :stateName
, payment_method_id = :paymentMethodId
, transaction_id = :transactionId
, amount = :amount
, currency = :currency
, plugin_properties = :pluginProperties
, updated_by = :updatedBy
, updated_date = :updatedDate
where id = :id

;
>>








© 2015 - 2025 Weber Informatics LLC | Privacy Policy