コード例 #1
0
 /// <summary>
 /// This method closes the object. You must not call methods in this
 /// object after this is called.
 /// </summary>
 public void Close()
 {
     if (!closed)
     {
         // finally close
         FastpathArg[] args = new FastpathArg[1];
         args[0] = new FastpathArg(fd);
         fp.FastpathCall("lo_close", false, args); // true here as we dont care!!
         closed = true;
     }
 }
コード例 #2
0
 /// <summary>
 /// This deletes a large object.
 /// </summary>
 /// <param name="oid">OID describing object to delete.</param>
 public void Delete(Int32 oid)
 {
     FastpathArg[] args = new FastpathArg[1];
     args[0] = new FastpathArg(oid);
     fp.FastpathCall("lo_unlink", false, args);
 }
コード例 #3
0
 /*
  * This creates a large object, returning its OID
  *
  * @param mode a bitmask describing different attributes of the new object
  * @return oid of new object
  * @exception NpgsqlException on error
  */
 /// <summary>
 /// This creates a large object, returning its OID.
 /// </summary>
 /// <param name="mode">Bitmask describing different attributes of the new object.</param>
 /// <returns>OID of new object.</returns>
 public Int32 Create(Int32 mode)
 {
     FastpathArg[] args = new FastpathArg[1];
     args[0] = new FastpathArg(mode);
     return(fp.GetInteger("lo_creat", args));
 }
コード例 #4
0
 /// <summary>
 /// This creates a large object, returning its OID.
 /// </summary>
 /// <returns>OID of new object.</returns>
 public Int32 Create()
 {
     FastpathArg[] args = new FastpathArg[1];
     args[0] = new FastpathArg(READWRITE);
     return(fp.GetInteger("lo_creat", args));
 }
コード例 #5
0
 /// <summary>
 /// Report the current position within the object.
 /// </summary>
 /// <returns>The current position within the object.</returns>
 public Int32 Tell()
 {
     FastpathArg[] args = new FastpathArg[1];
     args[0] = new FastpathArg(fd);
     return(fp.GetInteger("lo_tell", args));
 }