All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class nsjava.NsPg

java.lang.Object
   |
   +----nsjava.NsDb
           |
           +----nsjava.NsPg

public class NsPg
extends NsDb

NsPg extends the basic NsDb class to provide postgresql specific driver functionality.

See Also:
NsDb, NsLog, NsSet, NsTcl

Constructor Index

 o NsPg()
Create a postgresql specific database handle.
 o NsPg(String)
Create a postgresql specific database handle.

Method Index

 o blob_dml_file(int, String)
Insert into a large object using a file as a datasource.
 o blob_dml_file(Integer, String)
Insert into a large object using a file as a datasource.
 o blob_dml_file(String, String)
Insert into a large object using a file as a datasource.
 o blob_select_file(int, String)
Select a large object into a file.
 o blob_select_file(Integer, String)
Select a large object into a file.
 o blob_select_file(String, String)
Select a large object into a file.
 o column(String, String)
Implementation of the ns_column command.
 o column(String, String, String)
Implementation of the ns_column command.
 o column(String, String, String, String)
Implementation of the ns_column command.
 o db()
Not sure what this is.
 o error()
Return the last error for the postgresql driver.
 o finalize()
Cleanup and release database handle.
 o host()
Return the host for the postgresql driver.
 o ntuples()
Return the number of tuples returned for the last command.
 o number()
Return the number of connections for the postgresql driver.
 o options()
Return the options for the postgresql driver.
 o port()
Return the port for the postgresql driver.
 o status()
Return the status for the postgresql driver.
 o table(String)
Implementation of the ns_table command.
 o table(String, String)
Implementation of the ns_table command.
 o table(String, String, String)
Implementation of the ns_table command.

Constructors

 o NsPg
 public NsPg() throws SQLException
Create a postgresql specific database handle.

Returns:
instance of a postgresql database handle.
Throws: SQLException
for any database errors.
 o NsPg
 public NsPg(String poolname) throws SQLException
Create a postgresql specific database handle.

Parameters:
poolname - the poolname to use when getting the handle.
Returns:
instance of a postgresql database handle.
Throws: SQLException
for any database errors.

Methods

 o finalize
 public void finalize() throws SQLException
Cleanup and release database handle.

Throws: SQLException
for any database errors.
Overrides:
finalize in class NsDb
 o db
 public String db() throws SQLException
Not sure what this is. Need to check on this.

Returns:
driver db command result.
Throws: SQLException
for any database errors.
 o host
 public String host() throws SQLException
Return the host for the postgresql driver.

Returns:
driver host command result.
Throws: SQLException
for any database errors.
 o options
 public String options() throws SQLException
Return the options for the postgresql driver.

Returns:
driver options command result.
Throws: SQLException
for any database errors.
 o port
 public String port() throws SQLException
Return the port for the postgresql driver.

Returns:
driver port command result.
Throws: SQLException
for any database errors.
 o number
 public String number() throws SQLException
Return the number of connections for the postgresql driver.

Returns:
driver number command result.
Throws: SQLException
for any database errors.
 o error
 public String error() throws SQLException
Return the last error for the postgresql driver.

Returns:
driver error command result.
Throws: SQLException
for any database errors.
 o status
 public String status() throws SQLException
Return the status for the postgresql driver.

Returns:
driver status command result.
Throws: SQLException
for any database errors.
 o ntuples
 public Integer ntuples() throws SQLException
Return the number of tuples returned for the last command.

Returns:
the number of tuples.
Throws: SQLException
for any database errors.
 o blob_dml_file
 public void blob_dml_file(String blob_id,
                           String filename) throws SQLException
Insert into a large object using a file as a datasource.

Parameters:
blob_id - for the blob that will receive the insert or update.
filename - to read binary data from.
Throws: SQLException
for any database errors.
 o blob_dml_file
 public void blob_dml_file(Integer blob_id,
                           String filename) throws SQLException
Insert into a large object using a file as a datasource.

Parameters:
blob_id - for the blob that will receive the insert or update.
filename - to read binary data from.
Throws: SQLException
for any database errors.
 o blob_dml_file
 public void blob_dml_file(int blob_id,
                           String filename) throws SQLException
Insert into a large object using a file as a datasource.

Parameters:
blob_id - for the blob that will receive the insert or update.
filename - to read binary data from.
Throws: SQLException
for any database errors.
 o blob_select_file
 public void blob_select_file(String blob_id,
                              String filename) throws SQLException
Select a large object into a file.

Parameters:
blob_id - for the blob that will be selected from.
filename - to write binary data into.
Throws: SQLException
for any database errors.
 o blob_select_file
 public void blob_select_file(Integer blob_id,
                              String filename) throws SQLException
Select a large object into a file.

Parameters:
blob_id - for the blob that will be selected from.
filename - to write binary data into.
Throws: SQLException
for any database errors.
 o blob_select_file
 public void blob_select_file(int blob_id,
                              String filename) throws SQLException
Select a large object into a file.

Parameters:
blob_id - for the blob that will be selected from.
filename - to write binary data into.
Throws: SQLException
for any database errors.
 o column
 public String column(String command,
                      String table) throws SQLException
Implementation of the ns_column command.

Parameters:
command - column command to perform.
table - to reference for column table command
Returns:
the requested command results.
Throws: SQLException
for any database errors.
 o column
 public String column(String command,
                      String table,
                      String col) throws SQLException
Implementation of the ns_column command.

Parameters:
command - column command to perform.
table - to reference for column table command
col - column name/index
Returns:
the requested command results.
Throws: SQLException
for any database errors.
 o column
 public String column(String command,
                      String table,
                      String col,
                      String key) throws SQLException
Implementation of the ns_column command.

Parameters:
command - column command to perform.
table - to reference for column table command
col - column name/index
key - key value
Returns:
the requested command results.
Throws: SQLException
for any database errors.
 o table
 public String table(String command) throws SQLException
Implementation of the ns_table command.

Parameters:
command - table command to perform.
Returns:
the requested command results.
Throws: SQLException
for any database errors.
 o table
 public String table(String command,
                     String table) throws SQLException
Implementation of the ns_table command.

Parameters:
command - table command to perform.
table - to reference for the table command
Returns:
the requested command results.
Throws: SQLException
for any database errors.
 o table
 public String table(String command,
                     String table,
                     String key) throws SQLException
Implementation of the ns_table command.

Parameters:
command - column command to perform.
table - to reference for column table command
key - key value
Returns:
the requested command results.
Throws: SQLException
for any database errors.

All Packages  Class Hierarchy  This Package  Previous  Next  Index