select count(*)
from lang_message_keys
where package_key = :package_key
and message_key = :message_key
select count(*)
from lang_messages
where package_key = :package_key
and message_key = :message_key
insert into lang_message_keys
(message_key, package_key)
values
(:message_key, :package_key)
update lang_messages
set [join $set_clauses ", "]
where locale = :locale
and package_key = :package_key
and message_key = :message_key
insert into lang_messages ([join $col_clauses ", "])
values ([join $val_clauses ", "])
select locale, package_key, message_key, message
from lang_messages
$package_where_clause
update lang_message_keys
set description = null
where message_key = :message_key
and package_key = :package_key