    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

##

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

##

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

##

NsPg

     public NsPg() throws SQLException

  Create a postgresql specific database handle.

  Returns:
    instance of a postgresql database handle.
  Throws: SQLException
    for any database errors.

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.

##

finalize

     public void finalize() throws SQLException

  Cleanup and release database handle.

  Throws: SQLException
    for any database errors.
  Overrides:
    finalize in class NsDb

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.

host

     public String host() throws SQLException

  Return the host for the postgresql driver.

  Returns:
    driver host command result.
  Throws: SQLException
    for any database errors.

options

     public String options() throws SQLException

  Return the options for the postgresql driver.

  Returns:
    driver options command result.
  Throws: SQLException
    for any database errors.

port

     public String port() throws SQLException

  Return the port for the postgresql driver.

  Returns:
    driver port command result.
  Throws: SQLException
    for any database errors.

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.

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.

status

     public String status() throws SQLException

  Return the status for the postgresql driver.

  Returns:
    driver status command result.
  Throws: SQLException
    for any database errors.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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