Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public class PostgresDatabase

  1. Object
  2. Database
  3. ServerDatabase
  4. PostgresDatabase
A PostgreSQL server, over its wire protocol with no driver. See ServerDatabase.

Fields

public static final int DEFAULT_PORT = 5432The port PostgreSQL listens on unless configured otherwise.

Constructors

public PostgresDatabase(String host, int port, String database, String user, String password) throws IOExceptionConnects WITHOUT TLS (sslMode=disable): the password and the data cross the network unencrypted.
public PostgresDatabase(String host, int port, String database, String user, String password, String sslMode, int timeoutMillis) throws IOExceptionConnects and signs in; see ServerDatabase for sslMode.

Inherited fields

Inherited methods

Field details

DEFAULT_PORT

public static final int DEFAULT_PORT = 5432
The port PostgreSQL listens on unless configured otherwise.

Constructor details

PostgresDatabase

public PostgresDatabase(String host, int port, String database, String user, String password) throws IOException
Connects WITHOUT TLS (sslMode=disable): the password and the data cross the network unencrypted. Connecting, and each wait for the server, may take 30 seconds.

PostgresDatabase

public PostgresDatabase(String host, int port, String database, String user, String password, String sslMode, int timeoutMillis) throws IOException
Connects and signs in; see ServerDatabase for sslMode.