提交 f225ac3c 编写于 作者: 梦境迷离's avatar 梦境迷离

fix

上级 e1a10d35
......@@ -39,7 +39,7 @@ class ResultSetTransformerMacro(override val c: whitebox.Context) extends Abstra
protected val packageName = q"_root_.org.bitlap.common.jdbc"
def applyImpl[T <: GenericRow: WeakTypeTag]: Expr[ResultSetTransformer[T]] = {
val className = classTypeName[T]
val className = classTypeName[T]
val genericTypeList = genericTypes[T]
val fieldValues = genericTypeList.zipWithIndex.map { case (tpe, i) =>
q"$valuesTermName($i).asInstanceOf[$tpe]"
......
......@@ -169,11 +169,11 @@ class WriterBuilderMacro(override val c: whitebox.Context) extends AbstractMacro
// scalafmt: { maxColumn = 400 }
private def fieldsToString[T: WeakTypeTag](innerVarTermName: TermName, customTrees: mutable.Map[String, Any]): List[Tree] = {
val clazzName = classTypeName[T]
val clazzName = classTypeName[T]
val fieldZipInformationList = fieldZipInformation[T]
val fieldNames = fieldZipInformationList.fieldNames
val indexTypes = fieldZipInformationList.fieldIndexTypeMapping
val indexByName = (i: Int) => TermName(fieldNames(i))
val fieldNames = fieldZipInformationList.fieldNames
val indexTypes = fieldZipInformationList.fieldIndexTypeMapping
val indexByName = (i: Int) => TermName(fieldNames(i))
indexTypes.map { indexType =>
val customFunction = () => q"${TermName(builderFunctionPrefix + fieldNames(indexType._1))}.apply($innerVarTermName.${indexByName(indexType._1)})"
indexType._2 match {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册