snoutdata 0.21.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/dist/snoutdata.mjs +391 -218
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,6 +117,8 @@ snoutdata projects list
|
|
|
117
117
|
snoutdata projects create --name X [--region R] [--no-wait]
|
|
118
118
|
snoutdata projects pause|resume|delete [--ref R]
|
|
119
119
|
snoutdata usage [--ref R] [--days 30] [--history]
|
|
120
|
+
snoutdata usage --tables [--limit 20] # and the largest tables
|
|
121
|
+
snoutdata metrics [--ref R] [--node REF] [--window hour|day|week]
|
|
120
122
|
snoutdata teams
|
|
121
123
|
```
|
|
122
124
|
|
|
@@ -125,7 +127,10 @@ snoutdata teams
|
|
|
125
127
|
```bash
|
|
126
128
|
snoutdata db url [--ref R] # a connection string
|
|
127
129
|
snoutdata db psql [--ref R] [-- ...] # opens psql, no password typed
|
|
128
|
-
snoutdata db
|
|
130
|
+
snoutdata db query "SQL" [--ref R] # run SQL, no psql needed; rows as a table
|
|
131
|
+
snoutdata db run FILE.sql [--ref R] # a file in one transaction, no psql needed
|
|
132
|
+
snoutdata db slow [--limit 10] # the statements that took the most time
|
|
133
|
+
snoutdata db reset-password [--grace 60] # new password, other owner login; old one works 60 min
|
|
129
134
|
snoutdata db access [--ref R] # who signs in as themselves (Postgres 18)
|
|
130
135
|
snoutdata db access grant EMAIL [--level full|read] # prints their connection string
|
|
131
136
|
snoutdata db access revoke EMAIL|ROLE
|
|
@@ -134,12 +139,13 @@ snoutdata db push [--dir migrations] [--dry-run] # run the .sql files, once eac
|
|
|
134
139
|
snoutdata db restore --file DUMP [--force]
|
|
135
140
|
```
|
|
136
141
|
|
|
137
|
-
`db push`
|
|
138
|
-
statement at a time, cut where `psql` would cut it. A file holding a
|
|
139
|
-
is refused before anything runs. `db
|
|
140
|
-
|
|
142
|
+
`db push`, `db query`, `db run` and `db slow` need nothing installed: they connect to the database
|
|
143
|
+
themselves and send SQL a statement at a time, cut where `psql` would cut it. A file holding a
|
|
144
|
+
`psql` command (`\i`, `\set`) is refused before anything runs. `db run`, and a `db query` with
|
|
145
|
+
several statements, runs them in one transaction: the first that fails rolls it all back and the
|
|
146
|
+
error names it. `db psql`, `db restore` and `gen types` use the Postgres client tools.
|
|
141
147
|
|
|
142
|
-
`db psql`, `db push`, `db restore` and `gen types` verify the database's certificate
|
|
148
|
+
`db psql`, `db push`, `db query`, `db run`, `db restore` and `gen types` verify the database's certificate
|
|
143
149
|
(`sslmode=verify-full`, against Node's trusted roots). `SNOUTDATA_DB_SSLMODE=require` turns the
|
|
144
150
|
check off, for a network that re-signs Postgres traffic.
|
|
145
151
|
|