Skip to content

Commit

Permalink
Merge pull request #10 from Linkurious/develop
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
Leo-Nicolle authored Dec 8, 2023
2 parents 2f4373b + 0bc4c14 commit 5a190c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.0.1
commit = False
tag = False
serialize =
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nodeJob {
runDependencyVersionCheck = false
npmPackPath = '.'
gitTagPrefix = 'v'
githubRelease = true
runBookeeping = true
runNpmPublish = true
}
4 changes: 2 additions & 2 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linkurious/ogma-oracle-parser",
"version": "1.0.0",
"version": "1.0.1",
"description": "Parses responses from Oracle graph DB into Ogma format",
"main": "dist/ogma-oracle-parser.umd.js",
"module": "dist/ogma-oracle-parser.umd.js",
Expand All @@ -16,6 +16,7 @@
"prebuild": "tsc",
"build": "vite build",
"prepack": "npm run build",
"lint:ci": "eslint -f checkstyle -o reports/checkstyle.xml --ext ts --ext js src ./tests/**/*.test.ts",
"docs:api": "typedoc --plugin typedoc-plugin-markdown --out docs/api src/index.ts",
"postdocs:api": "node scripts/cleanup-md.mjs",
"predocs:dev": "npm run docs:api",
Expand All @@ -29,7 +30,7 @@
"test:dev": "vitest"
},
"author": "Leo Nicolle",
"license": "ISC",
"license": "Apache-2.0",
"private": false,
"typesVersions": {
"*": {
Expand Down Expand Up @@ -63,7 +64,6 @@
"publishConfig": {
"access": "public"
},
"private": false,
"eslintConfig": {
"extends": "@linkurious/eslint-config-ogma"
},
Expand All @@ -84,4 +84,4 @@
"vitepress": "^1.0.0-rc.30",
"vitest": "^1.0.1"
}
}
}
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { RawGraph } from "@linkurious/ogma";
import { Connection, Lob } from "oracledb";
import { OracleResponse, ParserOptions, SQLID } from "./types";
Expand Down Expand Up @@ -65,6 +64,7 @@ export function readLob<T = unknown>(lob: Lob) {
});
});
}

/**
* Parser for Oracle SQL Graph
* @typeParam ND [Node data type](https://doc.linkurious.com/ogma/latest/tutorials/typescript/index.html#data-typing)
Expand Down Expand Up @@ -107,6 +107,7 @@ export class OgmaOracleParser<ND = unknown, ED = unknown> {
})
} as RawGraph<N, E>;
}

/**
* Read a lob and parse it as [RawGraph](https://doc.linkurious.com/ogma/latest/api.html#RawGraph)
* @param lob
Expand All @@ -116,6 +117,7 @@ export class OgmaOracleParser<ND = unknown, ED = unknown> {
return readLob<OracleResponse<N, E> & { numResults: number; }>(lob)
.then((result) => ({ ...this.parse<N, E>(result), numResults: result.numResults }));
}

/**
* Executes a query (wrapped in CUST_SQLGRAPH_JSON)
* and returns a [RawGraph](https://doc.linkurious.com/ogma/latest/api.html#RawGraph)
Expand Down Expand Up @@ -160,7 +162,6 @@ export class OgmaOracleParser<ND = unknown, ED = unknown> {
}
const parser = new OgmaOracleParser({ SQLIDtoId, SQLIDfromId });
export default parser;

export const parse = parser.parse.bind(parser);
export const parseLob = parser.parseLob.bind(parser);
export const getRawGraph = parser.getRawGraph.bind(parser);

0 comments on commit 5a190c1

Please sign in to comment.