oguimbal / pg-mem

An in memory postgres DB instance for your unit tests
MIT License
2.01k stars 98 forks source link

SELECT FOR UPDATE is not working #117

Open ghost opened 3 years ago

ghost commented 3 years ago

Is there any plan to support different isolation levels? If not this is probably easy to add :)

oguimbal commented 3 years ago

Given that pg-mem does not support concurrent transactions, supporting select for update has no meaning. (if two transactions run il parallel, the last one to commit will fail).

pg-mem does not intend to reimplement a full-blown pg instance, only what's sufficient to write tests.

So it could make sense to implement select for update, but only to ignore it and implement it as a regular select

ghost commented 3 years ago

With the changes from pgsql-ast-parser this issue should be resolved. Any plans to publish a new npm version soon?