git.iko.soy/rowtype-yoga/purescript-yoga-postgres
on main help sign in
Add into combinator with type-level guard against select/delete
commitef97823ec872cd1fe06819aba6fc1d6799c3269c authorMark <mark.eibes@gmail.com> dateTue 3 Mar 2026, 13:09 (7 months ago) parentbfa4934
1 file changed+9
src/Yoga/Postgres/Schema.purs+9
src/Yoga/Postgres/Schema.purs+9
@@ -903,6 +903,15 @@ else instance
903903 ) =>
904904 ParseSelectHandleAS "as" afterKeyword colRef tables accRL outRL
905905
906+-- Bare alias (no AS keyword): "name n" means "name AS n"
907+else instance
908+ ( ResolveColumn colRef tables entry
909+ , ExtractType entry typ
910+ , SkipSpaces afterKeyword rest
911+ , ParseSelectExpectEnd rest tables (RL.Cons keyword typ accRL) outRL
912+ ) =>
913+ ParseSelectHandleAS keyword afterKeyword colRef tables accRL outRL
914+
906915class ParseSelectExpectEnd :: Symbol -> Row (Row Type) -> RL.RowList Type -> RL.RowList Type -> Constraint
907916class ParseSelectExpectEnd sym tables accRL outRL | sym tables accRL -> outRL
908917