library(glue)
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
colnames(iris) <- gsub("[.]", "_", tolower(colnames(iris)))
DBI::dbWriteTable(con, "iris", iris)
oper <- "<"
query <- glue_sql("SELECT * FROM iris WHERE sepal_length {`oper`} sepal_width", .con = con)
DBI::dbGetQuery(con, query)
#> Error in result_create(conn@ptr, statement): near "`<`": syntax error
Created on 2019-02-12 by the reprex package (v0.2.1)