in src/main/scala/com/spotify/scio/BigQueryTypeInjector.scala [72:99]
private def fetchExtraBQTypeCompanionMethods(source: ScTypeDefinition, c: ScClass): String = {
val annotation = bqAnnotation(c).getOrElse("")
Log.debug(s"Found $annotation in ${source.getQualifiedNameForDebugger}")
annotation match {
case a if a.contains(FromQuery) =>
val simple = """
|def queryRaw: _root_.java.lang.String = ???
|""".stripMargin
bqQuerySignature(c)
.map { params =>
simple + s"""
|def queryAsSource($params): _root_.com.spotify.scio.bigquery.Query = ???
|""".stripMargin
}
.getOrElse(simple)
case a if a.contains(FromTable) =>
"def table: _root_.java.lang.String = ???"
case a if a.contains(FromStorage) =>
"""
|def table: _root_.java.lang.String = ???
|def selectedFields: _root_.scala.List[_root_.java.lang.String] = ???
|def rowRestriction: _root_.java.lang.String = ???
""".stripMargin
case _ => ""
}
}