|
jxDBCon 0.9z | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourceforge.jxutil.JNI | +--org.sourceforge.jxutil.SCCI | +--org.sourceforge.jxdbcon.postgresql.LibPQ | +--org.sourceforge.jxdbcon.postgresql.LibProtocol
This class implements PGProtocol via native calls to libPQ.
At runtime it binds to libpq, which must be locatable by the
system's link loader.
The driver currently uses the simpler, blocking, functions of libPQ.
Field Summary | |
private InputStream |
copyInStream
The InputStream for COPY IN data. |
private OutputStream |
copyOutStream
The OutputStream for COPY OUT data. |
private String |
messageEncoding
The message encoding. |
private ArrayList |
noticeList
The buffer to store the notices in. |
private int |
pgconn
The PGconn* handle. |
Fields inherited from class org.sourceforge.jxdbcon.postgresql.LibPQ |
|
Fields inherited from class org.sourceforge.jxutil.JNI |
loaded |
Fields inherited from interface org.sourceforge.jxdbcon.postgresql.PGInfoKeys |
FORCECLIENTENC, OPTIONS, PROTOVERSION, SETTIMEZONE, STRICTSCHEMA, TTY, USEASYNC, USECLIENTENC, USEDBENC, USESSL |
Fields inherited from interface org.sourceforge.jxdbcon.InfoKeys |
CATALOG, DESCRIPTION, DRIVER, HOST, PASSWORD, PORT, SUBDRIVER, USER |
Fields inherited from interface org.sourceforge.jxdbcon.postgresql.LibPQConstants |
CONNECTION_AUTH_OK, CONNECTION_AWAITING_RESPONSE, CONNECTION_BAD, CONNECTION_MADE, CONNECTION_OK, CONNECTION_SETENV, CONNECTION_STARTED, PGRES_BAD_RESPONSE, PGRES_COMMAND_OK, PGRES_COPY_IN, PGRES_COPY_OUT, PGRES_EMPTY_QUERY, PGRES_FATAL_ERROR, PGRES_NONFATAL_ERROR, PGRES_POLLING_ACTIVE, PGRES_POLLING_FAILED, PGRES_POLLING_OK, PGRES_POLLING_READING, PGRES_POLLING_WRITING, PGRES_TUPLES_OK |
Constructor Summary | |
LibProtocol()
|
Method Summary | |
void |
close()
Close the connection to the backend. |
void |
connect(Properties info)
Open the connection. |
private void |
discardCopyOut()
|
private void |
doCopyOut()
|
PGFuncResult |
exec(long funcOid,
byte[][] args)
Not implemented.... |
PGExecResult |
exec(String sql)
Execute a SQL command. |
void |
requestCancel()
Request cancellation of current statement. |
void |
setCopyInStream(InputStream in)
Accessor function for COPY IN |
void |
setCopyOutStream(OutputStream copyOutStream)
Accessor function for COPY OUT |
void |
setMessageEncoding(String messageEncoding)
Set the encoding to use for stringifying backend messages. |
Methods inherited from class org.sourceforge.jxdbcon.postgresql.LibPQ |
PQbackendPID, PQbinaryTuples, PQclear, PQclientEncoding, PQcmdStatus, PQcmdTuples, PQconnectdb, PQconnectPoll, PQconnectStart, PQdb, PQendcopy, PQerrorMessage, PQexec, PQfinish, PQfmod, PQfn, PQfname, PQfnumber, PQfsize, PQftype, PQgetisnull, PQgetlength, PQgetline, PQgetResult, PQgetvalue, PQhost, PQnfields, PQntuples, PQoidStatus, PQoptions, PQpass, PQport, PQputline, PQputnbytes, PQrequestCancel, PQreset, PQresStatus, PQresultErrorMessage, PQresultStatus, PQsendQuery, PQsetClientEncoding, PQsetNoticeProcessor, PQstatus, PQtrace, PQtty, PQuntrace, PQuser |
Methods inherited from class org.sourceforge.jxutil.SCCI |
call_D_d, call_I_i, call_I_T, call_II_i, call_II_T, call_III_i, call_III_Y, call_IIyiiiyi_i, call_IIyiiyil_i, call_IIyyIyI_i, call_IT_i, call_Iy_i, call_IyI_i, call_IYIIi_i, call_T_i, call_TT_i, call_V_i, dlclose, dlopen, dlsym, makeCallbackS, makeCallbackV, testHandler, toByteArray, toUTF8String |
Methods inherited from class org.sourceforge.jxutil.JNI |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private InputStream copyInStream
private OutputStream copyOutStream
private String messageEncoding
private ArrayList noticeList
private int pgconn
Constructor Detail |
public LibProtocol()
Method Detail |
public void close() throws SQLException
PGProtocol
close
in interface PGProtocol
SQLException
public void connect(Properties info) throws SQLException
connect
in interface PGProtocol
SQLException
InfoKeys
,
PGInfoKeys
private void discardCopyOut()
private void doCopyOut()
public PGFuncResult exec(long funcOid, byte[][] args)
exec
in interface PGProtocol
public PGExecResult exec(String sql)
PGProtocol
exec
in interface PGProtocol
public void requestCancel() throws SQLException
PGProtocol
requestCancel
in interface PGProtocol
SQLException
public void setCopyInStream(InputStream in)
setCopyInStream
in interface PGProtocol
public void setCopyOutStream(OutputStream copyOutStream)
setCopyOutStream
in interface PGProtocol
public void setMessageEncoding(String messageEncoding)
PGProtocol
setMessageEncoding
in interface PGProtocol
|
jxDBCon 0.9z | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |