BundleSqlDao.sql.stg

61 lines | 779 B Blame History Raw Download
group BundleSqlDao;

insertBundle() ::= <<
    insert into bundles (
      id
      , start_dt
      , name
      , account_id
    ) values (
      :id
      , :start_dt
      , :name
      , :account_id
    );
>>

removeBundle(id) ::= <<
    delete from bundles
    where
      id = :id
    ;
>>

getBundleFromId(id) ::= <<
    select
      id
      , start_dt
      , name
      , account_id
    from bundles
    where
      id = :id
    ;
>>

getBundleFromKey(name) ::= <<
    select
      id
      , start_dt
      , name
      , account_id
    from bundles
    where
      name = :name
    ;
>>


getBundleFromAccount(account_id) ::= <<
    select
      id
      , start_dt
      , name
      , account_id
    from bundles
    where
      account_id = :account_id
    ;
>>