duckdb-r
duckdb-r copied to clipboard
Expose code to determine whether statement is fetchable
I am processing SQL statements and I don't know ahead of time whether the statement should be run using dbExecute
or dbGetQuery
so I am currently using dbSendQuery
followed by
# based on code in dbFetch__duckdb_result.R
nofetch <- res@stmt_lst$type != "SELECT" &&
res@stmt_lst$type != "RELATION" &&
res@stmt_lst$return_type != "QUERY_RESULT"
which is then tested to determine whether dbFetch
should be run. Could you expose this so I can get that ugly line out of my code? Alternately some other idea.