group BusinessSubscriptionTransitionField;

getFieldsForBusinessSubscriptionTransition(external_key) ::=<<
select
  bundle_id
, external_key
, account_key
, name
, value
from bst_fields
where external_key = :external_key
;
>>

addField(bundle_id, external_key, name, value) ::=<<
insert into bst_fields (
  bundle_id
, external_key
, account_key
, name
, value
) values (
  :bundle_id
, :external_key
, :account_key
, :name
, :value
);
>>

removeField(bundle_id, name) ::= <<
delete from bst_fields where bundle_id = :bundle_id and name = :name;
>>

test() ::= <<
select 1 from bst_fields;
>>
