mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 03:09:33 +02:00
Add activity reporting SQL query generation code
This allows us to have a modular view of all tables used in activity reporting, to facilitate generating reports in BigQuery. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=161849007
This commit is contained in:
parent
2521409e39
commit
4887811fc3
17 changed files with 743 additions and 1 deletions
|
@ -14,8 +14,11 @@
|
|||
|
||||
package google.registry.reporting;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.io.ByteSource;
|
||||
import com.google.common.io.Resources;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
/** Utility class providing easy access to contents of the {@code testdata/} directory. */
|
||||
|
@ -26,7 +29,12 @@ public final class ReportingTestData {
|
|||
return Resources.asByteSource(getUrl(filename));
|
||||
}
|
||||
|
||||
private static URL getUrl(String filename) {
|
||||
/** Returns a {@link String} from a file in the {@code reporting/testdata/} directory. */
|
||||
public static String getString(String filename) throws IOException {
|
||||
return Resources.asCharSource(getUrl(filename), UTF_8).read();
|
||||
}
|
||||
|
||||
private static URL getUrl(String filename) {
|
||||
return Resources.getResource(ReportingTestData.class, "testdata/" + filename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue