Skip to content

Sequence

Functionality for manipulating the database sequence objects.

Basic Usage

import { sequence } from "sdk/db";
import { response } from "sdk/http";

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

response.println(value.toString());
response.flush();
response.close();

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. -