Database

postgres.ql

An entity for interacting with a PostgreSQL database.

Constructor Overview

Constructor Description
Database(url, username, password)

Function Overview

Function Description
static fun createDatabase(host, port, database, username, password) Create an unauthenticated reference to a database. No connection occurs yet.
static fun createDatabase(url, username, password) Create an unauthenticated reference to a database. No connection occurs yet.
static fun createDatabase(url) Create an unauthenticated reference to a database. No connection occurs yet.
native fun createConnection() Create a connection to the database.

Field Overview

Field Description
string url

The full connection URL.

string username

The username used to connect to the database.

string password

The password used to connect to the database.

Constructors

Database(url, username, password) link

Functions

static fun createDatabase(host, port, database, username, password) link

Create an unauthenticated reference to a database. No connection occurs yet.

Params
host ( string )

The hostname of the database

port ( string )

The port of the database

database ( string )

The name of the database to connect to

username ( string )

The username to connect with

password ( string )

The password to connect with

static fun createDatabase(url, username, password) link

Create an unauthenticated reference to a database. No connection occurs yet.

Params
url ( string )

The URL of the database

username ( string )

The username to connect with

password ( string )

The password to connect with

static fun createDatabase(url) link

Create an unauthenticated reference to a database. No connection occurs yet.

Params
url ( string )

The URL of the database

native fun createConnection() link

Create a connection to the database.

Returns Connection

The created connection