jxDBCon 0.9z

org.sourceforge.jxdbcon.postgresql
Class PGConversionContext

java.lang.Object
  |
  +--org.sourceforge.jxutil.sql.type.ConversionContext
        |
        +--org.sourceforge.jxdbcon.postgresql.PGConversionContext

public class PGConversionContext
extends ConversionContext

A ConversionContext suitable to describe the data returned by the backend. PostgreSQL has 3 different contexts.

  1. query result in text form
  2. query result in binary form
  3. function parameter pass-by-value
Adittionally two encodings are in use. Unformatted binary data is encoded in the database's encoding, formatted text data is encoded using the connections client encoding.


Field Summary
(package private)  PGConnection conn
           
(package private)  String encoding
          Which encoding is in use.
(package private)  boolean isBigEndian
          Is the data using Big Endian semantics.
(package private)  boolean isBinary
          Is the data in binary form.
(package private)  boolean isFuncCall
          Are we in a function call?.
 
Fields inherited from class org.sourceforge.jxutil.sql.type.ConversionContext
 
Constructor Summary
(package private) PGConversionContext(PGConnection conn)
           
(package private) PGConversionContext(PGConnection conn, boolean isBigEndian)
           
 
Method Summary
(package private)  byte[] getBytes(String s)
           
(package private)  String getString(byte[] buf)
           
(package private)  String getString(byte[] buf, int ofs, int len)
           
 
Methods inherited from class org.sourceforge.jxutil.sql.type.ConversionContext
addWarning, clearWarnings, getIndex, getWarnings, next, reset, set, setNull, wasNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

final PGConnection conn

encoding

final String encoding
Which encoding is in use.


isBigEndian

final boolean isBigEndian
Is the data using Big Endian semantics.


isBinary

final boolean isBinary
Is the data in binary form.


isFuncCall

boolean isFuncCall
Are we in a function call?. Used for pass-by-value parameters and results.

Constructor Detail

PGConversionContext

PGConversionContext(PGConnection conn)

PGConversionContext

PGConversionContext(PGConnection conn,
                    boolean isBigEndian)
Method Detail

getBytes

byte[] getBytes(String s)

getString

String getString(byte[] buf)

getString

String getString(byte[] buf,
                 int ofs,
                 int len)

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.