Skip to content

Commit eef618f

Browse files
committed
reorder checks + add check for returning_cols
1 parent 04cf071 commit eef618f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/backend-mssql.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,14 @@ simulate_mssql <- function(version = "15.0") {
107107
conflict = c("error", "ignore"),
108108
returning_cols = NULL,
109109
method = NULL) {
110+
# https://stackoverflow.com/questions/25969/insert-into-values-select-from
111+
conflict <- rows_check_conflict(conflict)
112+
113+
check_character(returning_cols, allow_null = TRUE)
114+
110115
check_string(method, allow_null = TRUE)
111116
method <- method %||% "where_not_exists"
112117
arg_match(method, "where_not_exists", error_arg = "method")
113-
# https://stackoverflow.com/questions/25969/insert-into-values-select-from
114-
conflict <- rows_check_conflict(conflict)
115118

116119
parts <- rows_insert_prep(con, table, from, insert_cols, by, lvl = 0)
117120

0 commit comments

Comments
 (0)