OracleDbSupport

(Difference between revisions)
Ppisl (Talk | contribs)
(Created page with 'OracleDb is a Node.js module, which provides functionality to work with Oracle DB. NetBeans doesn't have a special support for OracleDb module, but NetBeans should offer to wri…')
Newer edit →

Revision as of 10:18, 5 February 2015

OracleDb is a Node.js module, which provides functionality to work with Oracle DB.

NetBeans doesn't have a special support for OracleDb module, but NetBeans should offer to write the code quickly. There are a few screenshot:

image:OracleDbCC_01.png The code completion for OracleDb object with documentation. The code completion offers properties and methods of OracleDb class.

image:OracleDb_connAttrs_CC_01.png image:OracleDb_connAttrs_CC_01.png

The two pictures above show the code completion for property names of object, which is a argument of an function call.

In this case NetBeans knows (it can be based on a signature file or file with JS Doc documentation) that OracleDb.getConnection() method has two parameters. One of the parameter can be an anonymous object literal, which si defined in a signature file in this case. So if NetBeans find out, that the code completion is called in an object literal, which is used as an argument of an function, and NetBeans knows the right types, then the IDE offers the names of properties in the right place.

Also NetBeans knows that that the OracleDb.getConnection() method has second parameter, which is a callback. So when you invoke code completion on the argument place, NetBeans offers a template, which corresponds to the known callback function. See picture below. File:OracleDb connectionCallBack.png As is displayed on the picture, the template is offers as an item of code completion. This item is displayed only at position after '(' or ',' chars and if the function call contains known callback. Again the callback can be defined in the source file through @callback tag in Js Documentation.

For example in the case of OracleDb.getConnection() method it can look like this:

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo