From a9faffb93feb3436afe96933d8851093918bdacf Mon Sep 17 00:00:00 2001 From: aylapear Date: Mon, 15 Jul 2024 22:19:33 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20poissonc?= =?UTF-8?q?onsulting/psql@e08e244a53ce73d190a70c1c30828c4f56d590b4=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 12 +++--- CODE_OF_CONDUCT.html | 12 +++--- LICENSE-text.html | 12 +++--- LICENSE.html | 12 +++--- SECURITY.html | 12 +++--- authors.html | 20 ++++----- index.html | 60 +++++++++++++-------------- news/index.html | 14 +++---- pkgdown.yml | 7 ++-- reference/index.html | 12 +++--- reference/params.html | 24 ++++++----- reference/psql_add_data.html | 34 ++++++++-------- reference/psql_backup.html | 30 +++++++------- reference/psql_connect.html | 28 ++++++------- reference/psql_create_db.html | 30 +++++++------- reference/psql_execute_db.html | 30 +++++++------- reference/psql_list_tables.html | 30 +++++++------- reference/psql_read_table.html | 32 +++++++-------- sitemap.xml | 72 +++++++++------------------------ 19 files changed, 223 insertions(+), 260 deletions(-) diff --git a/404.html b/404.html index 5a75e31..e7e4373 100644 --- a/404.html +++ b/404.html @@ -6,7 +6,7 @@ Page not found (404) • psql - + @@ -18,7 +18,7 @@ - +
- +
@@ -81,16 +81,16 @@

Page not found (404)

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index c90f452..78afe78 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -1,9 +1,9 @@ -Contributor Covenant Code of Conduct • psqlContributor Covenant Code of Conduct • psql - +
- +
@@ -123,15 +123,15 @@

Attribution -

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/LICENSE-text.html b/LICENSE-text.html index b9c5511..2ef6b1f 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -1,9 +1,9 @@ -License • psqlLicense • psql - +
- +
@@ -59,15 +59,15 @@

License

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/LICENSE.html b/LICENSE.html index 63431d7..0bbb1e4 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -1,9 +1,9 @@ -MIT License • psqlMIT License • psql - +
- +
@@ -63,15 +63,15 @@

MIT License

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/SECURITY.html b/SECURITY.html index 7856319..182530e 100644 --- a/SECURITY.html +++ b/SECURITY.html @@ -1,9 +1,9 @@ -Security Policy • psqlSecurity Policy • psql - +
- +
@@ -63,15 +63,15 @@

