"ppx_pgsql's nullability heuristic has failed" for outer joins
For example if we have 2 tables:
CREATE TABLE authors (id serial PRIMARY KEY, name varchar(255) NOT NULL);
INSERT INTO authors (id, name) VALUES (1, 'John Doe');
CREATE TABLE books (id serial PRIMARY KEY, title varchar(255) NOT NULL, author int NOT NULL REFERENCES authors(id) ON DELETE CASCADE);
Following query will have type string * string instead of string * (string option):
[%sqlf {|
SELECT
authors.name,
books.title
FROM authors
LEFT OUTER JOIN books ON books.author = authors.id
|}]
Because books.title is NOT NULL, but author without any book will cause nullability heuristic has failed
May be there is a way to advice nullability for ppx_pgsql?
"ppx_pgsql's nullability heuristic has failed" for outer joins
For example if we have 2 tables:
Following query will have type
string * stringinstead ofstring * (string option):Because books.title is
NOT NULL, but author without any book will causenullability heuristic has failedMay be there is a way to advice nullability for ppx_pgsql?