Skip to content

OgmaOracleParser<ND, ED> ​

Parser for Oracle SQL Graph

Type parameters ​

NameTypeDescription
NDunknownNode data type
EDunknownEdge data type

Constructors ​

constructor ​

• new OgmaOracleParser<ND, ED>(options): OgmaOracleParser<ND, ED>

Parameters ​

NameType
optionsParserOptions<ND, ED>

Returns ​

OgmaOracleParser<ND, ED>

Properties ​

SQLIDfromId ​

• SQLIDfromId: (id: string) => `${string}{"ID": ${number}}`

Function to transform a string id to a SQL ID

Type declaration ​

▸ (id): `${string}{"ID": ${number}}`

Parameters ​
NameType
idstring
Returns ​

`${string}{"ID": ${number}}`

SQLIDtoId ​

• SQLIDtoId: (id: `${string}{"ID": ${number}}`) => string

Function to transform a SQL ID to a string id

Type declaration ​

▸ (id): string

Parameters ​
NameType
id`${string}{"ID": ${number}}`
Returns ​

string

Methods ​

getRawGraph ​

▸ getRawGraph<N, E>(options): Promise<RawGraph<N, E>>

Executes a query (wrapped in CUST_SQLGRAPH_JSON) and returns a RawGraph

Parameters ​

NameTypeDescription
optionsObject
options.connConnectionThe connection to use
options.maxResults?numberThe maximum number of elements returned (nodes + edges) (default Infinity)
options.pageLength?numberThe page length (default 32000)
options.pageStart?numberThe page to start from (default 0)
options.querystringThe query to execute

Returns ​

Promise<RawGraph<N, E>>

a RawgGraph

parse ​

▸ parse<N, E>(param0): RawGraph<N, E>

Takes an OracleResponse and returns a RawGraph

Parameters ​

NameTypeDescription
param0OracleResponse<N, E>The JSON returned by CUST_SQLGRAPH_JSON

Returns ​

RawGraph<N, E>

A RawGraph

parseLob ​

▸ parseLob<N, E>(lob): Promise<{ edges: RawEdge<E>[] ; nodes: RawNode<N>[] ; numResults: number = result.numResults }>

Read a lob and parse it as RawGraph

Parameters ​

NameType
lobLob

Returns ​

Promise<{ edges: RawEdge<E>[] ; nodes: RawNode<N>[] ; numResults: number = result.numResults }>