constructor(options) {
        options = assert(options, ['name', 'text', 'values', 'binary', 'rowMode', 'rows', 'types']);
        super(options);
    }
@class PreparedStatement
@description
Constructs a new $[Prepared Statement] object. All properties can also be set after the object's construction.

This type extends the basic `{name, text, values}` object, i.e. when the basic object is used
with a query method, a new {@link PreparedStatement} object is created in its place.

The type can be used in place of the `query` parameter, with any query method directly.

The type is available from the library's root: `pgp.PreparedStatement`.

@param {Object} [options]
Object configuration options / properties.

@param {string} [options.name] - See property {@link PreparedStatement#name name}.
@param {string|QueryFile} [options.text] - See property {@link PreparedStatement#text text}.
@param {array} [options.values] - See property {@link PreparedStatement#values values}.
@param {boolean} [options.binary] - See property {@link PreparedStatement#binary binary}.
@param {string} [options.rowMode] - See property {@link PreparedStatement#rowMode rowMode}.
@param {number} [options.rows] - See property {@link PreparedStatement#rows rows}.
@param {ITypes} [options.types] - See property {@link PreparedStatement#types types}.

@returns {PreparedStatement}

@see
{@link errors.PreparedStatementError PreparedStatementError},
{@link http://www.postgresql.org/docs/9.6/static/sql-prepare.html PostgreSQL Prepared Statements}

@example

const {PreparedStatement: PS} = require('pg-promise');

// Creating a complete Prepared Statement with parameters:
const findUser = new PS({name: 'find-user', text: 'SELECT * FROM Users WHERE id = $1', values: [123]});

db.one(findUser)
    .then(user => {
        // user found;
    })
    .catch(error => {
        // error;
    });

@example

const {PreparedStatement: PS} = require('pg-promise');

// Creating a reusable Prepared Statement without values:
const addUser = new PS({name: 'add-user', text: 'INSERT INTO Users(name, age) VALUES($1, $2)'});

// setting values explicitly:
addUser.values = ['John', 30];

db.none(addUser)
    .then(() => {
        // user added;
    })
    .catch(error => {
        // error;
    });

// setting values implicitly, by passing them into the query method:
db.none(addUser, ['Mike', 25])
    .then(() => {
        // user added;
    })
    .catch(error => {
        // error;
    });