GetInteger() public method

This convenience method assumes that the return value is an Integer.
public GetInteger ( String name, NpgsqlTypes.FastpathArg args ) : Int32
name String Function name.
args NpgsqlTypes.FastpathArg Function arguments.
return System.Int32
コード例 #1
0
		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);
		}
コード例 #2
0
ファイル: LargeObject.cs プロジェクト: monty241/Npgsql
        private Boolean closed = false; // true when we are closed

        /// <summary>
        /// This opens a large object.
        /// </summary>
        /// <param name="fp">FastPath API for the connection to use.</param>
        /// <param name="oid">OID of the Large Object to open.</param>
        /// <param name="mode">Mode of opening the large object</param>
        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);
        }
コード例 #3
0
        /*
         * 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));
        }
コード例 #4
0
ファイル: LargeObject.cs プロジェクト: monty241/Npgsql
 /// <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));
 }