Skip to content

Commit

Permalink
Merge pull request #163 from gemini-hlsw/topic/doobie-advanced-type-n…
Browse files Browse the repository at this point in the history
…ames

Attempt to extract doobie Put.Advanced type name
  • Loading branch information
milessabin authored Aug 11, 2021
2 parents cd02836 + 6f523fd commit 60e46b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/doobie/src/main/scala/DoobieMapping.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ abstract class DoobieMapping[F[_]: Sync](
case Null => Some("NULL")
case Numeric => Some("NUMERIC")
case NVarChar => Some("NVARCHAR")
case Other => Some("OTHER")
case Real => Some("REAL")
case Ref => Some("REF")
case RefCursor => Some("REF CURSOR")
Expand All @@ -116,6 +115,13 @@ abstract class DoobieMapping[F[_]: Sync](
case TinyInt => Some("TINYINT")
case VarBinary => Some("VARBINARY")
case VarChar => Some("VARCHAR")
case Other =>
codec._1.put match {
case adv: Put.Advanced[_] =>
Some(adv.schemaTypes.head)
case _ => None
}

case _ => None
}
}
Expand Down

0 comments on commit 60e46b1

Please sign in to comment.