neisbut / EntityFramework.MemoryJoin

Extension for EntityFramework for joins to in-memory data
MIT License
56 stars 24 forks source link

Adds support for SQLite #15

Closed sebbe33 closed 4 years ago

sebbe33 commented 4 years ago

As described in Issue #14, the library is currently not compatible with SQLite. The issue is that SQLite doesn't support column aliasing in the FROM clause, you have to instead do it in a WITH clause. For example:

SELECT * FROM (WITH tempTable(col1, col2, col3) AS (VALUES (1, 2, 3)) SELECT * FROM tempTable)

This PR introduces support for SQLite by treating the creation of the in-memory table query differently for SQLite, as per the abovementioned restrictions.

It also adds an integration test project for validation SQL changes, and upgrades to EF Core version 3.1.3 (the latest at the time of writing).

The existing code has been validated using an Azure SQL DB, but not PostgreSQL.

neisbut commented 4 years ago

Hi @sebbe33, thanks a lot for this! Very appreciated! I will merge it soon. And sorry that I couldn't do it by my self due to some personal reasons.