MySQL query
Can this module build a MySQL query?
example: { type: 'select', table: 'some_table', where: { id: { '$gt': 1 } } }
pg: { text: 'select "some_table".* from "some_table" where "some_table"."id" > $1', values: [ 1 ] }
but can i receive MySQL query?
mysql: {
text: 'select some_table.* from some_table where some_table.id > ?',
values: [ 1 ]
}
if not .. can i replace $n values in query? thanks for help
It currently cannot. Adding the functionality would actually be fairly easy, though.
Please see https://github.com/goodybag/mongo-sql/issues/119
I also want to say there's a way to put MySQL into a mode where it accepts the $1, $2, ... style prepared statement parameters, but I can't find it. Maybe I'm imagining that.
Hope this helps.
I'll keep this open and think about implementing a MySQL syntax this weekend.
thans, this help!
This is great SQL-builder! MySQL support will be amazing!