DB Query file

Related Files

[ hide source ] | [ make this the default ]

File Contents

<?xml version="1.0"?>

  <fullquery name="lang::catalog::export.update_sync_time">
      update lang_messages
      set sync_time = current_timestamp
      where package_key = :package_key
      and locale = :locale
  <fullquery name="lang::catalog::uninitialized_packages.select_uninitialized">
      select package_key
      from   apm_package_types
      where  exists (select 1 
                     from   apm_package_versions
                     where  package_key = apm_package_types.package_key
                        and installed_p = 't'
                        and enabled_p = 't')
       and not exists (select 1
                       from lang_message_keys
                       where package_key = apm_package_types.package_key)

  <fullquery name="lang::catalog::export.get_locales_for_package">
        select distinct locale
        from lang_messages
        where package_key = :package_key

  <fullquery name="lang::catalog::all_messages_for_package_and_locale.get_messages">
        select lm.message_key, 
        from   lang_messages lm,
               lang_message_keys lmk
        where  lm.message_key = lmk.message_key
        and    lm.package_key = lmk.package_key
        and    lm.package_key = :package_key
        and    lm.locale = :locale
        and    lm.deleted_p = 'f'

  <fullquery name="lang::catalog::translate.get_untranslated_messages">
      select message_key,
      from   lang_messages lm1 
      where  locale = :default_locale
      and    not exists (select message_key, package_key
                         from   lang_messages lm2 
                         where  locale != :default_locale
                         and    lm1.message_key = lm2.message_key
                         and    lm1.package_key = lm2.package_key)