Repository navigation
Conversation
|
Hey @SkyDevLab, are you still working on this? dotnet/efcore#39100 is merged now, so this can be built against main. |
|
Hey @omri-klein-semperis, yes, definitely still on it! Congrats on getting dotnet/efcore#39100 merged! Now that the core abstractions have landed in EF Core main, I'm rebasing this against upstream and aligning with the latest merged changes. I'll push an updated commit shortly. |
82d243d to
38e9f41
Compare
38e9f41 to
485e1e7
Compare
|
@omri-klein-semperis Rebased Note that |
Description
This draft PR implements PostgreSQL provider support for the experimental
ExecuteMerge/ upsert feature tracking dotnet/efcore#4526 and complementing the experimental SQLite implementation in dotnet/efcore#39100.Key Additions
NpgsqlQuerySqlGenerator:MergeColumnReferenceExpressionto emitEXCLUDED."column"for incoming values and delimited identifiers for existing values.VisitMerge(MergeExpression)lowering toINSERT ... ON CONFLICT (...) DO UPDATE / DO NOTHINGwith optionalRETURNINGclause.WHERE FALSE(instead of SQLite'sWHERE 0) for empty source row collections to comply with PostgreSQL's strict boolean requirement.NpgsqlQueryableMethodTranslatingExpressionVisitor:TranslateExecuteMergeto validate tableRETURNINGclause settings and guard against unsupported engines (Amazon Redshift).ExecuteMergeNpgsqlFixtureandExecuteMergeNpgsqlTestinheriting fromExecuteMergeRelationalTestBase.