Class Answer
Contains result of query with valid data answer
Methods
Name | Description |
---|---|
cmdStatus
()
|
Returns the command status tag from the SQL command that generated the PGresult Commonly this is just the name of the command, but it might include additional data such as the number of rows processed. |
cmdTuples
()
|
Returns the number of rows affected by the SQL command. This function returns a string containing the number of rows affected by the SQL statement that generated the Answer. This function can only be used following the execution of a SELECT, CREATE TABLE AS, INSERT, UPDATE, DELETE, MOVE, FETCH, or COPY statement, or an EXECUTE of a prepared query that contains an INSERT, UPDATE, or DELETE statement. If the command that generated the Anwser was anything else, cmdTuples returns an empty string. |
columnCount
()
|
Returns column count |
columnExists
(columnName)
|
Returns true if the column exists, false if not |
columnFormat
(colNum)
|
Returns column format |
columnName
(colNum)
|
Returns column name by field number |
columnNum
(columnName)
|
Returns column number by field name |
isArray
(colNum)
|
Checks if column type is array |
length
()
|
Returns row count |
nParams
()
|
Returns the number of parameters of a prepared statement. This function is only useful when inspecting the result of describePrepared. For other types of queries it will return zero. |
OID
(colNum)
|
Returns column Oid |
opIndex
(row)
|
Returns row of cells |
paramType
(paramNum)
|
Returns the data type of the indicated statement parameter. Parameter numbers start at 0. This function is only useful when inspecting the result of describePrepared. For other types of queries it will return zero. |
toString
()
|
|
getAnswer
()
|
Creates Answer object |
resultErrorField
(fieldcode)
|
Returns an individual field of an error report. |
resultErrorMessage
()
|
Returns the error message associated with the command, or an empty string if there was no error. |
status
()
|
Returns the result status of the command. |
statusString
()
|
Text description of result status. |