mongo-sql
mongo-sql copied to clipboard
An extensible SQL generation library for JavaScript with a focus on introspectibility
If the column name contains "regexp characters" the in->not in replacement fails.
## Problem The current implementation makes it impossible to implement the `$regex` conditional helper. From [the documentation](https://docs.mongodb.com/manual/reference/operator/query/regex/) : ``` { : { $regex: /pattern/, $options: '' } } { :...
It is nicely stated in the conflict helper that where doesn't need a table name, but it still gets it. https://github.com/goodybag/mongo-sql/blob/1351b48b3dc0b9db30b3cb0f223ee2f7713fb376/helpers/query/conflict.js#L69 If I try something like ``` { type: 'insert',...
``` javascript { type: 'insert', table: 'test', values: { jsonb_column: { type: 'I am not a function' } } } ``` Results in: ``` insert into "test" ("jsonb_column") values ((I...
 Likely related to failed requests visible in the Network Console tab: 
Something similar to this: ```javascript { type: 'select', table: 'mytable', joins: [ { target: 'mysecondtable', type: 'inner', on: { id: '$mytable.id$' }, columns: '*' }, ], } ``` Which would...
https://github.com/goodybag/mongo-sql/blob/master/docs/query-helpers.md#helper-order Here is documentation and there is written // select "users".* from "users" order by "order"."id" desc, "order"."name" asc { type: 'select' , table: 'users' // Object syntax is the...