From 155f849a70507e7f138c06df66da7b88c2660024 Mon Sep 17 00:00:00 2001 From: Shawn Davis Date: Tue, 22 Sep 2020 16:34:38 -0400 Subject: [PATCH] Updated docs. --- docs/source/_data/cloc.csv | 4 +- docs/source/_includes/overlays.rst | 290 +++++------------------------ 2 files changed, 45 insertions(+), 249 deletions(-) diff --git a/docs/source/_data/cloc.csv b/docs/source/_data/cloc.csv index 03e375f..75ffe50 100644 --- a/docs/source/_data/cloc.csv +++ b/docs/source/_data/cloc.csv @@ -1,3 +1,3 @@ files,language,blank,comment,code -22,Python,998,887,1639 -22,SUM,998,887,1639 +22,Python,995,879,1639 +22,SUM,995,879,1639 diff --git a/docs/source/_includes/overlays.rst b/docs/source/_includes/overlays.rst index f99d3ec..8a64d6a 100644 --- a/docs/source/_includes/overlays.rst +++ b/docs/source/_includes/overlays.rst @@ -367,154 +367,12 @@ Postgres Postgres commands. -pg.client ---------- - -Execute a psql command. - -- sql (str): The SQL to be executed. -- database (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- port (int): The port number of the Postgres service running on the host. - - -.. code-block:: ini - - [run pg.client command] - pg.client: sql - database: template1 - host: localhost - password: None - port: 5432 - user: postgres - -pg.createdatabase ------------------ - -Create a PostgreSQL database. - -- name (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- owner (str): The owner (user/role name) of the new database. -- port (int): The port number of the Postgres service running on the host. -- template (str): The database template name to use, if any. - - -.. code-block:: ini - - [run pg.createdatabase command] - pg.createdatabase: name - admin_pass: None - admin_user: postgres - host: localhost - owner: None - port: 5432 - template: None - -pg.createdb ------------ - -Create a PostgreSQL database. - -- name (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- owner (str): The owner (user/role name) of the new database. -- port (int): The port number of the Postgres service running on the host. -- template (str): The database template name to use, if any. - - -.. code-block:: ini - - [run pg.createdb command] - pg.createdb: name - admin_pass: None - admin_user: postgres - host: localhost - owner: None - port: 5432 - template: None - -pg.createuser -------------- - -Create a PostgreSQL user. - -- name (str): The user name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- port (int): The port number of the Postgres service running on the host. - - -.. code-block:: ini - - [run pg.createuser command] - pg.createuser: name - admin_pass: None - admin_user: postgres - host: localhost - password: None - port: 5432 - -pg.database ------------ - -Create a PostgreSQL database. - -- name (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- owner (str): The owner (user/role name) of the new database. -- port (int): The port number of the Postgres service running on the host. -- template (str): The database template name to use, if any. - - -.. code-block:: ini - - [run pg.database command] - pg.database: name - admin_pass: None - admin_user: postgres - host: localhost - owner: None - port: 5432 - template: None - -pg.database_exists ------------------- - -Determine if a Postgres database exists. - -- name (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- owner (str): The owner (user/role name) of the new database. -- port (int): The port number of the Postgres service running on the host. - - -.. code-block:: ini - - [run pg.database_exists command] - pg.database_exists: name - admin_pass: None - admin_user: postgres - host: localhost - port: 5432 - -pg.db ------ +pgsql.create +------------ Create a PostgreSQL database. -- name (str): The database name. +- database (str): The database name. - admin_pass (str): The password for the user with sufficient access privileges to execute the command. - admin_user (str): The name of the user with sufficient access privileges to execute the command. - host (str): The database host name or IP address. @@ -525,8 +383,8 @@ Create a PostgreSQL database. .. code-block:: ini - [run pg.db command] - pg.db: name + [run pgsql.create command] + pgsql.create: database admin_pass: None admin_user: postgres host: localhost @@ -534,54 +392,12 @@ Create a PostgreSQL database. port: 5432 template: None -pg.dropdatabase ---------------- - -Remove a PostgreSQL database. - -- name (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- port (int): The port number of the Postgres service running on the host. - - -.. code-block:: ini - - [run pg.dropdatabase command] - pg.dropdatabase: name - admin_pass: None - admin_user: postgres - host: localhost - port: 5432 - -pg.dropdb ---------- +pgsql.drop +---------- Remove a PostgreSQL database. -- name (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- port (int): The port number of the Postgres service running on the host. - - -.. code-block:: ini - - [run pg.dropdb command] - pg.dropdb: name - admin_pass: None - admin_user: postgres - host: localhost - port: 5432 - -pg.dropuser ------------ - -Remove a Postgres user. - -- name (str): The user name. +- database (str): The database name. - admin_pass (str): The password for the user with sufficient access privileges to execute the command. - admin_user (str): The name of the user with sufficient access privileges to execute the command. - host (str): The database host name or IP address. @@ -590,19 +406,19 @@ Remove a Postgres user. .. code-block:: ini - [run pg.dropuser command] - pg.dropuser: name + [run pgsql.drop command] + pgsql.drop: database admin_pass: None admin_user: postgres host: localhost port: 5432 -pg.dump -------- +pgsql.dump +---------- Export a Postgres database. -- name (str): The database name. +- database (str): The database name. - admin_pass (str): The password for the user with sufficient access privileges to execute the command. - admin_user (str): The name of the user with sufficient access privileges to execute the command. - file_name (str): The name/path of the export file. Defaults the database name plus ``.sql``. @@ -612,104 +428,84 @@ Export a Postgres database. .. code-block:: ini - [run pg.dump command] - pg.dump: name + [run pgsql.dump command] + pgsql.dump: database admin_pass: None admin_user: postgres file_name: None host: localhost port: 5432 -pg.dumpdb ---------- +pgsql.exists +------------ -Export a Postgres database. +Determine if a Postgres database exists. -- name (str): The database name. +- database (str): The database name. - admin_pass (str): The password for the user with sufficient access privileges to execute the command. - admin_user (str): The name of the user with sufficient access privileges to execute the command. -- file_name (str): The name/path of the export file. Defaults the database name plus ``.sql``. - host (str): The database host name or IP address. +- owner (str): The owner (user/role name) of the new database. - port (int): The port number of the Postgres service running on the host. .. code-block:: ini - [run pg.dumpdb command] - pg.dumpdb: name + [run pgsql.exists command] + pgsql.exists: database admin_pass: None admin_user: postgres - file_name: None host: localhost port: 5432 -pg.exists +pgsql.sql --------- -Determine if a Postgres database exists. +Execute a psql command. -- name (str): The database name. +- sql (str): The SQL to be executed. +- database (str): The database name. - admin_pass (str): The password for the user with sufficient access privileges to execute the command. - admin_user (str): The name of the user with sufficient access privileges to execute the command. - host (str): The database host name or IP address. -- owner (str): The owner (user/role name) of the new database. - port (int): The port number of the Postgres service running on the host. .. code-block:: ini - [run pg.exists command] - pg.exists: name - admin_pass: None - admin_user: postgres + [run pgsql.sql command] + pgsql.sql: sql + database: template1 host: localhost + password: None port: 5432 + user: postgres -pg.user -------- +pgsql.user +---------- -Create a PostgreSQL user. +Work with a PostgreSQL user. - name (str): The user name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- port (int): The port number of the Postgres service running on the host. +- host (str): The host name. +- op (str): The operation to perform: ``create``, ``drop``, ``exists``. +- passwd (str): The password for a new user. +- password (str): The password for the user with sufficient access privileges to execute the command. +- port (int): The TCP port number. +- user (str): The name of the user with sufficient access privileges to execute the command. .. code-block:: ini - [run pg.user command] - pg.user: name + [run pgsql.user command] + pgsql.user: name admin_pass: None admin_user: postgres host: localhost + op: create password: None port: 5432 -psql ----- - -Execute a psql command. - -- sql (str): The SQL to be executed. -- database (str): The database name. -- admin_pass (str): The password for the user with sufficient access privileges to execute the command. -- admin_user (str): The name of the user with sufficient access privileges to execute the command. -- host (str): The database host name or IP address. -- port (int): The port number of the Postgres service running on the host. - - -.. code-block:: ini - - [run psql command] - psql: sql - database: template1 - host: localhost - password: None - port: 5432 - user: postgres - POSIX =====