duckdb-r icon indicating copy to clipboard operation
duckdb-r copied to clipboard

Expose code to determine whether statement is fetchable

Open ggrothendieck opened this issue 8 months ago • 2 comments

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.

ggrothendieck avatar May 26 '24 13:05 ggrothendieck