R/formatStatement.R

formatStatement <- function (format) {
  function (statement) {
    if (format == 'compact') {
      multiline <- FALSE
    } else if (format == 'smart') {
      multiline <- length(statement) > 3L
    } else {
      multiline <- TRUE
    }
    sqlCommaList(statement, multiline)  
  }
}
cttobin/sqlr documentation built on May 14, 2019, 12:42 p.m.