Skip to content

Commit

Permalink
fix #327 - Null string-literals not working within Arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
tminglei committed Feb 7, 2017
1 parent fad3c2b commit 5f67866
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ object PgTokenHelper {
///
def isMarkRequired(token: Token): Boolean = token match {
case g: GroupToken => true
case Chunk(v) => v.trim.isEmpty || v.find(MARK_REQUIRED_CHAR_LIST.contains).isDefined
case Chunk(v) => v.trim.isEmpty || "NULL".equalsIgnoreCase(v) || v.find(MARK_REQUIRED_CHAR_LIST.contains).isDefined
case _ => false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PgArraySupportSuite extends FunSuite {
val uuid2 = UUID.randomUUID()
val uuid3 = UUID.randomUUID()

val testRec1 = ArrayBean(33L, List(101, 102, 103), Buffer(1L, 3L, 5L, 7L), List(1,7), List("robert}; drop table students--"),
val testRec1 = ArrayBean(33L, List(101, 102, 103), Buffer(1L, 3L, 5L, 7L), List(1,7), List("robert}; drop table students--", "NULL"),
Some(Vector("str1", "str3", "", " ")), List(uuid1, uuid2), List(Institution(113)), None)
val testRec2 = ArrayBean(37L, List(101, 103), Buffer(11L, 31L, 5L), Nil, List(""),
Some(Vector("str11", "str3")), List(uuid1, uuid2, uuid3), List(Institution(579)), Some(List(MarketFinancialProduct("product1"))))
Expand Down

0 comments on commit 5f67866

Please sign in to comment.