Reporting a Vulnerability
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/authors.html b/authors.html index 74786ff..53b40b7 100644 --- a/authors.html +++ b/authors.html @@ -1,9 +1,9 @@ -Authors and Citation • psqlAuthors and Citation • psql - +
- +
- +
  • Ayla Pearson. Author, maintainer.

    @@ -50,14 +50,14 @@

    Authors

    Citation

    - +

    Pearson A (2024). psql: Connecting, reading and writing to PostgreSQL databases. -R package version 0.1.0. +R package version 0.1.0.

    @Manual{,
       title = {psql: Connecting, reading and writing to PostgreSQL databases},
    @@ -77,15 +77,15 @@ 

    Citation

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/index.html b/index.html index a8e5ebb..89268bc 100644 --- a/index.html +++ b/index.html @@ -6,24 +6,20 @@ Connecting, reading and writing to PostgreSQL databases • psql - + - + - +
- +
@@ -85,36 +81,36 @@

Set Up

Install postgres locally by running the following

-
brew install postgresql
+
brew install postgresql

config file

Your database connection details should be stored in a config.yml file. Set the psql.config_path option as the file path to the config file. Set the psql.config_value option as the value in the config file.

Example of a config.yml file:

-
default:
-  user: "postgres"
-  host: 127.0.0.1
-  dbname: "postgres"
-  port: 5432
-  password: !expr Sys.getenv("DM_PASSWORD")
+
default:
+  user: "postgres"
+  host: 127.0.0.1
+  dbname: "postgres"
+  port: 5432
+  password: !expr Sys.getenv("DM_PASSWORD")
connecting to multiple databases

You can use a single config file to connect to multiple databases. You must have a default connection as shown in both examples.

-
default:
-  user: "postgres"
-  host: 127.0.0.1
-  dbname: "postgres"
-  port: 5432
-  password: !expr Sys.getenv("DM_PASSWORD")
-
-data_user:
-  user: "data_analyst"
-  host: 127.0.0.1
-  dbname: "postgres"
-  port: 5432
-  password: !expr Sys.getenv("DATA_ANALYST_PASSWORD")
+
default:
+  user: "postgres"
+  host: 127.0.0.1
+  dbname: "postgres"
+  port: 5432
+  password: !expr Sys.getenv("DM_PASSWORD")
+
+data_user:
+  user: "data_analyst"
+  host: 127.0.0.1
+  dbname: "postgres"
+  port: 5432
+  password: !expr Sys.getenv("DATA_ANALYST_PASSWORD")

To access the database with the data analyst credentials set the psql.config_value to "data_user" from the default option "default".

@@ -123,7 +119,7 @@

pgpass filepsql_backup() function. The postgresql website provides details on how to set it up.

Currently add the following file named .pgpass to your home directory (~)

-
*:*:*:*:<password>
+
*:*:*:*:<password>

and then in the terminal run chmod 0600 ~/.pgpass

@@ -245,16 +241,16 @@

Dev status

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/news/index.html b/news/index.html index a05c5f6..8c44bb9 100644 --- a/news/index.html +++ b/news/index.html @@ -1,9 +1,9 @@ -Changelog • psqlChangelog • psql - +
- +
@@ -59,15 +59,15 @@
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/pkgdown.yml b/pkgdown.yml index fa697a8..f8059ed 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,6 +1,5 @@ -pandoc: 2.19.2 -pkgdown: 2.0.7 +pandoc: 3.1.11 +pkgdown: 2.1.0 pkgdown_sha: ~ articles: {} -last_built: 2024-02-16T23:45Z - +last_built: 2024-07-15T22:19Z diff --git a/reference/index.html b/reference/index.html index 90392dd..28167b7 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,9 +1,9 @@ -Function reference • psqlPackage index • psql - +
- +
@@ -85,15 +85,15 @@

All functions
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/params.html b/reference/params.html index ac22b7a..52e0a87 100644 --- a/reference/params.html +++ b/reference/params.html @@ -1,9 +1,9 @@ -Parameters for psql functions — params • psqlParameters for psql functions — params • psql - +
- +
@@ -49,23 +49,25 @@

Parameters for psql functions

Arguments

-
config_path
+ + +
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

-
tbl_name
+
tbl_name

A string indicating the name of the table.

-
schema
+
schema

A string of the schema name. Default value is "public".

@@ -82,15 +84,15 @@

Arguments

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_add_data.html b/reference/psql_add_data.html index c6d01ba..498421e 100644 --- a/reference/psql_add_data.html +++ b/reference/psql_add_data.html @@ -1,11 +1,11 @@ -Add data to PostgreSQL database — psql_add_data • psqlAdd data to PostgreSQL database — psql_add_data • psql - +
- +
@@ -62,26 +62,28 @@

Add data to PostgreSQL database

Arguments

-
tbl
+ + +
tbl

The data frame to add to the database.

-
schema
+
schema

A string of the schema name. Default value is "public".

-
tbl_name
+
tbl_name

A string indicating the name of the table. Default is to use the name of the tbl argument.

-
config_path
+
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -89,9 +91,7 @@

Arguments

Value

- - -

A scalar numeric.

+

A scalar numeric.

Details

@@ -102,10 +102,10 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 psql_add_data(outing, "creel")
 psql_add_data(outing_new, "creel", "outing")
-}
+} # }
 
@@ -120,15 +120,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_backup.html b/reference/psql_backup.html index b72039d..663e35b 100644 --- a/reference/psql_backup.html +++ b/reference/psql_backup.html @@ -1,10 +1,10 @@ -Save PostgreSQL backup — psql_backup • psqlSave PostgreSQL backup — psql_backup • psql - +
- +
@@ -58,17 +58,19 @@

Save PostgreSQL backup

Arguments

-
path
+ + +
path

A string of the file path to save the dumped database

-
config_path
+
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -76,9 +78,7 @@

Arguments

Value

- - -

TRUE (or errors)

+

TRUE (or errors)

Details

@@ -94,9 +94,9 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 psql_backup("/Users/user1/Dumps/dump_db.sql")
-}
+} # }
 
@@ -111,15 +111,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_connect.html b/reference/psql_connect.html index 8b9abac..4d36c41 100644 --- a/reference/psql_connect.html +++ b/reference/psql_connect.html @@ -1,10 +1,10 @@ -Connect to PostgreSQL database — psql_connect • psqlConnect to PostgreSQL database — psql_connect • psql - +
- +
@@ -57,13 +57,15 @@

Connect to PostgreSQL database

Arguments

-
config_path
+ + +
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -71,9 +73,7 @@

Arguments

Value

- - -

An S4 object that inherits from DBIConnection.

+

An S4 object that inherits from DBIConnection.

Details

@@ -89,7 +89,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 conn <- psql_connect()
 DBI::dbDisconnect(conn)
 
@@ -98,7 +98,7 @@ 

Examples

