IAccountDaoSql.sql.stg

39 lines | 804 B Blame History Raw Download
group IAccountDaoSql;

insertAccount() ::= <<
    insert into accounts (id, external_key, email, name, phone, currency)
    values (:id, :externalKey, :email, :name, :phone, :currency);
>>

updateAccount() ::= <<
    update accounts
    set external_key = :externalKey, email = :email, name = :name, phone = :phone, currency = :currency
    where id = :id;
>>

getAccountByKey() ::= <<
    select id, external_key, email, name, phone, currency
    from accounts
    where
      external_key = :externalKey
    ;
>>

getAccountById() ::= <<
    select id, external_key, email, name, phone, currency
    from accounts
    where
      id = :id
    ;
>>

getAccounts() ::= <<
    select id, external_key, email, name, phone, currency
    from accounts
    ;
>>

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