From a79fbe427c2f7203271e40e3a47516a63f06eaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Er=20Galv=C3=A3o=20Abbott?= Date: Mon, 21 Jan 2019 14:34:25 -0200 Subject: [PATCH] Adding the JOIN_FULL_OUTER class constant, since there are DBMS' out there which can't handle an unqualified OUTER JOIN. An example of that can be found in PostgreSQL (See: https://www.postgresql.org/docs/11/sql-select.html). --- docs/book/sql.md | 3 ++- src/Sql/Join.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/book/sql.md b/docs/book/sql.md index 52f5ab8b43..f746c26ecc 100644 --- a/docs/book/sql.md +++ b/docs/book/sql.md @@ -117,6 +117,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface { const JOIN_INNER = 'inner'; const JOIN_OUTER = 'outer'; + const JOIN_FULL_OUTER = 'full outer'; const JOIN_LEFT = 'left'; const JOIN_RIGHT = 'right'; const SQL_STAR = '*'; @@ -180,7 +181,7 @@ $select->join( 'foo', // table name 'id = bar.id', // expression to join on (will be quoted by platform object before insertion), ['bar', 'baz'], // (optional) list of columns, same requirements as columns() above - $select::JOIN_OUTER // (optional), one of inner, outer, left, right also represented by constants in the API + $select::JOIN_OUTER // (optional), one of inner, outer, full outer, left, right also represented by constants in the API ); $select diff --git a/src/Sql/Join.php b/src/Sql/Join.php index 12e8599663..c57d878d13 100644 --- a/src/Sql/Join.php +++ b/src/Sql/Join.php @@ -26,6 +26,7 @@ class Join implements Iterator, Countable { const JOIN_INNER = 'inner'; const JOIN_OUTER = 'outer'; + const JOIN_FULL_OUTER = 'full outer'; const JOIN_LEFT = 'left'; const JOIN_RIGHT = 'right'; const JOIN_RIGHT_OUTER = 'right outer';