-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
I've been using mysql2 so far and decided to give this project a try
namedPlaceholders
setting namedPlaceholders to true in the connection has a different behaviour to mysql2:
In mysql2 this is an implicit opt-in: Setting to to true still allows you to use ? placeholders
Bulk insert via query()
In Mysql2 you can INSERT INTO foo(bar) VALUES ? and then pass [[["baz"],["qux"]]] as the value and it will automatically destructure that to a bulk insert
Insert from Object
In Mysql2 you can INSERT INTO foo SET ? and then pass {bar: "baz"} as the value which will then automatically get destructured to SET bar = "baz"
These things do not work in Mariadb, at least not 1:1. namedPlaceholders isnt a big deal, #2 ofc has the batch() replacement, having insert from object back tho would be great :D
zefir-git
Metadata
Metadata
Assignees
Labels
No labels