Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RedisGraph

Hierarchy

  • Module
    • RedisGraph

Index

Constructors

  • new RedisGraph(clusterNodes: ClusterNode[], moduleOptions?: RedisModuleOptions, clusterOptions?: ClusterOptions): RedisGraph
  • new RedisGraph(redisOptions: RedisOptions, moduleOptions?: RedisModuleOptions): RedisGraph
  • Initializing the module object

    Parameters

    • clusterNodes: ClusterNode[]

      The nodes of the cluster

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    • Optional clusterOptions: ClusterOptions

      The options of the clusters

    Returns RedisGraph

  • Initializing the module object

    Parameters

    • redisOptions: RedisOptions

      The options of the redis database

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    Returns RedisGraph

Properties

cluster: Cluster
clusterNodes: ClusterNode[]
clusterOptions: ClusterOptions
graphCommander: GraphCommander = ...
isHandleError: boolean
name: string
redis: Redis
redisOptions: RedisOptions
returnRawResponse: boolean
showDebugLogs: boolean

Methods

  • config(commandType: "GET" | "SET" | "HELP", option: string, value?: string): Promise<string | number | GraphConfigInfo>
  • Retrieves, describes and sets runtime configuration options

    Parameters

    • commandType: "GET" | "SET" | "HELP"
    • option: string

      The option

    • Optional value: string

      In case of 'SET' command, a valid value to set

    Returns Promise<string | number | GraphConfigInfo>

    If 'SET' command, returns 'OK' for valid runtime-settable option names and values. If 'GET' command, returns a string with the current option's value.

  • connect(): Promise<void>
  • Connecting to the Redis database with the module

    Returns Promise<void>

  • delete(name: string): Promise<string>
  • Completely removing the graph and all of its entities

    Parameters

    • name: string

      The name of the graph

    Returns Promise<string>

    String indicating if operation succeeded or failed.

  • disconnect(): Promise<void>
  • Disconnecting from the Redis database with the module

    Returns Promise<void>

  • explain(name: string, query: string): Promise<string[]>
  • Constructing a query execution plan but does not run it. Inspect this execution plan to better understand how your query will get executed

    Parameters

    • name: string

      The name of the graph

    • query: string

      The query to execute

    Returns Promise<string[]>

    String representation of a query execution plan

  • handleError(error: string): any
  • Handling a error

    Parameters

    • error: string

      The message of the error

    Returns any

  • handleResponse(response: any): any
  • Simpilizing the response of the Module command

    Parameters

    • response: any

      The array response from the module

    Returns any

  • isOnlyTwoDimensionalArray(array: any[]): boolean
  • Check if array is fully two dimensional. Only items in the array are arrays.

    Parameters

    • array: any[]

      The potential two dimensional array

    Returns boolean

  • paramToString(paramValue: string): string
  • Formatting given param value to string

    Parameters

    • paramValue: string

      The given param value

    Returns string

    A param value converted to string

  • profile(name: string, query: string): Promise<string[]>
  • Executing a query and produces an execution plan augmented with metrics for each operation's execution

    Parameters

    • name: string

      The name of the graph

    • query: string

      The query to execute

    Returns Promise<string[]>

    String representation of a query execution plan, with details on results produced by and time spent in each operation.

  • query(name: string, query: string, params?: {}): Promise<string[][]>
  • Executing the given query against a specific graph

    Parameters

    • name: string

      The name of the graph

    • query: string

      The query to execute

    • Optional params: {}

      The params of the query

      • [key: string]: string

    Returns Promise<string[][]>

    Result set

  • readonlyQuery(name: string, query: string, params?: {}): Promise<string[][]>
  • Executing the given readonly query against a specific graph

    Parameters

    • name: string

      The name of the graph

    • query: string

      The query to execute

    • Optional params: {}

      The params of the query

      • [key: string]: string

    Returns Promise<string[][]>

    Result set

  • reduceArrayDimension(array: any[][]): any[]
  • Reducing an array by one level. i.e. from two dimensional to 1 dimensional.

    Parameters

    • array: any[][]

      The potentional two dimensional array

    Returns any[]

  • sendCommand(data: CommandData): Promise<any>
  • Running a Redis command

    Parameters

    • data: CommandData

      The command data of a command to send. Consists of command and args.

    Returns Promise<any>

  • slowlog(id: number): Promise<string[]>
  • Retrieving a list containing up to 10 of the slowest queries

    Parameters

    • id: number

      The id of the graph

    Returns Promise<string[]>

    A list containing up to 10 of the slowest queries issued against the given graph ID.

Generated using TypeDoc