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

com.ning.billing.account.dao.AccountSqlDao.sql.stg Maven / Gradle / Ivy

group AccountDaoSql;

accountFields(prefix) ::= <<
    id,
    external_key,
    email,
    name,
    first_name_length,
    currency,
    billing_cycle_day,
    payment_provider_name,
    time_zone, 
    locale,
    address1, 
    address2, 
    company_name, 
    city, 
	state_or_province, 
    country, 
    postal_code,
    phone,	
    created_dt,
    updated_dt
>>


create() ::= <<
    INSERT INTO accounts
      ()
    VALUES
      (:id, :externalKey, :email, :name, :firstNameLength, :currency, :billingCycleDay,
      :paymentProviderName, :timeZone, :locale,
      :address1, :address2, :companyName, :city, :stateOrProvince, :country, :postalCode, :phone,
      :createdDate, :updatedDate);
>>

update() ::= <<
    UPDATE accounts
    SET external_key = :externalKey, email = :email, name = :name, first_name_length = :firstNameLength,
        currency = :currency, billing_cycle_day = :billingCycleDay, payment_provider_name = :paymentProviderName,
        time_zone = :timeZone, locale = :locale,
        address1 = :address1, address2 = :address2, company_name = :companyName, city = :city, state_or_province = :stateOrProvince,
        country = :country, postal_code = :postalCode, phone = :phone,
        updated_dt = NOW()
    WHERE id = :id;
>>

deleteByKey() ::= <<
    DELETE FROM accounts
    WHERE external_key = :externalKey;
>>


getAccountByKey() ::= <<
    select 
    from accounts
    where external_key = :externalKey;
>>

getById() ::= <<
    SELECT 
      FROM accounts
     WHERE id = :id;
>>

get() ::= <<
    SELECT 
      FROM accounts;
>>

getIdFromKey() ::= <<
    SELECT id
      FROM accounts
     WHERE external_key = :externalKey;
>>

test() ::= <<
    SELECT 1 FROM accounts;
>>
;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy