{"repo":"oguimbal/pg-mem","free":true,"listed":false,"github":"https://github.com/oguimbal/pg-mem","clone":"git clone https://github.com/oguimbal/pg-mem.git","description":"An in memory postgres DB instance for your unit tests","language":"TypeScript","stars":2360,"topics":["hacktoberfest","pg-promise","typeorm","node-postgres","pg-mem","postgresql","typescript","unit-testing","unit-tests","nodejs"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-mem is an experimental in-memory emulation of a postgres database. ❤ It works both in Node or in the browser. ⭐ this repo if you like this package, it helps to motivate me :) 👉 See it in action with pg-mem playground - Usage - Features - Libraries adapters - Inspection - Development - FAQ 📐 Usage Using Node.js As always, it starts with an: Then, assuming you're using something like webpack, if you're targeting a browser: Using Deno Pretty straightforward :) Only use the SQL syntax parser ❤ Head to the pgsql-ast-parser repo ⚠ Disclaimer The sql syntax parser is home-made. Which means that some features are not implemented, and will be considered as invalid syntaxes. This lib is quite new, so forgive it if some obvious pg syntax is not supported ! ... And open an issue if you feel like a feature should be implemented :) Moreover, even if I wrote hundreds of tests, keep in mind that this implementation is a best effort to replicate PG. Keep an eye on your query results if you perform complex queries. Please file issues if some results seem incoherent with what should be returned. Finally, I invite you to read the below section to have an idea of you can or cannot do. 🔍 Features Rollback to a previous state pg-mem uses immutable data structures (here and here), which means that you can have restore points for free! This is super useful if you intend to use pg-mem to mock your database for unit tests. You could: 1. Create your schema only once (which could be a heavy operati","default_branch":null,"files":null,"tree":[],"storefront":"/r/oguimbal","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oguimbal/pg-mem/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}