Description Usage Arguments Details Value See Also Examples
Create a database connection object using PostgreSQL DBMS.
1 | Postgre(db_name, db_user, db_pass, db_host, db_port = 5432)
|
db_name |
string. Name of the database to load. |
db_user |
string. User identification for the DBMS. |
db_pass |
string. Password identifying the user. |
db_host |
string. Name of the server hosting the database. |
db_port |
integer. Port the server is listening. |
Connect to a database and set con_obj
in the object itself.
Postgre, an S3 object of type Postgre containing the required parameter to act as an interface to PostgreSQL.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | con <- Postgre(db_host = 'localhost', db_name = 'test', db_user = 'root', db_pass = '123456')
con
#$db_host
#[1] "127.0.0.1"
#$db_port
#[1] 5432
#$db_name
#[1] "test"
#$db_user
#[1] "keyhan"
#$db_pass
#[1] "123456"
#$con_obj
#<PostgreSQLConnection>
#attr(,"class")
#[1] "Postgre"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.