mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
mv com/google/domain/registry google/registry
This change renames directories in preparation for the great package rename. The repository is now in a broken state because the code itself hasn't been updated. However this should ensure that git correctly preserves history for each file.
This commit is contained in:
parent
a41677aea1
commit
5012893c1d
2396 changed files with 0 additions and 0 deletions
38
java/google/registry/tools/sql/credit_data_view.sql
Normal file
38
java/google/registry/tools/sql/credit_data_view.sql
Normal file
|
@ -0,0 +1,38 @@
|
|||
-- Credit Data View SQL
|
||||
--
|
||||
-- This query post-processes RegistrarCredit entities and joins them to the
|
||||
-- corresponding owning Registrar entities. The join is mostly a no-op, but
|
||||
-- it does ensure that if extracting the registrar parent from a credit fails
|
||||
-- then this view will indicate that by showing the registrar ID as null.
|
||||
-- TODO(b/19031915): add optional sanity-checking for that type of invariant.
|
||||
SELECT
|
||||
Registrar.registrarId AS registrarId,
|
||||
RegistrarCredit.__key__.id AS creditId,
|
||||
RegistrarCredit.type AS type,
|
||||
CreditType.priority AS typePriority,
|
||||
creationTime,
|
||||
currency,
|
||||
description,
|
||||
tld,
|
||||
FROM (
|
||||
SELECT
|
||||
*,
|
||||
REGEXP_EXTRACT(__key__.path, '"Registrar", "(.+?)"') AS registrarId
|
||||
FROM
|
||||
[%SOURCE_DATASET%.RegistrarCredit]
|
||||
) AS RegistrarCredit
|
||||
LEFT JOIN
|
||||
(SELECT registrarId FROM [%DEST_DATASET%.RegistrarData]) AS Registrar
|
||||
ON
|
||||
RegistrarCredit.registrarId = Registrar.registrarId
|
||||
LEFT JOIN (
|
||||
-- TODO(b/19031546): Generate this table from the CreditType enum.
|
||||
SELECT * FROM
|
||||
(SELECT 'AUCTION' AS type, 1 AS priority),
|
||||
(SELECT 'PROMOTION' AS type, 2 AS priority),
|
||||
) AS CreditType
|
||||
ON
|
||||
RegistrarCredit.type = CreditType.type
|
||||
ORDER BY
|
||||
creationTime,
|
||||
creditId
|
Loading…
Add table
Add a link
Reference in a new issue