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

org.killbill.billing.tenant.dao.TenantSqlDao.sql.stg Maven / Gradle / Ivy

group TenantDaoSql: EntitySqlDao;

tableName() ::= "tenants"

/* Don't add api_secret and api_salt in these fields, we shouldn't need to retrieve them */
tableFields(prefix) ::= <<
  external_key
, api_key
, created_date
, created_by
, updated_date
, updated_by
>>

tableValues() ::= <<
  :externalKey
, :apiKey
, :createdDate
, :createdBy
, :updatedDate
, :updatedBy
>>

/* No account_record_id field */
accountRecordIdFieldWithComma(prefix) ::= ""
accountRecordIdValueWithComma(prefix) ::= ""

/* No tenant_record_id field */
tenantRecordIdFieldWithComma(prefix) ::= ""
tenantRecordIdValueWithComma(prefix) ::= ""
CHECK_TENANT(prefix) ::= "1 = 1"

/* Override default create call to include secrets */
create() ::= <<
insert into  (
  
, 
, api_secret
, api_salt
)
values (
  
, 
, :apiSecret
, :apiSalt
)
;
>>

getByApiKey() ::= <<
select
  
from  t
where api_key = :apiKey
;
>>

getSecrets() ::= <<
select
  
, t.api_secret
, t.api_salt
from  t
where  = 
;
>>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy