on master help sign in
Fixed #99
commit759a2cbf1307cc18d6fe22e1492a5ea6a7bf6a88 authoriko <ilyakooo0@gmail.com> dateSat 11 May 2019, 00:09 (7 years ago) parentcc87e92
1 file changed+5−3
denis/src/Data/Query.hs+5−3
denis/src/Data/Query.hs+5−3
@@ -517,7 +517,7 @@ getFacultySearchResultQ = selectStar (from (table #faculties) &
517517 #facultyPath,
518518 #facultyCampusName,
519519 (arrayToText #facultyTags)])
520− query = tsQuery (param @1)
520+ query = tsQuery "russian" (param @1)
521521
522522tsRankCd
523523 :: Expression schema from grouping params ('NotNull 'PGtext)
@@ -534,9 +534,11 @@ tsVector lang x = UnsafeExpression $
534534 "to_tsvector" <> parenthesized (commaSeparated [singleQuotedUtf8 lang, renderExpression x])
535535
536536tsQuery
537− :: Expression schema from grouping params ('NotNull 'PGtext)
537+ :: ByteString -- ^ Language
538+ -> Expression schema from grouping params ('NotNull 'PGtext)
538539 -> Expression schema from grouping params ('NotNull 'PGtext)
539−tsQuery = unsafeFunction "to_tsquery"
540+tsQuery lang x = UnsafeExpression $
541+ "to_tsquery" <> parenthesized (commaSeparated [singleQuotedUtf8 lang, renderExpression x])
540542
541543arrayToText
542544 :: Expression schema from grouping params ('NotNull ('PGvararray ('NotNull 'PGtext)))