public class PostgreSQL_Data_Port extends JDBC_Data_Port implements Data_Port
JDBC_Data_Port
Modifier and Type | Field and Description |
---|---|
static String |
ID
Class name and version identification.
|
static String[] |
Optional_Parameters
Optional Configuration parameters.
|
static String |
PORT
The Configuration parameter to use when specifying a specific
port for connection to the database server.
|
static String |
Port_Type
Data_Port Type name.
|
static String[][] |
URL_Specs
Required Configuration parameters and their default values.
|
Case_Sensitive_Identifiers, Component_Delimiter, Treat_Schema_As_Catalog
Constructor and Description |
---|
PostgreSQL_Data_Port()
Constructs the abstract JDBC_Data_Port finalizer class, registers
the class ID and name of the Data_Port type, and sets the flag to
treat schema as Database "catalogs".
|
Modifier and Type | Method and Description |
---|---|
void |
Open(Configuration configuration)
Implements the Data_Port
Open method. |
Configuration |
Parameters()
Implements the Data_Port
Parameters method. |
Vector |
Query(String SQL_query,
int limit)
Specialization of the Query method to provide implementation of the
limit functionality using the server specific capability.
|
void |
Rename(String table,
String name)
Specialization of the Rename table functionality using server
specific syntax.
|
Add_SQL_Listener, Case_Sensitive_Identifiers, Case_Sensitive_Identifiers, Catalog_Name, catalog_name, Catalogs, Close, composite_name, Config_Value, Configuration, Configure, Connection, Contents, Create, Create, Database_Catalog_Name, Database_Table_Name, Delete, Delete, Delete, Description, Field_Names, Field_Types, Fields, ID_Type, Insert, is_Open, Keys, List_String, Open_Data_Port, Remove_SQL_Listener, Rename, Select, Table_Name, table_name, Table_Reference_Component_Delimiter, Table_Reference, Tables, toString, Update, Update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Add_SQL_Listener, Case_Sensitive_Identifiers, Case_Sensitive_Identifiers, Catalog_Name, Catalogs, Close, Configuration, Connection, Contents, Create, Create, Database_Catalog_Name, Database_Table_Name, Delete, Delete, Delete, Description, Field_Names, Field_Types, Fields, Insert, is_Open, Keys, Remove_SQL_Listener, Rename, Select, Table_Name, Table_Reference_Component_Delimiter, Table_Reference, Tables, toString, Update, Update
public static final String ID
public static final String Port_Type
public static final String[][] URL_Specs
Database.DRIVER
Configuration.HOST
Database.DATABASE
public static final String PORT
public static final String[] Optional_Parameters
These parameters are based on the use of the PostgreSQL JDBC driver, version 8.3.
user
password
ssl
sslfactory
sslfactoryarg
compatible
protocolVersion
loglevel
charSet
allowEncodingChanges
logUnclosedConnections
prepareThreshold
loginTimeout
stringtype
public PostgreSQL_Data_Port()
public Configuration Parameters() throws Database_Exception
Parameters
method.
Parameters
in interface Data_Port
Database_Exception
- If the Data_Port could not be accessed.Data_Port.Parameters()
public void Open(Configuration configuration) throws Database_Exception
Open
method.
The Configuration that is supplied is conditionally set
(existing parameters of the same name are not reset) with
the required URL specifications
default
values. Then the Configuration is provided to the base
JDBC_Data_Port
method to load the JDBC driver and save the Configuration.
Configure
The URL specifying how the connection will be made to the database server has the form:
jdbc:postgresql://[HOST][:PORT]/CATALOG[?param1=value1[¶m2=value2][...]]
All of the parameters will be sought in the Configuration.
The paramN options are in the optional parameters
list. Parameters with these names in the
Configuration will be included in the URL, otherwise they will
be omitted.
The URL specification is provided to the JDBC_Data_Port
method which
opens a connection to the database server.
Open_Data_Port
Open
in interface Data_Port
Open
in class JDBC_Data_Port
configuration
- The Configuration for this Data_Port.Database_Exception
- If no Configuration is provided
or the JDBC_Data_Port fails to load the driver or make
the connection to the database server.Configuration
public Vector Query(String SQL_query, int limit) throws Database_Exception
Query
in interface Data_Port
Query
in class JDBC_Data_Port
SQL_query
- The syntax of the query string is database dependent.
A typical example is an SQL "SELECT" statement.limit
- The maximum number of records to return. If
negative, there will be no limit to the number of records
returned. If zero, no records will be returned.Database_Exception
- If the Data_Port is not open or the
operation on the database server failed.JDBC_Data_Port.Query(String, int)
public void Rename(String table, String name) throws Database_Exception
Rename
in interface Data_Port
Rename
in class JDBC_Data_Port
table
- The name of the table to be affected. If this is
null then the TABLE
from the Configuration
will be used.name
- The new name for the table. If this is null,
nothing is done.Database_Exception
- If no catalog or table name is
available, or the database server rejected the operation.