private Boolean closed = false; // true when we are closed /* * This opens a large object. * * <p>If the object does not exist, then an NpgsqlException is thrown. * * @param fp FastPath API for the connection to use * @param oid of the Large Object to open * @param mode Mode of opening the large object * (defined in LargeObjectManager) * @exception NpgsqlException if a database-access error occurs. * @see org.postgresql.largeobject.LargeObjectManager */ public LargeObject(Fastpath fp, Int32 oid, Int32 mode) { this.fp = fp; this.oid = oid; FastpathArg[] args = new FastpathArg[2]; args[0] = new FastpathArg(oid); args[1] = new FastpathArg(mode); this.fd = fp.GetInteger("lo_open", args); }
private Boolean closed = false; // true when we are closed /* * This opens a large object. * * <p>If the object does not exist, then an NpgsqlException is thrown. * * @param fp FastPath API for the connection to use * @param oid of the Large Object to open * @param mode Mode of opening the large object * (defined in LargeObjectManager) * @exception NpgsqlException if a database-access error occurs. * @see org.postgresql.largeobject.LargeObjectManager */ public LargeObject(Fastpath fp, Int32 oid, Int32 mode) { this.fp = fp; this.oid = oid; FastpathArg[] args = new FastpathArg[2]; args[0] = new FastpathArg(oid); args[1] = new FastpathArg(mode); this.fd = fp.GetInteger("lo_open", args); }
/* * This creates a large object, returning its OID. * * <p>It defaults to READWRITE for the new object's attributes. * * @return oid of new object * @exception NpgsqlException on error */ public Int32 Create() { FastpathArg[] args = new FastpathArg[1]; args[0] = new FastpathArg(READWRITE); return(fp.GetInteger("lo_creat", args)); }
/* * @return the current position within the object * @exception NpgsqlException if a database-access error occurs. */ public Int32 Tell() { FastpathArg[] args = new FastpathArg[1]; args[0] = new FastpathArg(fd); return(fp.GetInteger("lo_tell", args)); }