{"_id":"@aux4/db-oracle","_rev":"2-2ab75c0ef208f0ba2ffa8d55e6003e30","name":"@aux4/db-oracle","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@aux4/db-oracle","version":"1.0.1","description":"Database CLI for Oracle","main":"index.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+ssh://git@github.com/aux4/db-oracle.git"},"keywords":["aux4","database","cli","oracle"],"author":{"name":"Aux4"},"license":"Apache-2.0","bugs":{"url":"https://github.com/aux4/db-oracle/issues"},"homepage":"https://github.com/aux4/db-oracle#readme","dependencies":{"merge":"^2.1.1","oracledb":"^6.0.1"},"gitHead":"6f89573258ab6b6d111660cd8bd812a09b1857e3","_id":"@aux4/db-oracle@1.0.1","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Z3bIRQVXTQ9zJ1Bm06cWIB6tarcEMWtsh0kK+fMyt9dsuyiFw97820TVOAeMZt66pkSSQSamBTzq8P26ZmJSWg==","shasum":"12996d8d7104f03367d9b892cd8a6c6668853a86","tarball":"https://registry.npmjs.org/@aux4/db-oracle/-/db-oracle-1.0.1.tgz","fileCount":3,"unpackedSize":13659,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEc2zIQElVj1KFevFzUu5kghNmpM8wAer19ojKqxEzhpAiAD32OAd3PmMMnV9QPmj+/yr41sDCWWgtJiSH837KuILA=="}]},"_npmUser":{"name":"aux4-dev","email":"contact@aux4.io"},"directories":{},"maintainers":[{"name":"aux4-dev","email":"contact@aux4.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/db-oracle_1.0.1_1687229424672_0.6585849320708315"},"_hasShrinkwrap":false},"1.0.2":{"name":"@aux4/db-oracle","version":"1.0.2","description":"Database CLI for Oracle","main":"index.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+ssh://git@github.com/aux4/db-oracle.git"},"keywords":["aux4","database","cli","oracle"],"author":{"name":"Aux4"},"license":"Apache-2.0","bugs":{"url":"https://github.com/aux4/db-oracle/issues"},"homepage":"https://github.com/aux4/db-oracle#readme","dependencies":{"merge":"^2.1.1","oracledb":"^6.0.1"},"gitHead":"f894ec9e6a97327a5d6cdf4cf5dbe2deec1127e8","_id":"@aux4/db-oracle@1.0.2","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-ntpvUVREp1OyQaE31N3eaMetUS9p8W3dNt24TUqoVOVhsOl8y54tKr6HhxFEiIzOdytQhzee7FMsiZ1Z3Ph5TQ==","shasum":"bfa6dd8ac216198a96412f13b01a24d7053bdebb","tarball":"https://registry.npmjs.org/@aux4/db-oracle/-/db-oracle-1.0.2.tgz","fileCount":3,"unpackedSize":13659,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDi1U85voN6w6b1sc7QbVozbyk1iINFmWfmdZu6t1UNQIgLs5TYc5pQvdbh7TRMH0035mfqInqEnpLqI91x7OGLuA="}]},"_npmUser":{"name":"aux4-dev","email":"contact@aux4.io"},"directories":{},"maintainers":[{"name":"aux4-dev","email":"contact@aux4.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/db-oracle_1.0.2_1687229462584_0.11305223931641373"},"_hasShrinkwrap":false},"1.0.3":{"name":"@aux4/db-oracle","version":"1.0.3","description":"Database CLI for Oracle","main":"index.js","scripts":{"test":"jest"},"repository":{"type":"git","url":"git+ssh://git@github.com/aux4/db-oracle.git"},"keywords":["aux4","database","cli","oracle"],"author":{"name":"Aux4"},"license":"Apache-2.0","bugs":{"url":"https://github.com/aux4/db-oracle/issues"},"homepage":"https://github.com/aux4/db-oracle#readme","dependencies":{"merge":"^2.1.1","oracledb":"^6.0.1"},"gitHead":"8a60672b97e53b6f82b583884442460669bf0bc3","_id":"@aux4/db-oracle@1.0.3","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-g6K13J4clR3PwRpd3Xs8cOshwyAsdg61UI/QTf5j9QduJwCovHNd3DsSpfrikYF7S94x5ollLAl6XLtTQd5Jsg==","shasum":"553bba8ab3f77e682c7e80759b5cf553e1d6b5d0","tarball":"https://registry.npmjs.org/@aux4/db-oracle/-/db-oracle-1.0.3.tgz","fileCount":4,"unpackedSize":15727,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaZHVYQslwXJmQuhpVRNWr45+GXNztn1qHZhhul9YhZQIhAM1eIuwUjUAQqzk4EobZFbPsqjuTHsIimdGUpZGLOCxV"}]},"_npmUser":{"name":"aux4-dev","email":"contact@aux4.io"},"directories":{},"maintainers":[{"name":"aux4-dev","email":"contact@aux4.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/db-oracle_1.0.3_1687230095623_0.4833123331480884"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-20T02:50:24.616Z","1.0.1":"2023-06-20T02:50:24.881Z","modified":"2023-06-20T03:01:35.932Z","1.0.2":"2023-06-20T02:51:02.770Z","1.0.3":"2023-06-20T03:01:35.821Z"},"maintainers":[{"name":"aux4-dev","email":"contact@aux4.io"}],"description":"Database CLI for Oracle","homepage":"https://github.com/aux4/db-oracle#readme","keywords":["aux4","database","cli","oracle"],"repository":{"type":"git","url":"git+ssh://git@github.com/aux4/db-oracle.git"},"author":{"name":"Aux4"},"bugs":{"url":"https://github.com/aux4/db-oracle/issues"},"license":"Apache-2.0","readme":"# @aux4/db-oracle\n\n## JavaScript\n\n### Install\n\n```bash\n$ npm install @aux4/db-oracle\n```\n\n### Execute Query\n\n```javascript\nconst Database = require(\"@aux4/db-oracle\");\nconst db = new Database({\n  host: \"localhost\",\n  user: \"sysadmin\",\n  password: \"******\",\n  service: \"ORCL\"\n});\n\n(async () => {\n  await db.open();\n  const { data } = await db.execute(\"select * from schema.table where id = :id\", { id: 1 });\n  console.log(JSON.stringify(data, null, 2));\n  await db.close();\n})();\n```\n\n### Query Stream\n\n```javascript\nconst Database = require(\"@aux4/db-oracle\");\nconst db = new Database({\n  host: \"localhost\",\n  user: \"sysadmin\",\n  password: \"******\",\n  service: \"ORCL\"\n});\n\nconst stream = await db.stream(\"select * from schema.table where id = :id\", { id: 1 });\n\nstream.on(\"data\", row => {\nconsole.log(JSON.stringify(row, null, 2));\n});\n\nstream.on(\"error\", err => {\nconsole.error(err.message);\n});\n\nstream.on(\"close\", async () => {\nawait db.close();\n});\n```\n\n## Command Line\n\n### Install\n\n```bash\n$ npm install --global @aux4/db\n$ npm install --global @aux4/db-oracle\n```\n\n### Usage\n\n#### Execute Query\n\n```bash\n$ db execute --host localhost --port 1521 --user sysadmin --service ORCL --query \"select * from schema.table where id = :id\" --id 1\n```\n\n#### Stream Query\n\n```bash\n$ db stream --host localhost --port 1521 --user sysadmin --service ORCL --query \"select * from schema.table where id = :id\" --id 1\n```\n\n#### Using @aux4/config\n\ncreate `config.yaml`\n\n```yaml\nconfig:\n  dev:\n    oracle:\n      host: localhost\n      port: 1521\n      user: sysadmin\n      password: \"******\"\n      service: ORCL\n```\n\n```bash\n$ db execute --configFile config.yaml --config dev/oracle --query \"select * from schema.table where id = :id\" --id 1\n```\n\n## See Also\n\n* aux4 [website](https://aux4.io) / [npm](https://www.npmjs.com/package/aux4) / [GitHub](https://github.com/aux4/aux4)\n* @aux4/config [npm](https://www.npmjs.com/package/@aux4/config) / [GitHub](https://github.com/aux4/config)\n* @aux4/db [npm](https://www.npmjs.com/package/@aux4/db) / [GitHub](https://github.com/aux4/db)","readmeFilename":"README.md"}