Using Node.js with Caché - InterSystems Documentation
Using Node.js with Caché - InterSystems Documentation
Using Node.js with Caché - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
open()<br />
4.13 open()<br />
The open() method opens the specified <strong>Caché</strong> database. See “Opening and Closing the <strong>Caché</strong> Database” for a detailed<br />
description of how to open and close the database.<br />
Synchronous<br />
Asynchronous<br />
Parameters<br />
mydata.open(parameters);<br />
mydata.open(parameters, callback_function);<br />
• parameters — specifies the <strong>Caché</strong> database to be opened:<br />
– parameters.path — Path to the ‘mgr’ directory of the target <strong>Caché</strong> installation.<br />
– parameters.username — User name for access.<br />
– parameters.password — Password for access.<br />
– parameters.namespace — Target <strong>Caché</strong> namespace.<br />
• callback_function — a function of the form function(error, result){} used to return results<br />
asynchronously (see “Synchronous vs. Asynchronous cache.node Methods”).<br />
Example<br />
mydata.open(<br />
{<br />
path:"/cache20102/mgr",<br />
username: "_SYSTEM",<br />
password: "SYS",<br />
namespace: "USER"<br />
},<br />
function(error, result) { // callback code }<br />
);<br />
Result:<br />
Operation successful if no error reported.<br />
4.14 previous()<br />
The previous() method gets the previous Global subscript<br />
Get the previous value in the collating sequence for a particular level of subscript.<br />
Synchronous<br />
var result = mydata.previous(node);<br />
Asynchronous<br />
mydata.previous(node, callback_function);<br />
<strong>Using</strong> <strong>Node</strong>.<strong>js</strong> <strong>with</strong> <strong>Caché</strong> 27