Skip to content

Incompatibilities to mysql2 / Missing Migration notices #306

@kinsi55

Description

@kinsi55

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions