drop([Function]) Method

Drops the prepared SQL statement.

Parameters

Type Name Description
Function callback The optional callback function.

Remarks

This method drops the prepared statement and frees up resources.

This method can be either synchronous or asynchronous depending on whether or not a callback function is specified. The callback function is of the form:

function(err)
    {
    };

Example

The following synchronous example shows how to use the drop method on a prepared statement.

var hana=require('@sap/hana-client');
    var client=hana.createConnection();
    client.connect("serverNode=myserver;uid=system;pwd=manager");
    stmt=client.prepare("SELECT * FROM Customers WHERE ID >= ? AND ID < ?");
    result=stmt.exec([200, 300]);
    stmt.drop();
    console.log(result);
    client.disconnect();