Skip to content

Commit

Permalink
Added request_query (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasPietzschmann authored Oct 1, 2024
1 parent 2b00953 commit 6da7730
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export(install_flowr)
export(install_node)
export(request_file_analysis)
export(request_lineage)
export(request_query)
export(request_repl)
export(request_slice)
export(send_request)
Expand Down
22 changes: 22 additions & 0 deletions R/query.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#' Sends a ["request-query"](https://github.com/flowr-analysis/flowr/wiki/Interface#the-query-request) request
#'
#' @param con The connection to the server
#' @param filetoken The filetoken of the file to be sliced
#' (retrieved by a previous "file-analysis" request)
#' @param query The query to be executed
#' @param id The id of the request
#' @return A list containing the id and the response
#'
#' @seealso [request_file_analysis()]
#' @seealso [connect()]
#'
#' @export
request_query <- function(con, filetoken, query, id = get_new_id()) {
request <- list(
type = "request-query",
id = id,
filetoken = filetoken,
query = I(query)
)
return(send_request_handle_response(con, request))
}
29 changes: 29 additions & 0 deletions man/request_query.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6da7730

Please sign in to comment.