git.iko.soy/rowtype-yoga/purescript-yoga-postgres
on main help sign in
Add string literal handling to JOIN condition parser
commitc4bbae5fd27a131c02bbbb0354306b9f0989ef8d authorMark <mark.eibes@gmail.com> dateSun 15 Feb 2026, 15:55 (8 months ago) parent9d0c818
1 file changed+33−4
src/Yoga/Postgres/Schema.purs+33−4
src/Yoga/Postgres/Schema.purs+33−4
@@ -1314,6 +1314,7 @@ else instance (FlushWhereWord acc currentType tables paramsIn currentType' param
13141314else instance (FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo ":" tail acc currentType tables paramsIn paramsOut
13151315else instance (FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "~" tail acc currentType tables paramsIn paramsOut
13161316else instance (FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "#" tail acc currentType tables paramsIn paramsOut
1317+else instance (FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "," tail acc currentType tables paramsIn paramsOut
13171318
13181319-- End of string: flush final word
13191320else instance
@@ -1431,7 +1432,9 @@ else instance
14311432class FlushWhereWordA :: Symbol -> Type -> Row (Row Type) -> RL.RowList Type -> Type -> RL.RowList Type -> Constraint
14321433class FlushWhereWordA word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut
14331434
1434−instance FlushWhereWordA "ANY" currentType tables paramsIn (Array currentType) paramsIn
1435+instance FlushWhereWordA "ABS" currentType tables paramsIn currentType paramsIn
1436+else instance FlushWhereWordA "abs" currentType tables paramsIn currentType paramsIn
1437+else instance FlushWhereWordA "ANY" currentType tables paramsIn (Array currentType) paramsIn
14351438else instance FlushWhereWordA "any" currentType tables paramsIn (Array currentType) paramsIn
14361439else instance FlushWhereWordA "ALL" currentType tables paramsIn (Array currentType) paramsIn
14371440else instance FlushWhereWordA "all" currentType tables paramsIn (Array currentType) paramsIn
@@ -1467,8 +1470,18 @@ class FlushWhereWordC word currentType tables paramsIn currentTypeOut paramsOut
14671470
14681471instance FlushWhereWordC "CAST" currentType tables paramsIn currentType paramsIn
14691472else instance FlushWhereWordC "cast" currentType tables paramsIn currentType paramsIn
1473+else instance FlushWhereWordC "CEIL" currentType tables paramsIn currentType paramsIn
1474+else instance FlushWhereWordC "ceil" currentType tables paramsIn currentType paramsIn
1475+else instance FlushWhereWordC "COALESCE" currentType tables paramsIn currentType paramsIn
1476+else instance FlushWhereWordC "coalesce" currentType tables paramsIn currentType paramsIn
1477+else instance FlushWhereWordC "CONCAT" currentType tables paramsIn currentType paramsIn
1478+else instance FlushWhereWordC "concat" currentType tables paramsIn currentType paramsIn
14701479else instance FlushWhereWordC "COUNT" currentType tables paramsIn Int paramsIn
14711480else instance FlushWhereWordC "count" currentType tables paramsIn Int paramsIn
1481+else instance FlushWhereWordC "CURRENT_DATE" currentType tables paramsIn currentType paramsIn
1482+else instance FlushWhereWordC "current_date" currentType tables paramsIn currentType paramsIn
1483+else instance FlushWhereWordC "CURRENT_TIMESTAMP" currentType tables paramsIn currentType paramsIn
1484+else instance FlushWhereWordC "current_timestamp" currentType tables paramsIn currentType paramsIn
14721485else instance
14731486 ( ResolveColumn word tables entry
14741487 , ExtractType entry typ
@@ -1504,6 +1517,8 @@ class FlushWhereWordF word currentType tables paramsIn currentTypeOut paramsOut
15041517
15051518instance FlushWhereWordF "FALSE" currentType tables paramsIn currentType paramsIn
15061519else instance FlushWhereWordF "false" currentType tables paramsIn currentType paramsIn
1520+else instance FlushWhereWordF "FLOOR" currentType tables paramsIn currentType paramsIn
1521+else instance FlushWhereWordF "floor" currentType tables paramsIn currentType paramsIn
15071522else instance
15081523 ( ResolveColumn word tables entry
15091524 , ExtractType entry typ
@@ -1542,8 +1557,14 @@ else instance
15421557class FlushWhereWordL :: Symbol -> Type -> Row (Row Type) -> RL.RowList Type -> Type -> RL.RowList Type -> Constraint
15431558class FlushWhereWordL word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut
15441559
1545−instance FlushWhereWordL "LIKE" currentType tables paramsIn currentType paramsIn
1560+instance FlushWhereWordL "LEAST" currentType tables paramsIn currentType paramsIn
1561+else instance FlushWhereWordL "least" currentType tables paramsIn currentType paramsIn
1562+else instance FlushWhereWordL "LENGTH" currentType tables paramsIn Int paramsIn
1563+else instance FlushWhereWordL "length" currentType tables paramsIn Int paramsIn
1564+else instance FlushWhereWordL "LIKE" currentType tables paramsIn currentType paramsIn
15461565else instance FlushWhereWordL "like" currentType tables paramsIn currentType paramsIn
1566+else instance FlushWhereWordL "LOWER" currentType tables paramsIn String paramsIn
1567+else instance FlushWhereWordL "lower" currentType tables paramsIn String paramsIn
15471568else instance
15481569 ( ResolveColumn word tables entry
15491570 , ExtractType entry typ
@@ -1570,8 +1591,12 @@ class FlushWhereWordN word currentType tables paramsIn currentTypeOut paramsOut
15701591
15711592instance FlushWhereWordN "NOT" currentType tables paramsIn currentType paramsIn -- unreachable (caught by FlushWhereWord directly) but included for self-containedness
15721593else instance FlushWhereWordN "not" currentType tables paramsIn currentType paramsIn
1594+else instance FlushWhereWordN "NOW" currentType tables paramsIn currentType paramsIn
1595+else instance FlushWhereWordN "now" currentType tables paramsIn currentType paramsIn
15731596else instance FlushWhereWordN "NULL" currentType tables paramsIn currentType paramsIn
15741597else instance FlushWhereWordN "null" currentType tables paramsIn currentType paramsIn
1598+else instance FlushWhereWordN "NULLIF" currentType tables paramsIn currentType paramsIn
1599+else instance FlushWhereWordN "nullif" currentType tables paramsIn currentType paramsIn
15751600else instance
15761601 ( ResolveColumn word tables entry
15771602 , ExtractType entry typ
@@ -1596,7 +1621,9 @@ else instance
15961621class FlushWhereWordT :: Symbol -> Type -> Row (Row Type) -> RL.RowList Type -> Type -> RL.RowList Type -> Constraint
15971622class FlushWhereWordT word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut
15981623
1599−instance FlushWhereWordT "TRUE" currentType tables paramsIn currentType paramsIn
1624+instance FlushWhereWordT "TRIM" currentType tables paramsIn String paramsIn
1625+else instance FlushWhereWordT "trim" currentType tables paramsIn String paramsIn
1626+else instance FlushWhereWordT "TRUE" currentType tables paramsIn currentType paramsIn
16001627else instance FlushWhereWordT "true" currentType tables paramsIn currentType paramsIn
16011628else instance FlushWhereWordT "text" currentType tables paramsIn currentType paramsIn
16021629else instance FlushWhereWordT "timestamptz" currentType tables paramsIn currentType paramsIn
@@ -1611,7 +1638,9 @@ else instance
16111638class FlushWhereWordU :: Symbol -> Type -> Row (Row Type) -> RL.RowList Type -> Type -> RL.RowList Type -> Constraint
16121639class FlushWhereWordU word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut
16131640
1614−instance FlushWhereWordU "uuid" currentType tables paramsIn currentType paramsIn
1641+instance FlushWhereWordU "UPPER" currentType tables paramsIn String paramsIn
1642+else instance FlushWhereWordU "upper" currentType tables paramsIn String paramsIn
1643+else instance FlushWhereWordU "uuid" currentType tables paramsIn currentType paramsIn
16151644else instance
16161645 ( ResolveColumn word tables entry
16171646 , ExtractType entry typ