Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Support syntax helper for "bulk insert with parameters" #147

Open
@mattrobenolt

Description

@mattrobenolt

A pattern that is a bit of a pain for us is doing anINSERT with multiple rows at once.

While we support explicitly doing something like:

execute("INSERT INTO x VALUES (?, ?, ?), (?, ?, ?)", [1, 2, 3, 4, 5, 6])

It puts the burden on the user to create all of the(?, ?, ?) placeholders.

An API similar to:

bulkinsert("INSERT INTO x VALUES", [[1, 2, 3], [4, 5, 6]])

would help utilize this without the client needing to construct all of the placeholders.

We could even just provide this as a separate function that's passed intoexecute() as just a "query builder" thing.

So something like:

execute(createBulkInsert("INSERT INTO x VALUES", [[1, 2, 3], [4, 5, 6]]))

AndcreateBulkInsert would return the SQL.

It's just all around a bit awkward to need to have one big flat list of all the parameters vs passing in more logical "rows".

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp