Skip to content

Test multi-row binding #96

@krlmlr

Description

@krlmlr

Aims:

  • Good performance for multi-row binding if supported by the driver
  • Seamless fallback support possible if the driver doesn't support binding
  • No new methods, so that it works with DBI 0.5

Means:

  • dbBind() accepts multi-row input
  • Query via dbSendQuery()
    • Need to call dbFetch()
    • dbFetch() always returns a data frame
    • Optional group ID in first column
      • group.column argument: name, NULL or logical(1), default: NULL
    • How to fetch a single group, and then advance to the next?
      • all.groups argument: logical, default TRUE
    • How to return row counts for each parameter set?
      • all.groups argument to dbGetRowCount(): logical, default TRUE
  • Statement via dbSendStatement()
    • Executed immediately upon dbBind()
    • dbFetch() is a no-op, returns NULL (for the fallback)
    • Rows affected are accumulated
    • dbGetRowsAffected() returns single value
    • How to return rows affected for each parameter set?
      • all.groups argument to dbGetRowsAffected(): logical, default TRUE
  • Shortcuts via params argument to dbSendQuery() and dbSendStatement()

Metadata

Metadata

Assignees

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