Learn R Programming

RPostgreSQL (version 0.7-5)

PostgreSQLResult-class: Class PostgreSQLResult

Description

PostgreSQL's query results class. This classes encapsulates the result of an SQL statement (either select or not).

Arguments

Generators

The main generator is dbSendQuery.

Extends

Class "DBIResult", directly. Class "PostgreSQLObject", directly. Class "DBIObject", by class "DBIResult". Class "dbObjectId", by class "PostgreSQLObject".

Methods

coerce

signature(from = "PostgreSQLConnection", to = "PostgreSQLResult"): ...

dbClearResult

signature(res = "PostgreSQLResult"): ...

dbColumnInfo

signature(res = "PostgreSQLResult"): ...

dbGetException

signature(conn = "PostgreSQLResult"): ...

dbGetInfo

signature(dbObj = "PostgreSQLResult"): ...

dbGetRowCount

signature(res = "PostgreSQLResult"): ...

dbGetRowsAffected

signature(res = "PostgreSQLResult"): ...

dbGetStatement

signature(res = "PostgreSQLResult"): ...

dbHasCompleted

signature(res = "PostgreSQLResult"): ...

dbListFields

signature(conn = "PostgreSQLResult", name = "missing"): ...

fetch

signature(res = "PostgreSQLResult", n = "numeric"): ...

fetch

signature(res = "PostgreSQLResult", n = "missing"): ...

summary

signature(object = "PostgreSQLResult"): ...

References

See the Database Interface definition document DBI.pdf in the base directory of this package or https://developer.r-project.org/db/

See Also

DBI base classes:

DBIObject-class DBIDriver-class DBIConnection-class DBIResult-class

PostgreSQL classes:

PostgreSQLObject-class PostgreSQLDriver-class PostgreSQLConnection-class PostgreSQLResult-class

Examples

Run this code
if (FALSE) {
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, dbname = "template1")
## rs is the result set
rs <- dbSendQuery(con,"select * from sales")
## display the first three values of result set
fetch(rs,n=3)
}

Run the code above in your browser using DataLab