{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/309","labels_url":"https://api.github.com/repos/oracle/node-oracledb/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/oracle/node-oracledb/issues/309/comments","events_url":"https://api.github.com/repos/oracle/node-oracledb/issues/309/events","html_url":"https://github.com/oracle/node-oracledb/pull/309","id":122053274,"number":309,"title":"Allow binding of PL/SQL indexed tables","user":{"login":"doberkofler","id":1009585,"avatar_url":"https://avatars.githubusercontent.com/u/1009585?v=3","gravatar_id":"","url":"https://api.github.com/users/doberkofler","html_url":"https://github.com/doberkofler","followers_url":"https://api.github.com/users/doberkofler/followers","following_url":"https://api.github.com/users/doberkofler/following{/other_user}","gists_url":"https://api.github.com/users/doberkofler/gists{/gist_id}","starred_url":"https://api.github.com/users/doberkofler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doberkofler/subscriptions","organizations_url":"https://api.github.com/users/doberkofler/orgs","repos_url":"https://api.github.com/users/doberkofler/repos","events_url":"https://api.github.com/users/doberkofler/events{/privacy}","received_events_url":"https://api.github.com/users/doberkofler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-12-14T14:28:30Z","updated_at":"2016-01-19T05:12:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/oracle/node-oracledb/pulls/309","html_url":"https://github.com/oracle/node-oracledb/pull/309","diff_url":"https://github.com/oracle/node-oracledb/pull/309.diff","patch_url":"https://github.com/oracle/node-oracledb/pull/309.patch"},"body":"This pull request fixes the issue #98. It enhances the API to allow to bind procedural code using PL/SQL indexed tables.\r\n\r\nSummary:\r\n* added support for PL/SQL indexed tables\r\n* arrays containing strings and numbers are supported (because of an OCI problem dates are not yet supported)\r\n*  only the object syntax of bindings is allowed\r\n* IN, IN OUT and OUT binding are fully supported\r\n* IN bindings only need a val property defined as an array to be identified as array binding\r\n* IN OUT and OUT binding additionally need the maxSize and maxArraySize properties to be specified\r\n* The new unit test PLSQLbinds.js shows all types of binding and also tests for all possible exceptions\r\n* The documentation has not been adapted\r\n\r\nPL/SQL:\r\n```\r\n...\r\nTYPE stringsType IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;\r\nTYPE numbersType IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;\r\nFUNCTION test(strings IN stringsType, numbers IN numbersType) RETURN VARCHAR2;\r\n...\r\n```\r\n\r\nJavaScript:\r\n```\r\nvar bindvars = {\r\n  result: {type: oracledb.STRING, dir: oracledb.BIND_OUT, maxSize: 2000},\r\n  strings:  {type: oracledb.STRING, dir: oracledb.BIND_IN, val: ['John', 'Doe']},\r\n  numbers: {type: oracledb.NUMBER, dir: oracledb.BIND_IN, val: [0, 8, 11]}\r\n};\r\n\r\nconnection.execute(\r\n  \"BEGIN :result := oracledb_testpack.test(:strings, :numbers); END;\",\r\n  bindvars,\r\n  function(err, result) {\r\n    should.not.exist(err);\r\n    result.outBinds.result.should.be.exactly('JohnDoe0811');\r\n  }\r\n);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/comments/172740395","html_url":"https://github.com/oracle/node-oracledb/pull/309#issuecomment-172740395","issue_url":"https://api.github.com/repos/oracle/node-oracledb/issues/309","id":172740395,"user":{"login":"pvenkatraman","id":10862965,"avatar_url":"https://avatars.githubusercontent.com/u/10862965?v=3","gravatar_id":"","url":"https://api.github.com/users/pvenkatraman","html_url":"https://github.com/pvenkatraman","followers_url":"https://api.github.com/users/pvenkatraman/followers","following_url":"https://api.github.com/users/pvenkatraman/following{/other_user}","gists_url":"https://api.github.com/users/pvenkatraman/gists{/gist_id}","starred_url":"https://api.github.com/users/pvenkatraman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvenkatraman/subscriptions","organizations_url":"https://api.github.com/users/pvenkatraman/orgs","repos_url":"https://api.github.com/users/pvenkatraman/repos","events_url":"https://api.github.com/users/pvenkatraman/events{/privacy}","received_events_url":"https://api.github.com/users/pvenkatraman/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T05:12:10Z","updated_at":"2016-01-19T05:12:10Z","body":"To reply to your comment on one error message/multiple error messate:  We do use same error message in multiple places and if it suits it is good.  My comment particularly is about the substitution strings, which are bigger.  We try to keep all code, strings etc within 80 characters as per our coding standards.  My suggestion is to phrase multiple smaller error messages."}}