Any plans? If not, would you recommend @langpavel's node-pg-async? (I saw you two debating in another project's issues.)
It already works via Babel, plus the library supports ES6 generators. What else is missing? 馃槈
As for node-pg-async, I don't see the point of it. It offers little from the vast variety of features this library has.
Haha.. My library is tiny but powerful. It offers you template strings. Difference is, you escaping input variables but I'm passing them to pg library. It is better do less..
@langpavel two reasons why template strings are not suitable for query formatting:
1. Most of data exchanged between the server and the client is in the form of arrays of values, objects and arrays of objects - all used implicitly, not explicitly like variables in the current scope.
Template strings require formatted data to be always visible within the current scope, which requires additional code for injecting indirect data into the scope before the query can be formatted, resulting in a lot of duplicate code, and preventing the separation of concerns where a query can be fully detached from the data.
2. Template strings are not customizable, they are limited to the syntax of ${variable}. Query formatting requires support for many formatting filters.
This library supports a number of formatting filters - all highly demanded and used everywhere. Examples: ^, ~, #, :name, :json, :csv, :value. These are essential, and one cannot write proper query formatting without such filters.
You are not right. Look at my code and then you can make assumptions. My escaping is better then yours.
Btw escaping inside library is reason why I don't use your library and write my own. I know that my library is used by real projects with thousands of requests and it works well because it is tiny and just works
@langpavel Now that's just trolling. I'm locking the conversation, enough of your nonsense.
Most helpful comment
@langpavel two reasons why template strings are not suitable for query formatting:
1. Most of data exchanged between the server and the client is in the form of arrays of values, objects and arrays of objects - all used implicitly, not explicitly like variables in the current scope.
Template strings require formatted data to be always visible within the current scope, which requires additional code for injecting indirect data into the scope before the query can be formatted, resulting in a lot of duplicate code, and preventing the separation of concerns where a query can be fully detached from the data.
2. Template strings are not customizable, they are limited to the syntax of
${variable}. Query formatting requires support for many formatting filters.This library supports a number of formatting filters - all highly demanded and used everywhere. Examples:
^,~,#,:name,:json,:csv,:value. These are essential, and one cannot write proper query formatting without such filters.