psql_connect(config_path = "config.yml", config_value = "database") DBI::dbDisconnect(conn) -} +} # }
@@ -113,15 +113,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_create_db.html b/reference/psql_create_db.html index 7575cce..b243fc3 100644 --- a/reference/psql_create_db.html +++ b/reference/psql_create_db.html @@ -1,9 +1,9 @@ -Create PostgreSQL database — psql_create_db • psqlCreate PostgreSQL database — psql_create_db • psql - +
- +
@@ -56,17 +56,19 @@

Create PostgreSQL database

Arguments

-
dbname
+ + +
dbname

A string of the name of the new database to create.

-
config_path
+
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -74,9 +76,7 @@

Arguments

Value

- - -

TRUE (or errors).

+

TRUE (or errors).

Details

@@ -86,10 +86,10 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 psql_create_db("new_database")
 psql_create_db("new_database", config_path = "keys/config.yml")
-}
+} # }
 
@@ -104,15 +104,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_execute_db.html b/reference/psql_execute_db.html index e418697..1e7e692 100644 --- a/reference/psql_execute_db.html +++ b/reference/psql_execute_db.html @@ -1,9 +1,9 @@ -Execute SQL statement for PostgreSQL database — psql_execute_db • psqlExecute SQL statement for PostgreSQL database — psql_execute_db • psql - +
- +
@@ -56,17 +56,19 @@

Execute SQL statement for PostgreSQL database

Arguments

-
sql
+ + +
sql

A string of the SQL statement to execute.

-
config_path
+
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -74,9 +76,7 @@

Arguments

Value

- - -

A scalar numeric of the number of rows affected by the statement.

+

A scalar numeric of the number of rows affected by the statement.

Details

@@ -87,7 +87,7 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 psql_execute_db(
   "CREATE SCHEMA boat_count"
 )
@@ -96,7 +96,7 @@ 

Examples

file_name TEXT NOT NULL, comment TEXT)" ) -} +} # }
@@ -111,15 +111,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_list_tables.html b/reference/psql_list_tables.html index 0cb4094..e9328b3 100644 --- a/reference/psql_list_tables.html +++ b/reference/psql_list_tables.html @@ -1,9 +1,9 @@ -List tables in a schema — psql_list_tables • psqlList tables in a schema — psql_list_tables • psql - +
- +
@@ -56,17 +56,19 @@

List tables in a schema

Arguments

-
schema
+ + +
schema

A string of the schema name. Default value is "public".

-
config_path
+
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -74,9 +76,7 @@

Arguments

Value

- - -

A vector of table names

+

A vector of table names

Details

@@ -86,12 +86,12 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 psql_list_tables(
   "boat_count"
 )
 psql_list_tables()
-}
+} # }
 
@@ -106,15 +106,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/psql_read_table.html b/reference/psql_read_table.html index 924a5f1..e3660a0 100644 --- a/reference/psql_read_table.html +++ b/reference/psql_read_table.html @@ -1,9 +1,9 @@ -Read a table from a PostgreSQL database — psql_read_table • psqlRead a table from a PostgreSQL database — psql_read_table • psql - +
- +
@@ -57,21 +57,23 @@

Read a table from a PostgreSQL database

Arguments

-
tbl_name
+ + +
tbl_name

A string indicating the name of the table.

-
schema
+
schema

A string of the schema name. Default value is "public".

-
config_path
+
config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

-
config_value
+
config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

@@ -79,9 +81,7 @@

Arguments

Value

- - -

A data frame

+

A data frame

Details

@@ -91,10 +91,10 @@

Details

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 psql_read_table("capture")
 psql_read_table("counts", "boat_count")
-}
+} # }
 
@@ -109,15 +109,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/sitemap.xml b/sitemap.xml index bc6b14d..47d883c 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,54 +1,20 @@ - - - - /404.html - - - /CODE_OF_CONDUCT.html - - - /LICENSE-text.html - - - /LICENSE.html - - - /SECURITY.html - - - /authors.html - - - /index.html - - - /news/index.html - - - /reference/index.html - - - /reference/params.html - - - /reference/psql_add_data.html - - - /reference/psql_backup.html - - - /reference/psql_connect.html - - - /reference/psql_create_db.html - - - /reference/psql_execute_db.html - - - /reference/psql_list_tables.html - - - /reference/psql_read_table.html - + +/404.html +/CODE_OF_CONDUCT.html +/LICENSE-text.html +/LICENSE.html +/SECURITY.html +/authors.html +/index.html +/news/index.html +/reference/index.html +/reference/params.html +/reference/psql_add_data.html +/reference/psql_backup.html +/reference/psql_connect.html +/reference/psql_create_db.html +/reference/psql_execute_db.html +/reference/psql_list_tables.html +/reference/psql_read_table.html +