Details
-
Technical task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The SQL standard defines the LATERAL keyword, which can be found on
https://mariadb.com/kb/en/select-statement/
LATERAL combined with joins are very useful, because you can reference columns in the left hand side from the right hand side. A good use case is the following. Let's say you have Posts and Comments and you want the first three comments for each post.
SELECT * FROM Posts CROSS JOIN LATERAL (SELECT * FROM Comments WHERE Comments.PostID = Posts.ID LIMIT 3)
That works in PostgreSQL. SQL Server instead has APPLY which is similar.
If this will be supported, Entity Framework will work much better with MariaDB. EF expects that the database has support for these kind of queries, so some queries make the EF provider throw an exception when used with MySQL/MariaDB.
For example:
http://stackoverflow.com/questions/11389050/linq-filterling-result
http://stackoverflow.com/questions/14157877/exception-after-installation-of-net-framework-4-5-using-entity-framework-and-my
http://forums.devart.com/viewtopic.php?t=18989
Both Oracle and PostgreSQL has recently implemented support. MariaDB should too