R/find_neighbors.R

Defines functions find_neighbors

Documented in find_neighbors

#' Generates the SQL to find the neighbors for a node in the database
#'
#' @param identifier The identifier for the node
#' @return A SQL statement to find the neighbors
#' @export
find_neighbors <- function(identifier) {
  paste0("SELECT * FROM edges WHERE source = \"", identifier, "\" OR target = \"", identifier, "\";")
}

Try the simplegraphdb package in your browser

Any scripts or data that you put into this service are public.

simplegraphdb documentation built on March 12, 2021, 5:05 p.m.