Examples of FastpathArg


Examples of org.postgresql.fastpath.FastpathArg

    public long createLO(int mode) throws SQLException
    {
        if (conn.getAutoCommit())
            throw new PSQLException(GT.tr("Large Objects may not be used in auto-commit mode."),
                                    PSQLState.NO_ACTIVE_SQL_TRANSACTION);
        FastpathArg args[] = new FastpathArg[1];
        args[0] = new FastpathArg(mode);
        return fp.getOID("lo_creat", args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     * @param oid describing object to delete
     * @exception SQLException on error
     */
    public void delete(long oid) throws SQLException
    {
        FastpathArg args[] = new FastpathArg[1];
        args[0] = Fastpath.createOIDArg(oid);
        fp.fastpath("lo_unlink", false, args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

    {
        this.fp = fp;
        this.oid = oid;
        this.mode = mode;

        FastpathArg args[] = new FastpathArg[2];
        args[0] = Fastpath.createOIDArg(oid);
        args[1] = new FastpathArg(mode);
        this.fd = fp.getInteger("lo_open", args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

                    os = null;
                }
            }

            // finally close
            FastpathArg args[] = new FastpathArg[1];
            args[0] = new FastpathArg(fd);
            fp.fastpath("lo_close", false, args); // true here as we dont care!!
            closed = true;
        }
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     */
    public byte[] read(int len) throws SQLException
    {
        // This is the original method, where the entire block (len bytes)
        // is retrieved in one go.
        FastpathArg args[] = new FastpathArg[2];
        args[0] = new FastpathArg(fd);
        args[1] = new FastpathArg(len);
        return fp.getData("loread", args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     * @param buf array to write
     * @exception SQLException if a database-access error occurs.
     */
    public void write(byte buf[]) throws SQLException
    {
        FastpathArg args[] = new FastpathArg[2];
        args[0] = new FastpathArg(fd);
        args[1] = new FastpathArg(buf);
        fp.fastpath("lowrite", false, args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     * @param len number of bytes to write
     * @exception SQLException if a database-access error occurs.
     */
    public void write(byte buf[], int off, int len) throws SQLException
    {
        FastpathArg args[] = new FastpathArg[2];
        args[0] = new FastpathArg(fd);
        args[1] = new FastpathArg(buf, off, len);
        fp.fastpath("lowrite", false, args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     * @param ref Either SEEK_SET, SEEK_CUR or SEEK_END
     * @exception SQLException if a database-access error occurs.
     */
    public void seek(int pos, int ref) throws SQLException
    {
        FastpathArg args[] = new FastpathArg[3];
        args[0] = new FastpathArg(fd);
        args[1] = new FastpathArg(pos);
        args[2] = new FastpathArg(ref);
        fp.fastpath("lo_lseek", false, args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     * @return the current position within the object
     * @exception SQLException if a database-access error occurs.
     */
    public int tell() throws SQLException
    {
        FastpathArg args[] = new FastpathArg[1];
        args[0] = new FastpathArg(fd);
        return fp.getInteger("lo_tell", args);
    }
View Full Code Here

Examples of org.postgresql.fastpath.FastpathArg

     * object length, the large object will be filled with zero
     * bytes.  This method does not modify the current file offset.
     */
    public void truncate(int len) throws SQLException
    {
        FastpathArg args[] = new FastpathArg[2];
        args[0] = new FastpathArg(fd);
        args[1] = new FastpathArg(len);
        fp.getInteger("lo_truncate", args);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.