Свойство | Тип | Описание | |
---|---|---|---|
conn | |||
func | int>.Dictionary | ||
stream | Stream |
Метод | Описание | |
---|---|---|
AddFunction ( String name, |
This adds a function to our lookup table. User code should use the addFunctions method, which is based upon a query, rather than hard coding the oid. The oid for a function is not guaranteed to remain static, even on different servers of the same version.
|
|
AddFunctions ( IDataReader rs ) : void |
This takes a ResultSet containing two columns. Column 1 contains the function name, Column 2 the oid. It reads the entire ResultSet, loading the values into the function table. REMEMBER to close() the resultset after calling this!! Implementation note about function name lookups: PostgreSQL stores the function id's and their corresponding names in the pg_proc table. To speed things up locally, instead of querying each function from that table when required, a Dictionary is used. Also, only the function's required are entered into this table, keeping connection times as fast as possible. The org.postgresql.largeobject.LargeObject class performs a query upon it's startup, and passes the returned ResultSet to the addFunctions() method here. Once this has been done, the LargeObject api refers to the functions by name. Dont think that manually converting them to the oid's will work. Ok, they will for now, but they can change during development (there was some discussion about this for V7.0), so this is implemented to prevent any unwarranted headaches in the future.
|
|
Fastpath ( |
Initialises the fastpath system.
|
|
Fastpath ( |
Initialises the fastpath system.
|
|
FastpathCall ( |
Send a function call to the PostgreSQL backend.
|
|
FastpathCall ( String name, System.Boolean resulttype, NpgsqlTypes.FastpathArg args ) : Object |
Send a function call to the PostgreSQL backend by name. Note: the mapping for the procedure name to function id needs to exist, usually to an earlier call to addfunction(). This is the prefered method to call, as function id's can/may change between versions of the backend. For an example of how this works, refer to NpgsqlTypes.LargeObject
|
|
GetData ( String name, NpgsqlTypes.FastpathArg args ) : Byte[] |
This convenience method assumes that the return value is an Integer.
|
|
GetID ( String name ) : |
This returns the function id associated by its name If addFunction() or addFunctions() have not been called for this name, then an NpgsqlException is thrown.
|
|
GetInteger ( String name, NpgsqlTypes.FastpathArg args ) : |
This convenience method assumes that the return value is an Integer.
|
Метод | Описание | |
---|---|---|
FastpathV2 ( |
||
FastpathV3 ( |
public AddFunction ( String name, |
||
name | String | Function name. |
fnid | Function id. | |
Результат | void |
public AddFunctions ( IDataReader rs ) : void | ||
rs | IDataReader | ResultSet |
Результат | void |
public Fastpath ( |
||
conn | BaseConnection to attach to. | |
Результат | System |
public Fastpath ( |
||
conn | BaseConnection to attach to. | |
stream | Stream | The network stream to the backend. |
Результат | System |
public FastpathCall ( |
||
fnid | Function id. | |
resulttype | System.Boolean | True if the result is an integer, false for other results. |
args | NpgsqlTypes.FastpathArg | FastpathArguments to pass to fastpath. |
Результат | Object |
public FastpathCall ( String name, System.Boolean resulttype, NpgsqlTypes.FastpathArg args ) : Object | ||
name | String | Function name. |
resulttype | System.Boolean | True if the result is an integer, false for other results. |
args | NpgsqlTypes.FastpathArg | FastpathArguments to pass to fastpath. |
Результат | Object |
public GetData ( String name, NpgsqlTypes.FastpathArg args ) : Byte[] | ||
name | String | Function name. |
args | NpgsqlTypes.FastpathArg | Function arguments. |
Результат | Byte[] |
public GetID ( String name ) : |
||
name | String | Function name to lookup. |
Результат |
public GetInteger ( String name, NpgsqlTypes.FastpathArg args ) : |
||
name | String | Function name. |
args | NpgsqlTypes.FastpathArg | Function arguments. |
Результат |