mirror of
https://github.com/google/nomulus
synced 2026-09-18 22:14:23 +00: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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user