{"repo":"patrickpissurno/sqlutils","free":true,"listed":false,"github":"https://github.com/patrickpissurno/sqlutils","clone":"git clone https://github.com/patrickpissurno/sqlutils.git","description":"Lightweight SQL helper methods that simplify stuff (MySQL and PostgreSQL)","language":"JavaScript","stars":15,"topics":["nodejs","sql","mysql","postgresql","utils","easy","helper","lightweight","orm"],"license":"MIT","category":"databases-storage","readme_excerpt":"sqlutils Lightweight SQL helper methods that simplify stuff (MySQL and PostgreSQL) sqlutils (for MySQL) is powered by sqlstring, the same library that powers mysql2. sqlutils (for PostgreSQL) is powered by pg-promise, one of the most popular PostgreSQL libraries for Node, with more than 3.1k stars and in active development. The aim of this library is to offer standard helper methods that behave in similar ways for PostgreSQL and MySQL. Install How to import helpers PostgreSQL MySQL escape(val) PostgreSQL MySQL format(statement, obj) PostgreSQL MySQL Some explanation about the third example: by using instead of as the key, you tell the formatter not to escape the string value (raw mode). This way you can combine powerful SQL subqueries with the simplicity of sqlutils. I recommend reading that example carefully. buildWhereFromQuery(queryObject) PostgreSQL MySQL transformer(rows, transformation) Do you like transformers? Then look no further. This is the new Transformer&trade; API. What does it do? It offers a declarative way to express how your query results should look like, then it does the magic for you. Sounds simple, right? You can check out the full documentation here. It will get you up and running quickly. Let's have a look: PostgreSQL and MySQL Easy! Now let's see something a bit more complex: PostgreSQL and MySQL See? Quite easy, right? And that's still just the tip of the iceberg. This little monster can tackle a whole lot of tasks, while still being simple and decla","default_branch":null,"files":null,"tree":[],"storefront":"/r/patrickpissurno","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/patrickpissurno/sqlutils/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."}