OgmaOracleParser<ND, ED>
Parser for Oracle SQL Graph
Type parameters
Name | Type | Description |
---|---|---|
ND | unknown | Node data type |
ED | unknown | Edge data type |
Constructors
constructor
• new OgmaOracleParser<ND
, ED
>(options
): OgmaOracleParser
<ND
, ED
>
Parameters
Name | Type |
---|---|
options | ParserOptions <ND , ED > |
Returns
OgmaOracleParser
<ND
, ED
>
Properties
SQLIDfromId
• SQLIDfromId: (id
: string
) => `${string}{"ID": ${number}}`
Type declaration
▸ (id
): `${string}{"ID": ${number}}`
Function to transform a string id to a SQL ID
Parameters
Name | Type |
---|---|
id | string |
Returns
`${string}{"ID": ${number}}`
SQLIDtoId
• SQLIDtoId: (id
: `${string}{"ID": ${number}}`) => string
Type declaration
▸ (id
): string
Function to transform a SQL ID to a string id
Parameters
Name | Type |
---|---|
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
Name | Type | Description |
---|---|---|
options | Object | |
options.conn | Connection | The connection to use |
options.maxResults? | number | The maximum number of elements returned (nodes + edges) (default Infinity) |
options.pageLength? | number | The page length (default 32000) |
options.pageStart? | number | The page to start from (default 0) |
options.query | string | The 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
Name | Type | Description |
---|---|---|
param0 | OracleResponse <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
Name | Type |
---|---|
lob | Lob |
Returns
Promise
<{ edges
: RawEdge
<E
>[] ; nodes
: RawNode
<N
>[] ; numResults
: number
= result.numResults }>