Database Sequence

Functionality for manipulating the database sequence objects.

Version 3.x

Basic Usage

1
2
3
4
5
6
7
8
9
10
var sequence = require('db/v3/sequence');
var response = require('http/v3/response');


var value = sequence.nextval("MYSEQUENCE");

response.println(value);

response.flush();
response.close();

Definition

Functions


Function Description Returns
nextval(name, databaseType?, datasourceName?) Increment the sequence with the given name and returns the value. Creates the sequence implicitly if it deos not exist. integer
create(name, databaseType?, datasourceName?) Creates the sequence by the given name. -
drop(name, databaseType?, datasourceName?) Remove the sequence by the given name. -

Compatibility

Rhino Nashorn V8
βœ… βœ… βœ…


Edit