Showing 1 of 6 files from the diff.

@@ -8,6 +8,7 @@
Loading
8 8
#' * Uses non-standard `LOG()` function
9 9
#' * Date-time extraction functions from lubridate
10 10
#' * Custom median translation
11 +
#' * Right and full joins are simulated using left joins
11 12
#'
12 13
#' Use `simulate_sqlite()` with `lazy_frame()` to see simulated SQL without
13 14
#' converting to live access database.
@@ -135,4 +136,33 @@
Loading
135 136
  build_sql(x, " IS ", y, con = con)
136 137
}
137 138
139 +
#' @export
140 +
sql_query_join.SQLiteConnection <- function(con, x, y, vars, type = "inner", by = NULL, na_matches = FALSE, ...) {
141 +
  # workaround as SQLite doesn't support FULL OUTER JOIN and RIGHT JOIN
142 +
  # see: https://www.sqlite.org/omitted.html
143 +
144 +
  # Careful: in the right join resp. the second join in the full join do not
145 +
  # name `y` LHS and `x` RHS as it messes up the select query!
146 +
147 +
  if (type == "full") {
148 +
    join_sql <- build_sql(
149 +
      sql_query_join(con, x, y, vars, type = "left", by = by, na_matches = na_matches, ...),
150 +
      "UNION\n",
151 +
      sql_query_join(con, y, x, vars, type = "left", by = by, na_matches = na_matches, ...),
152 +
      con = con
153 +
    )
154 +
155 +
    sql_query_select(
156 +
      con,
157 +
      select = ident(vars$alias),
158 +
      from = sql_subquery(con, join_sql),
159 +
      subquery = TRUE
160 +
    )
161 +
  } else if (type == "right") {
162 +
    sql_query_join(con, y, x, vars, type = "left", by = by, na_matches = na_matches, ...)
163 +
  } else {
164 +
    NextMethod()
165 +
  }
166 +
}
167 +
138 168
globalVariables(c("datetime", "NUMERIC", "REAL"))
Files Coverage
R 86.42%
Project Totals (73 files) 86.42%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading